[PATCH v4 12/14] Add new command "maint print core-file-backed-mappings"

Kevin Buettner kevinb@redhat.com
Mon Jul 13 17:33:32 GMT 2020


On Fri, 10 Jul 2020 21:08:15 +0100
Pedro Alves <pedro@palves.net> wrote:

> I don't understand what this command provides that "info proc mappings"
> doesn't?  Can you give an example of when you'd use this command
> over "info proc mappings" ?

I wanted it while adding core file note support for FreeBSD.  I wanted
to check that 1) the mappings were actually be loaded and 2) the
mappings loaded by corelow.c were correct.  I think it might be occasionally
useful by other GDB developers for debugging core file related problems.

A normal GDB user won't use this command; that's why it's a maintenance
command.  Depending on the OS there may be differences between
"info proc mappings" and this new maintenance command.  At the
moment, there aren't any differences on Linux, but there will be for
FreeBSD.  FreeBSD provides more mappings and more fields for each
mapping.  I would expect that "info proc mappings" on FreeBSD will
show all mappings along with the additional fields.  The maintenance
command will show a subset of that information; as such it might not
seem terribly useful, but the point of it is to output information from
the corelow.c created data structures so that a developer can check
that they exist and are correct.

I'll add a few more words to the commit log.

Kevin



More information about the Gdb-patches mailing list