binutils-gdb/gdb/doc
Andrew Burgess 02a7930992 gdb: add a new 'maint info target-sections' command
We already have a command 'maint info sections', this command prints
all sections from all known object files.

However, GDB maintains a second section table internally.  This
section table is used when GDB wants to read directly from an object
file rather than actually reading memory on the target.  As such only
some sections (the allocatable ones) are added to this secondary
section table.

I recently ran into a situation where some of GDB's optimisations for
reading directly from the files were not working.  In 'maint info
sections' I could see that GDB knew about the object file, and did
know about the sections that it _should_ have been reading from.  But
I couldn't ask GDB which sections it had copied into its secondary
section table.

This commit adds a new command 'maint info target-sections' that fills
this gap.  This command lists only those sections that GDB has copied
into its secondary table.

You'll notice that the testsuite includes a comment indicating that
there's a bug in GDB.  Normally this is not something I would add to
the testsuite, instead we should raise an actual bugzilla bug and then
mark an xfail, however, a later patch in this series will remove this
comment once the actual bug in GDB is fixed.

gdb/ChangeLog:

	* NEWS: Mention new 'maint info target-sections' command.
	* maint.c (maintenance_info_target_sections): New function.
	(_initialize_maint_cmds): Register new command.

gdb/doc/ChangeLog:

	* gdb.texinfo (Files): Document new 'maint info target-sections'
	command.

gdb/testsuite/ChangeLog:

	* gdb.base/maint-info-sections.exp: Add new tests.
	(check_maint_info_target_sections_output): New proc.
2021-02-24 16:58:02 +00:00
..
.gitignore
a4rc.sed
agentexpr.texi Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
all-cfg.texi Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
annotate.texinfo Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
ChangeLog gdb: add a new 'maint info target-sections' command 2021-02-24 16:58:02 +00:00
doxy-index.in Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
Doxyfile-base.in Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
Doxyfile-gdb-api.in Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
Doxyfile-gdb-xref.in Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
Doxyfile-gdbserver.in Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
fdl.texi
filter-for-doxygen
filter-params.pl
gdb.texinfo gdb: add a new 'maint info target-sections' command 2021-02-24 16:58:02 +00:00
gpl.texi
guile.texi Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
lpsrc.sed
Makefile.in Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
psrc.sed
python.texi gdb: return true in TuiWindow.is_valid only if TUI is enabled 2021-02-08 11:56:16 +00:00
refcard.tex Manual updates of copyright year range not covered by gdb/copyright.py 2021-01-01 12:13:21 +04:00
stabs.texinfo Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
stack_frame.eps
stack_frame.pdf
stack_frame.png
stack_frame.svg
stack_frame.txt