aboutsummaryrefslogtreecommitdiff
path: root/gdb/NEWS
diff options
context:
space:
mode:
authorAndrew Burgess <andrew.burgess@embecosm.com>2021-02-12 16:10:56 +0000
committerAndrew Burgess <andrew.burgess@embecosm.com>2021-02-24 16:58:02 +0000
commit02a79309925c71591d825f8fc4e2b79ce0faa45b (patch)
tree45cef59400fc764b30f655e1933f46b30d2ed087 /gdb/NEWS
parent895b7b4e4bed9eee9d4a3d55bee876055736bfd3 (diff)
downloadgdb-02a79309925c71591d825f8fc4e2b79ce0faa45b.zip
gdb-02a79309925c71591d825f8fc4e2b79ce0faa45b.tar.gz
gdb-02a79309925c71591d825f8fc4e2b79ce0faa45b.tar.bz2
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.
Diffstat (limited to 'gdb/NEWS')
-rw-r--r--gdb/NEWS3
1 files changed, 3 insertions, 0 deletions
diff --git a/gdb/NEWS b/gdb/NEWS
index 1dfbbc6..7f5a745 100644
--- a/gdb/NEWS
+++ b/gdb/NEWS
@@ -47,6 +47,9 @@ maintenance flush register-cache
maintenance flush dcache
A new command to flush the dcache.
+maintenance info target-sections
+ Print GDB's internal target sections table.
+
* Changed commands
break [PROBE_MODIFIER] [LOCATION] [thread THREADNUM]