mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-23 03:29:47 +08:00
[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.
This commit is contained in:
@ -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)*\\\]"
|
||||
|
Reference in New Issue
Block a user