Dump debug names index

Message ID 20250304183716.776589-1-tom@tromey.com
State New
Headers
Series Dump debug names index |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_gdb_build--master-aarch64 success Build passed
linaro-tcwg-bot/tcwg_gdb_build--master-arm success Build passed
linaro-tcwg-bot/tcwg_gdb_check--master-arm success Test passed
linaro-tcwg-bot/tcwg_gdb_check--master-aarch64 success Test passed

Commit Message

Tom Tromey March 4, 2025, 6:37 p.m. UTC
  This changes the .debug_names reader to dump the contents of the
index.  This follows what the cooked index does, and also fixes a
couple of test failures when run with the debug-names board:
forward-spec-inter-cu.exp and backward-spec-inter-cu.exp.
---
 gdb/dwarf2/read-debug-names.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Simon Marchi March 5, 2025, 3:22 a.m. UTC | #1
On 2025-03-04 13:37, Tom Tromey wrote:
> This changes the .debug_names reader to dump the contents of the
> index.  This follows what the cooked index does, and also fixes a
> couple of test failures when run with the debug-names board:
> forward-spec-inter-cu.exp and backward-spec-inter-cu.exp.
> ---
>  gdb/dwarf2/read-debug-names.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/gdb/dwarf2/read-debug-names.c b/gdb/dwarf2/read-debug-names.c
> index 2cd32d09abe..6e9ea667c3a 100644
> --- a/gdb/dwarf2/read-debug-names.c
> +++ b/gdb/dwarf2/read-debug-names.c
> @@ -41,7 +41,7 @@ struct dwarf2_debug_names_index : public cooked_index_functions
>    void dump (struct objfile *objfile) override
>    {
>      gdb_printf (".debug_names: exists\n");
> -    /* This could call the superclass method if that's useful.  */
> +    cooked_index_functions::dump (objfile);
>    }
>  };
>  

Approved-By: Simon Marchi <simon.marchi@efficios.com>

Simon
  

Patch

diff --git a/gdb/dwarf2/read-debug-names.c b/gdb/dwarf2/read-debug-names.c
index 2cd32d09abe..6e9ea667c3a 100644
--- a/gdb/dwarf2/read-debug-names.c
+++ b/gdb/dwarf2/read-debug-names.c
@@ -41,7 +41,7 @@  struct dwarf2_debug_names_index : public cooked_index_functions
   void dump (struct objfile *objfile) override
   {
     gdb_printf (".debug_names: exists\n");
-    /* This could call the superclass method if that's useful.  */
+    cooked_index_functions::dump (objfile);
   }
 };