This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Implement new `info core mappings' command
> From: Sergio Durigan Junior <sergiodj@redhat.com>
> Cc: gdb-patches@sourceware.org
> Date: Thu, 27 Oct 2011 15:55:34 -0200
>
> Ok, thanks for the directions. I rewrote this part of the patch (see
> below) to address all the comments. Please, let me know what you think.
It is fine, except for a single gotcha:
> +@smallexample
> +(@value{GDBP}) info core mappings
> +exe = '/tmp/a.out'
> +Mapped address spaces:
> +
> + Start Addr End Addr Size objfile
> + 0x400000 0x401000 0x1000 /tmp/a.out
> + 0x600000 0x601000 0x1000 /tmp/a.out
> + 0x397de00000 0x397de1f000 0x1f000 /usr/lib/debug/lib64/ld-2.13.so.debug
> + 0x397e01e000 0x397e01f000 0x1000 /usr/lib/debug/lib64/ld-2.13.so.debug
> + 0x397e01f000 0x397e020000 0x1000 /usr/lib/debug/lib64/ld-2.13.so.debug
> + 0x397e020000 0x397e021000 0x1000 /usr/lib/debug/lib64/ld-2.13.so.debug
> + 0x397e200000 0x397e391000 0x191000 /usr/lib/debug/lib64/libc-2.13.so.debug
> + 0x397e591000 0x397e595000 0x4000 /usr/lib/debug/lib64/libc-2.13.so.debug
> + 0x397e595000 0x397e596000 0x1000 /usr/lib/debug/lib64/libc-2.13.so.debug
> + 0x397e596000 0x397e59c000 0x6000
> + 0x7ffff7fd1000 0x7ffff7fd4000 0x3000
> + 0x7ffff7ffd000 0x7ffff7ffe000 0x1000
> + 0x7ffff7ffe000 0x7ffff7fff000 0x1000 system-supplied DSO at 0x7ffff7ffe000
> + 0x7ffffffde000 0x7ffffffff000 0x21000
> + 0xffffffffff600000 0xffffffffff601000 0x1000
> +@end smallexample
This is too wide for a @smallexample, and will overflow the page
limits in print. We need to keep each line under 75 characters. So
what I suggest is this:
. Remove the lines with large addresses from the example, and maybe
also the line whose "size" is 0x191000
. Delete as much white space between the columns as possible
. If the above measures are not enough, shorten the file names of the
libraries, e.g. /usr/lib/debug/libc.so.debug
Okay with that change.
Thanks.