I want to find out the base address and the imagesize of the program being debugged in gdb. As in, where it got loaded in memory. For shared libraries I can do "info sharedlibrary" and I get very nice output like so:
0x00007ffff7dd5f10 0x00007ffff7df4b20 Yes /lib64/ld-linux-x86-64.so.2
How can i get this output for the main program i am debugging?
I know that gdb disables ASLR and I could just inspect the ELF file myself to find out, but there has to be a way via gdb too.
(Background: I am using gdb's mi, and I can keep a basic overview of where things are by parsing sharedlibrary-load messages. But it never sends such a message for the main program, which is the most important thing.)
Thanks!
info proc mappings <pid>