- Backport upstream fix for assertion failure `SYMBOL_LANGUAGE (sym) == DICT_LANGUAGE (dict)->la_language' [swo#23712, rh#1560010] * Add patches from fedora 29 @ 4513f72 * Add patch to fix multidictionary.exp test-case OBS-URL: https://build.opensuse.org/request/show/668275 OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gdb?expand=0&rev=200
93 lines
3.3 KiB
Diff
93 lines
3.3 KiB
Diff
[gdb] Fix multidictionary.exp for gdb 8.2
|
|
|
|
---
|
|
gdb/testsuite/gdb.dwarf2/multidictionary.exp | 2 +-
|
|
gdb/testsuite/lib/gdb.exp | 25 ++++++++++++++++++++-----
|
|
2 files changed, 21 insertions(+), 6 deletions(-)
|
|
|
|
diff --git a/gdb/testsuite/gdb.dwarf2/multidictionary.exp b/gdb/testsuite/gdb.dwarf2/multidictionary.exp
|
|
index 5588ef2144..9b44035aeb 100644
|
|
--- a/gdb/testsuite/gdb.dwarf2/multidictionary.exp
|
|
+++ b/gdb/testsuite/gdb.dwarf2/multidictionary.exp
|
|
@@ -148,7 +148,7 @@ if {[build_executable $testfile.exp $testfile [list $asm_file $srcfile] {}] \
|
|
|
|
# We force the DIEs above to be read in via "-readnow".
|
|
gdb_spawn_with_cmdline_opts "-readnow"
|
|
-gdb_load $binfile
|
|
+gdb_load_no_done $binfile
|
|
|
|
# All we need to do is check whether GDB is alive. Without
|
|
# multidictionaries, it will either crash, assert, or throw an
|
|
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
|
|
index aef580b04d..f061af3b6c 100644
|
|
--- a/gdb/testsuite/lib/gdb.exp
|
|
+++ b/gdb/testsuite/lib/gdb.exp
|
|
@@ -1485,7 +1485,7 @@ proc default_gdb_exit {} {
|
|
# TODO: gdb.base/sepdebug.exp and gdb.stabs/weird.exp might be able to use
|
|
# this if they can get more information set.
|
|
|
|
-proc gdb_file_cmd { arg } {
|
|
+proc gdb_file_cmd_1 { arg done } {
|
|
global gdb_prompt
|
|
global verbose
|
|
global GDB
|
|
@@ -1523,17 +1523,17 @@ proc gdb_file_cmd { arg } {
|
|
|
|
send_gdb "file $arg\n"
|
|
gdb_expect 120 {
|
|
- -re "Reading symbols from.*LZMA support was disabled.*done.*$gdb_prompt $" {
|
|
+ -re "Reading symbols from.*LZMA support was disabled.*$done.*$gdb_prompt $" {
|
|
verbose "\t\tLoaded $arg into $GDB; .gnu_debugdata found but no LZMA available"
|
|
set gdb_file_cmd_debug_info "lzma"
|
|
return 0
|
|
}
|
|
- -re "Reading symbols from.*no debugging symbols found.*done.*$gdb_prompt $" {
|
|
+ -re "Reading symbols from.*no debugging symbols found.*$done.*$gdb_prompt $" {
|
|
verbose "\t\tLoaded $arg into $GDB with no debugging symbols"
|
|
set gdb_file_cmd_debug_info "nodebug"
|
|
return 0
|
|
}
|
|
- -re "Reading symbols from.*done.*$gdb_prompt $" {
|
|
+ -re "Reading symbols from.*$done.*$gdb_prompt $" {
|
|
verbose "\t\tLoaded $arg into $GDB"
|
|
set gdb_file_cmd_debug_info "debug"
|
|
return 0
|
|
@@ -1541,7 +1541,7 @@ proc gdb_file_cmd { arg } {
|
|
-re "Load new symbol table from \".*\".*y or n. $" {
|
|
send_gdb "y\n"
|
|
gdb_expect 120 {
|
|
- -re "Reading symbols from.*done.*$gdb_prompt $" {
|
|
+ -re "Reading symbols from.*$done.*$gdb_prompt $" {
|
|
verbose "\t\tLoaded $arg with new symbol table into $GDB"
|
|
set gdb_file_cmd_debug_info "debug"
|
|
return 0
|
|
@@ -1583,6 +1583,14 @@ proc gdb_file_cmd { arg } {
|
|
}
|
|
}
|
|
|
|
+proc gdb_file_cmd { arg } {
|
|
+ gdb_file_cmd_1 $arg "done"
|
|
+}
|
|
+
|
|
+proc gdb_file_cmd_no_done { arg } {
|
|
+ gdb_file_cmd_1 $arg ""
|
|
+}
|
|
+
|
|
# Default gdb_spawn procedure.
|
|
|
|
proc default_gdb_spawn { } {
|
|
@@ -4511,6 +4519,13 @@ proc gdb_load { arg } {
|
|
return 0
|
|
}
|
|
|
|
+proc gdb_load_no_done { arg } {
|
|
+ if { $arg != "" } {
|
|
+ return [gdb_file_cmd_no_done $arg]
|
|
+ }
|
|
+ return 0
|
|
+}
|
|
+
|
|
# gdb_reload -- load a file into the target. Called before "running",
|
|
# either the first time or after already starting the program once,
|
|
# for remote targets. Most files that override gdb_load should now
|