mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-24 20:28:28 +08:00
gdb/testsuite: Make use of exec_has_index_section function
Make use of exec_has_index_section library function rather than manually checking in the 'maintenance info sections' output. Should make no difference to the test results, just makes the code easier to read. gdb/testsuite/ChangeLog: * gdb.base/maint.exp: Use exec_has_index_section.
This commit is contained in:
@ -1,3 +1,7 @@
|
||||
2019-09-12 Andrew Burgess <andrew.burgess@embecosm.com>
|
||||
|
||||
* gdb.base/maint.exp: Use exec_has_index_section.
|
||||
|
||||
2019-09-12 Andrew Burgess <andrew.burgess@embecosm.com>
|
||||
|
||||
* gdb.base/maint.exp: Add test for 'maint info sections'.
|
||||
|
@ -127,18 +127,7 @@ gdb_test_multiple "maint info sections" $test {
|
||||
}
|
||||
|
||||
# If we're using .gdb_index or .debug_names there will be no psymtabs.
|
||||
set have_gdb_index 0
|
||||
gdb_test_multiple "maint info sections .gdb_index .debug_names" "check for .gdb_index" {
|
||||
-re ": \\.gdb_index .*\r\n$gdb_prompt $" {
|
||||
set have_gdb_index 1
|
||||
}
|
||||
-re ": \\.debug_names .*\r\n$gdb_prompt $" {
|
||||
set have_gdb_index 1
|
||||
}
|
||||
-re ".*$gdb_prompt $" {
|
||||
;# Nothing to do, present to avoid a FAIL.
|
||||
}
|
||||
}
|
||||
set have_gdb_index [ exec_has_index_section ${binfile} ]
|
||||
|
||||
# There also won't be any psymtabs if we read the index from the index cache.
|
||||
# We can detect this by looking if the index-cache is enabled and if the number
|
||||
|
Reference in New Issue
Block a user