This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[RFC] How to fix gdb.dwarf2/main-subprogram.exp with cc-with-gdb-index/cc-with-debug-names
- From: Tom de Vries <tdevries at suse dot de>
- To: gdb-patches at sourceware dot org
- Cc: Tom Tromey <tom at tromey dot com>, Pedro Alves <palves at redhat dot com>, Simon Marchi <simon dot marchi at polymtl dot ca>
- Date: Sun, 5 May 2019 13:42:18 +0200
- Subject: [RFC] How to fix gdb.dwarf2/main-subprogram.exp with cc-with-gdb-index/cc-with-debug-names
- References: <20190505102520.GA5031@delia>
[ was: Re: [PATCH][gdb/symtab] Support DW_AT_main_subprogram with
-readnow. ]
Hi,
DW_AT_main_subprogram is supported in normal mode (in
read_partial_die),and tested by test-case gdb.dwarf2/main-subprogram.exp.
DW_AT_main_subprogram is currently not supported in -readnow mode, but
I've submitted a fix for that (in read_func_scope).
Still, the test-case gdb.dwarf2/main-subprogram.exp fails with
executables that contain an index, either .gdb_index or .debug_names
(which is exercised by target boards cc-with-gdb-index and
cc-with-debug-names).
I wonder whether and if so, how this should be fixed.
ISTM that we want gdb to behave the same, functionality-wise, in normal
mode, -readnow mode, and with an index.
AFAIU, to fix this, then when loading an executable with index into gdb
and issuing the start command, we'll need to read the debug info until
finding the DW_AT_main_subprogram, but reading the debug info scanning
just for one attribute seems rather inefficient to me.
Any comments or advice here?
Thanks,
- Tom