mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-24 12:23:31 +08:00
[gdb/testsuite] Fix full buffer in gdb.rust/dwindex.exp
On ubuntu 18.04.5, I run into: ... (gdb) mt print objfiles dwindex^M ^M Object file build/gdb/testsuite/outputs/gdb.rust/dwindex/dwindex: \ Objfile at 0x55dab0b87a50, bfd at 0x55dab0b0cfa0, 1095 minsyms^M ^M Psymtabs:^M vendor/compiler_builtins/src/int/specialized_div_rem/mod.rs at 0x55dab0db0720^M ... library/std/src/sys/unix/stdio.rs at 0x55dab0d96320^M ERROR: internal buffer is full. UNRESOLVED: gdb.rust/dwindex.exp: check if index present ... Fix this by using -lbl in proc ensure_gdb_index. Tested on x86_64-linux.
This commit is contained in:
@ -7917,22 +7917,36 @@ proc add_gdb_index { program {style ""} } {
|
|||||||
# string (the default) means .gdb_index; "-dwarf-5" means .debug_names.
|
# string (the default) means .gdb_index; "-dwarf-5" means .debug_names.
|
||||||
|
|
||||||
proc ensure_gdb_index { binfile {style ""} } {
|
proc ensure_gdb_index { binfile {style ""} } {
|
||||||
|
global decimal
|
||||||
|
|
||||||
set testfile [file tail $binfile]
|
set testfile [file tail $binfile]
|
||||||
set test "check if index present"
|
set test "check if index present"
|
||||||
gdb_test_multiple "mt print objfiles ${testfile}" $test {
|
set has_index 0
|
||||||
-re -wrap "gdb_index.*" {
|
gdb_test_multiple "mt print objfiles ${testfile}" $test -lbl {
|
||||||
|
-re "\r\n\\.gdb_index: version ${decimal}(?=\r\n)" {
|
||||||
|
set has_index 1
|
||||||
|
gdb_test_lines "" $gdb_test_name ".*"
|
||||||
|
}
|
||||||
|
-re "\r\n\\.debug_names: exists(?=\r\n)" {
|
||||||
|
set has_index 1
|
||||||
|
gdb_test_lines "" $gdb_test_name ".*"
|
||||||
|
}
|
||||||
|
-re "\r\nPsymtabs:(?=\r\n)" {
|
||||||
|
gdb_test_lines "" $gdb_test_name ".*"
|
||||||
|
}
|
||||||
|
-re -wrap "" {
|
||||||
|
fail $gdb_test_name
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if { $has_index } {
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
-re -wrap "debug_names.*" {
|
|
||||||
return 0
|
if { [add_gdb_index $binfile $style] == "1" } {
|
||||||
}
|
|
||||||
-re -wrap "Psymtabs.*" {
|
|
||||||
if { [add_gdb_index $binfile $style] != "1" } {
|
|
||||||
return -1
|
|
||||||
}
|
|
||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
}
|
|
||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user