Hi guys and girls, This little patch o' mine implements the command "info proc map" for corefiles in GDB. Initially, this feature is only provided for live process being debugged. We decided that it would be good to have such functionality for corefiles as well, since this information (the memory mappings) is available inside them. This was something that Thiago and I have discussed for some time, and it took a little while for me to figure out how things worked in this part of the code. I really don't know if this is the right way to implement this, so I'd be glad if you could take a look and give your opinions. It's not architecture-dependend so this time you'll be able to test without problems. Comments and reviews are welcome, as always. This is a little example of this feature working: sergio@miki ~/work/gdb/build-32/gdb $ ./gdb /tmp/teste core.13754 GNU gdb (GDB) 6.8.50.20081218-cvs ... (gdb) info proc map exe = '/tmp/teste' Mapped address spaces: Start Addr End Addr Size objfile 0x8048000 0x8049000 0x1000 /tmp/teste 0x8049000 0x804a000 0x1000 /tmp/teste 0x804a000 0x804b000 0x1000 /tmp/teste 0xb7e93000 0xb7e94000 0x1000 0xb7e94000 0xb7fbe000 0x12a000 0xb7fbe000 0xb7fc0000 0x2000 0xb7fc0000 0xb7fc1000 0x1000 0xb7fc1000 0xb7fc5000 0x4000 0xb7fe4000 0xb7ffe000 0x1a000 /lib/ld-linux.so.2 0xb7ffe000 0xb7fff000 0x1000 /lib/ld-linux.so.2 0xb7fff000 0xb8000000 0x1000 /lib/ld-linux.so.2 0xbffeb000 0xc0000000 0x15000 0xffffe000 0xfffff000 0x1000 system-supplied DSO at 0xffffe000 The corefile used here (core.13754) was generated using the "gcore" command inside GDB. Regards, -- Sérgio Durigan Júnior Linux on Power Toolchain - Software Engineer Linux Technology Center - LTC IBM Brazil 2008-12-18 Sergio Durigan Junior * corelow.c: Including extra header files in order to be able to use proper data structures for the "info proc map". (print_proc_map_iter): New function. (core_print_proc_map): Likewise. (init_core_ops): Initializing to_print_proc_map method for corefile target_ops. * linux-nat.c (linux_nat_print_proc_map): New function. (linux_nat_info_proc_cmd): Handling the "info proc map" for corefiles. (linux_nat_add_target): Initializing to_print_proc_map method for Linux target_ops. * target.c (update_current_target): Inherit to_print_proc_map. (dummy_print_proc_map): New function. (init_dummy_target): Initializing to_print_proc_map method for dummy target_ops. * target.h (struct target_ops): Adding method to_print_proc_map. (target_print_proc_map): New define.