gdb/gdb-testsuite-fix-gdb.mi-mi-sym-info.exp-on-opensuse-tumbleweed.patch
Tom de Vries a6077b67a9 - Patches added:
* gdb-testsuite-fix-gdb.mi-mi-sym-info.exp-on-opensuse-tumbleweed.patch
- Maintenance script qa.sh:
  * Add PR26873 kfails.

OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gdb?expand=0&rev=334
2022-09-29 06:03:26 +00:00

40 lines
1.2 KiB
Diff

[gdb/testsuite] Fix gdb.mi/mi-sym-info.exp on openSUSE Tumbleweed
On openSUSE Tumbleweed, I run into:
...
FAIL: gdb.mi/mi-sym-info.exp: List all functions from debug information only
...
The problem is in matching this string:
...
{name="_start",type="void (void)",description="void _start(void);"}
...
using regexp fun_re, which requires a line field:
...
set fun_re \
"\{line=\"$decimal\",name=${qstr},type=${qstr},description=${qstr}\}"
...
Fix this by making the line field optional in fun_re.
Tested on x86_64-linux.
---
gdb/testsuite/gdb.mi/mi-sym-info.exp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/gdb/testsuite/gdb.mi/mi-sym-info.exp b/gdb/testsuite/gdb.mi/mi-sym-info.exp
index 7b936061759..2f723ece882 100644
--- a/gdb/testsuite/gdb.mi/mi-sym-info.exp
+++ b/gdb/testsuite/gdb.mi/mi-sym-info.exp
@@ -38,7 +38,8 @@ mi_clean_restart $binfile
mi_runto_main
set qstr "\"\[^\"\]+\""
-set fun_re "\{line=\"$decimal\",name=${qstr},type=${qstr},description=${qstr}\}"
+set fun_re \
+ "\{(?:line=\"$decimal\",)?name=${qstr},type=${qstr},description=${qstr}\}"
set type_re "\{(?:line=\"$decimal\",)*name=${qstr}\}"
set sym_list "\\\[${fun_re}(?:,$fun_re)*\\\]"
set type_sym_list "\\\[${type_re}(?:,$type_re)*\\\]"