From: Brian Raiter <breadbox@muppetlabs.com>
To: linux-assembly@vger.kernel.org
Subject: Re: ELF binarry
Date: Wed, 15 Oct 2003 14:56:00 -0700 [thread overview]
Message-ID: <16269.49776.37061.807592@eidolon.muppetlabs.com> (raw)
In-Reply-To: <20031015160137.8874.qmail@linuxmail.org>
> So, how can we get memory info (start & finish) from argv, envp, and
> programname..?
Just look at them in the debugger:
$ gdb ./foo
GNU gdb [... blah blah blah ...]
(gdb) b main
Breakpoint 1 at 0x8048433: file foo.c, line 6.
(gdb) r
Starting program: ./foo
Breakpoint 1, main (argc=1, argv=0xbffff584, envp=0xbffff58c) at foo.c:6
(gdb) p argv[0]
$1 = 0xbffff698 "./foo"
(gdb) p envp[0]
$2 = 0xbffff6ad "VISUAL=/usr/bin/emacs"
(gdb) p envp[31]
$3 = 0xbfffffd9 "HISTSIZE=1000"
et cetera, et cetera ...
b
next parent reply other threads:[~2003-10-15 21:56 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20031015160137.8874.qmail@linuxmail.org>
2003-10-15 21:56 ` Brian Raiter [this message]
2003-10-14 15:28 ELF binarry ssams sudin
2003-10-14 17:04 ` Brian Raiter
2003-10-15 6:39 ` Frederic Marmond
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=16269.49776.37061.807592@eidolon.muppetlabs.com \
--to=breadbox@muppetlabs.com \
--cc=linux-assembly@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).