mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-05 23:26:51 +08:00
* gdb.base/maint.exp: Handle testing with .gdb_index.
This commit is contained in:
@ -1,3 +1,7 @@
|
||||
2012-12-19 Doug Evans <dje@google.com>
|
||||
|
||||
* gdb.base/maint.exp: Handle testing with .gdb_index.
|
||||
|
||||
2012-12-19 Joel Brobecker <brobecker@adacore.com>
|
||||
|
||||
* gdb.arch/mips-octeon-bbit.exp: Fix copyright header from
|
||||
|
@ -92,6 +92,16 @@ if ![runto_main] then {
|
||||
perror "tests suppressed"
|
||||
}
|
||||
|
||||
# If we're using .gdb_index there will be no psymtabs.
|
||||
set have_gdb_index 0
|
||||
gdb_test_multiple "maint info sections .gdb_index" "check for .gdb_index" {
|
||||
-re ": .gdb_index.*$gdb_prompt $" {
|
||||
set have_gdb_index 1
|
||||
}
|
||||
-re ".*$gdb_prompt $" {
|
||||
;# Nothing to do, present to avoid a FAIL.
|
||||
}
|
||||
}
|
||||
|
||||
#
|
||||
# this command does not produce any output
|
||||
@ -150,7 +160,7 @@ if [istarget "*-*-cygwin*"] {
|
||||
|
||||
send_gdb "maint print statistics\n"
|
||||
gdb_expect {
|
||||
-re "Statistics for\[^\n\r\]*break\[^\n\r\]*:\r\n Number of \"minimal\" symbols read: $decimal\r\n Number of \"partial\" symbols read: $decimal\r\n Number of \"full\" symbols read: $decimal\r\n Number of \"types\" defined: $decimal\r\n Number of psym tables \\(not yet expanded\\): $decimal\r\n Number of symbol tables: $decimal\r\n Number of symbol tables with line tables: $decimal\r\n Number of symbol tables with blockvectors: $decimal\r\n Total memory used for objfile obstack: $decimal\r\n Total memory used for BFD obstack: $decimal\r\n Total memory used for psymbol cache: $decimal\r\n Total memory used for macro cache: $decimal\r\n Total memory used for file name cache: $decimal\r\n" {
|
||||
-re "Statistics for\[^\n\r\]*break\[^\n\r\]*:\r\n Number of \"minimal\" symbols read: $decimal\r\n( Number of \"partial\" symbols read: $decimal\r\n)? Number of \"full\" symbols read: $decimal\r\n Number of \"types\" defined: $decimal\r\n( Number of psym tables \\(not yet expanded\\): $decimal\r\n)?( Number of unread CUs: $decimal\r\n)? Number of symbol tables: $decimal\r\n Number of symbol tables with line tables: $decimal\r\n Number of symbol tables with blockvectors: $decimal\r\n Total memory used for objfile obstack: $decimal\r\n Total memory used for BFD obstack: $decimal\r\n Total memory used for psymbol cache: $decimal\r\n Total memory used for macro cache: $decimal\r\n Total memory used for file name cache: $decimal\r\n" {
|
||||
gdb_expect {
|
||||
-re "$gdb_prompt $" {
|
||||
pass "maint print statistics"
|
||||
@ -198,17 +208,18 @@ proc maint_pass_if {val name} {
|
||||
}
|
||||
|
||||
maint_pass_if $header "maint print objfiles: header"
|
||||
maint_pass_if $psymtabs "maint print objfiles: psymtabs"
|
||||
if { ! $have_gdb_index } {
|
||||
maint_pass_if $psymtabs "maint print objfiles: psymtabs"
|
||||
}
|
||||
maint_pass_if $symtabs "maint print objfiles: symtabs"
|
||||
|
||||
gdb_test "maint print psymbols" \
|
||||
"print-psymbols takes an output file name and optional symbol file name" \
|
||||
"maint print psymbols w/o args"
|
||||
|
||||
|
||||
|
||||
send_gdb "maint print psymbols psymbols_output ${srcdir}/${subdir}/${srcfile}\n"
|
||||
gdb_expect {
|
||||
if { ! $have_gdb_index } {
|
||||
send_gdb "maint print psymbols psymbols_output ${srcdir}/${subdir}/${srcfile}\n"
|
||||
gdb_expect {
|
||||
-re "^maint print psymbols psymbols_output \[^\n\]*\r\n$gdb_prompt $" {
|
||||
send_gdb "shell ls psymbols_output\n"
|
||||
gdb_expect {
|
||||
@ -237,6 +248,7 @@ gdb_expect {
|
||||
}
|
||||
-re ".*$gdb_prompt $" { fail "maint print psymbols" }
|
||||
timeout { fail "(timeout) maint print psymbols" }
|
||||
}
|
||||
}
|
||||
|
||||
gdb_test "maint print msymbols" \
|
||||
|
Reference in New Issue
Block a user