* gdb.base/remote.exp (get_sizeof): Remove.
* gdb.base/long_long.exp (get_valueof, get_sizeof): Remove. * gdb.base/dfp-test.exp (get_valueof, get_sizeof): Remove. * gdb.base/sizeof.exp (get_valueof, get_sizeof): Remove. * lib/gdb.exp (get_valueof): Move from long_long.exp. (get_sizeof): Likewise.
This commit is contained in:
parent
0eb6d79470
commit
7065b901d5
@ -1,3 +1,12 @@
|
||||
2009-02-13 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* gdb.base/remote.exp (get_sizeof): Remove.
|
||||
* gdb.base/long_long.exp (get_valueof, get_sizeof): Remove.
|
||||
* gdb.base/dfp-test.exp (get_valueof, get_sizeof): Remove.
|
||||
* gdb.base/sizeof.exp (get_valueof, get_sizeof): Remove.
|
||||
* lib/gdb.exp (get_valueof): Move from long_long.exp.
|
||||
(get_sizeof): Likewise.
|
||||
|
||||
2009-02-12 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
PR fortran/9806
|
||||
|
@ -43,26 +43,6 @@ if ![runto_main] then {
|
||||
continue
|
||||
}
|
||||
|
||||
# Detect the size of the target's basic types (from gdb.base/long_long.exp).
|
||||
|
||||
proc get_valueof { fmt exp default } {
|
||||
global gdb_prompt
|
||||
send_gdb "print${fmt} ${exp}\n"
|
||||
gdb_expect {
|
||||
-re "\\$\[0-9\]* = (\[-\]*\[0-9\]*).*$gdb_prompt $" {
|
||||
set val $expect_out(1,string)
|
||||
}
|
||||
timeout {
|
||||
set val ${default}
|
||||
}
|
||||
}
|
||||
return ${val}
|
||||
}
|
||||
|
||||
proc get_sizeof { type default } {
|
||||
return [get_valueof "/d" "sizeof (${type})" $default]
|
||||
}
|
||||
|
||||
set sizeof_long [get_sizeof "long" 4]
|
||||
|
||||
proc d32_set_tests {} {
|
||||
|
@ -74,26 +74,6 @@ gdb_expect {
|
||||
|
||||
# Detect the size of the target's basic types.
|
||||
|
||||
proc get_valueof { fmt exp default } {
|
||||
global gdb_prompt
|
||||
send_gdb "print${fmt} ${exp}\n"
|
||||
gdb_expect {
|
||||
-re "\\$\[0-9\]* = (\[-\]*\[0-9\]*).*$gdb_prompt $" {
|
||||
set val $expect_out(1,string)
|
||||
pass "get value of ${exp} ($val)"
|
||||
}
|
||||
timeout {
|
||||
set size ${default}
|
||||
fail "get value of ${exp} (timeout)"
|
||||
}
|
||||
}
|
||||
return ${val}
|
||||
}
|
||||
|
||||
proc get_sizeof { type default } {
|
||||
return [get_valueof "/d" "sizeof (${type})" $default]
|
||||
}
|
||||
|
||||
set sizeof_char [get_sizeof "char" 1]
|
||||
set sizeof_short [get_sizeof "short" 2]
|
||||
set sizeof_int [get_sizeof "int" 4]
|
||||
|
@ -125,22 +125,6 @@ gdb_load_timed $binfile "limit" 0
|
||||
# Query GDB for the size of various types
|
||||
#
|
||||
|
||||
proc get_sizeof { type default } {
|
||||
global gdb_prompt
|
||||
send_gdb "print/d sizeof (${type})\n"
|
||||
gdb_expect {
|
||||
-re "\\$\[0-9\]* = (\[0-9\]*).*$gdb_prompt $" {
|
||||
set size $expect_out(1,string)
|
||||
pass "get sizeof ${type} ($size)"
|
||||
}
|
||||
timeout {
|
||||
set size ${default}
|
||||
fail "get sizeof ${type} (timeout)"
|
||||
}
|
||||
}
|
||||
return ${size}
|
||||
}
|
||||
|
||||
# Get the size of random_data table (defaults to 48K).
|
||||
set sizeof_random_data [get_sizeof "random_data" 48*1024]
|
||||
|
||||
|
@ -61,24 +61,6 @@ if ![runto_main] then {
|
||||
# Query GDB for the size of various types
|
||||
#
|
||||
|
||||
proc get_valueof { fmt exp default } {
|
||||
global gdb_prompt
|
||||
|
||||
set test "get valueof \"${exp}\""
|
||||
set val ${default}
|
||||
gdb_test_multiple "print${fmt} ${exp}" "$test" {
|
||||
-re "\\$\[0-9\]* = (\[-\]*\[0-9\]*).*$gdb_prompt $" {
|
||||
set val $expect_out(1,string)
|
||||
pass "$test ($val)"
|
||||
}
|
||||
}
|
||||
return ${val}
|
||||
}
|
||||
|
||||
proc get_sizeof { type default } {
|
||||
return [get_valueof "/d" "sizeof (${type})" $default]
|
||||
}
|
||||
|
||||
gdb_test "next"
|
||||
|
||||
set sizeof_char [get_sizeof "char" 1]
|
||||
|
@ -2878,3 +2878,26 @@ proc prepare_for_testing { testname executable {sources ""} {options {debug}}} {
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
proc get_valueof { fmt exp default } {
|
||||
global gdb_prompt
|
||||
|
||||
set test "get valueof \"${exp}\""
|
||||
set val ${default}
|
||||
gdb_test_multiple "print${fmt} ${exp}" "$test" {
|
||||
-re "\\$\[0-9\]* = (\[-\]*\[0-9\]*).*$gdb_prompt $" {
|
||||
set val $expect_out(1,string)
|
||||
pass "$test ($val)"
|
||||
}
|
||||
timeout {
|
||||
set size ${default}
|
||||
fail "get value of ${exp} (timeout)"
|
||||
}
|
||||
}
|
||||
return ${val}
|
||||
}
|
||||
|
||||
proc get_sizeof { type default } {
|
||||
return [get_valueof "/d" "sizeof (${type})" $default]
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user