ELF binarry
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 2 lines
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