diff options
author | Tom Tromey <tom@tromey.com> | 2023-10-23 16:44:53 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2023-11-05 12:32:34 -0700 |
commit | 91874afabcd6491a00c4b6b79ac21c2b23061c36 (patch) | |
tree | 5e811530b9c2958aeaa51c2a71e367fab4e93587 /gdb/testsuite | |
parent | 0a845aef62b8813275616bd399e8fca679161cfc (diff) | |
download | fsf-binutils-gdb-91874afabcd6491a00c4b6b79ac21c2b23061c36.zip fsf-binutils-gdb-91874afabcd6491a00c4b6b79ac21c2b23061c36.tar.gz fsf-binutils-gdb-91874afabcd6491a00c4b6b79ac21c2b23061c36.tar.bz2 |
Pre-read DWZ file in DWARF reader
While working on background reading of DWARF, I came across the
DWZ-reading code. This code can query the user (via the debuginfod
support) -- something that cannot be done off the main thread.
Looking into it, I realized that this code can be run much earlier,
avoiding this problem. Digging a bit deeper, I also found a
discrepancy here between how the DWARF reader works in "readnow" mode
as compared to the normal modes.
This patch cleans this up by trying to read the DWZ file earlier, and
also by having the DWARF reader convert any exception here into a
warning. This unifies the various cases, but also makes it so that
errors do not prevent gdb from continuing on to the extent possible.
Regression tested on x86-64 Fedora 38.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r-- | gdb/testsuite/gdb.dwarf2/dwzbuildid.exp | 7 | ||||
-rw-r--r-- | gdb/testsuite/gdb.dwarf2/no-gnu-debuglink.exp | 4 |
2 files changed, 2 insertions, 9 deletions
diff --git a/gdb/testsuite/gdb.dwarf2/dwzbuildid.exp b/gdb/testsuite/gdb.dwarf2/dwzbuildid.exp index 76e3a7d..3814323 100644 --- a/gdb/testsuite/gdb.dwarf2/dwzbuildid.exp +++ b/gdb/testsuite/gdb.dwarf2/dwzbuildid.exp @@ -142,13 +142,6 @@ proc do_test {} { gdb_load ${::binfile}-${::testname} - if { $::testname == "mismatch" && [readnow] } { - # Main is found in the minimal symbols. When using readnow, a - # failure to read the dwarf also causes the minimal symbols to be - # unavailable. - # Setup a kfail for "FAIL: gdb_breakpoint: set breakpoint at main". - setup_kfail "symtab/26797" *-*-* - } if {![runto_main]} { return } diff --git a/gdb/testsuite/gdb.dwarf2/no-gnu-debuglink.exp b/gdb/testsuite/gdb.dwarf2/no-gnu-debuglink.exp index 538004e..a76136f 100644 --- a/gdb/testsuite/gdb.dwarf2/no-gnu-debuglink.exp +++ b/gdb/testsuite/gdb.dwarf2/no-gnu-debuglink.exp @@ -37,8 +37,8 @@ if { [build_executable $testfile.exp $testfile [list $srcfile $asm_file]] } { clean_restart -set msg "\r\ncould not find '\.gnu_debugaltlink' file for \[^\r\n\]*" +set msg "\r\nwarning: could not find '\.gnu_debugaltlink' file for \[^\r\n\]*" gdb_test "file $binfile" "$msg" "file command" set question "Load new symbol table from .*\? .y or n. " -gdb_test "file $binfile" "$msg" "file command, again" $question "y" +gdb_test "file $binfile" "" "file command, again" $question "y" |