mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-09-10 23:57:03 +08:00
* gdb.base/callfuncs.exp: Fix indentation.
* lib/gdb.exp(gdb_expect): Set remote_suppress_flag if suppress_flag has been set. (gdb_step_for_stub): Check for gdb,use_breakpoint_for_stub target feature.
This commit is contained in:
@ -1,3 +1,12 @@
|
|||||||
|
Tue Sep 16 22:21:48 1997 Bob Manson <manson@charmed.cygnus.com>
|
||||||
|
|
||||||
|
* gdb.base/callfuncs.exp: Fix indentation.
|
||||||
|
|
||||||
|
* lib/gdb.exp(gdb_expect): Set remote_suppress_flag if
|
||||||
|
suppress_flag has been set.
|
||||||
|
(gdb_step_for_stub): Check for gdb,use_breakpoint_for_stub
|
||||||
|
target feature.
|
||||||
|
|
||||||
Mon Sep 15 15:43:17 1997 Bob Manson <manson@charmed.cygnus.com>
|
Mon Sep 15 15:43:17 1997 Bob Manson <manson@charmed.cygnus.com>
|
||||||
|
|
||||||
* gdb.stabs/weird.exp: Don't start gdb 'til after we've compiled
|
* gdb.stabs/weird.exp: Don't start gdb 'til after we've compiled
|
||||||
|
@ -879,7 +879,24 @@ proc gdb_expect { args } {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
global suppress_flag;
|
||||||
|
global remote_suppress_flag;
|
||||||
|
if [info exists remote_suppress_flag] {
|
||||||
|
set old_val $remote_suppress_flag;
|
||||||
|
}
|
||||||
|
if [info exists suppress_flag] {
|
||||||
|
if { $suppress_flag } {
|
||||||
|
set remote_suppress_flag 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
set code [catch {uplevel remote_expect host $gtimeout $expcode} string];
|
set code [catch {uplevel remote_expect host $gtimeout $expcode} string];
|
||||||
|
if [info exists old_val] {
|
||||||
|
set remote_suppress_flag $old_val;
|
||||||
|
} else {
|
||||||
|
if [info exists remote_suppress_flag] {
|
||||||
|
unset remote_suppress_flag;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if {$code == 1} {
|
if {$code == 1} {
|
||||||
global errorInfo errorCode;
|
global errorInfo errorCode;
|
||||||
@ -1048,58 +1065,58 @@ proc setup_xfail_format { format } {
|
|||||||
proc gdb_step_for_stub { } {
|
proc gdb_step_for_stub { } {
|
||||||
global gdb_prompt;
|
global gdb_prompt;
|
||||||
|
|
||||||
if [target_info exists gdb_stub_step_command] {
|
if ![target_info exists gdb,use_breakpoint_for_stub] {
|
||||||
set command [target_info gdb_stub_step_command];
|
if [target_info exists gdb_stub_step_command] {
|
||||||
} else {
|
set command [target_info gdb_stub_step_command];
|
||||||
set command "step";
|
} else {
|
||||||
}
|
set command "step";
|
||||||
send_gdb "${command}\n";
|
|
||||||
set tries 0;
|
|
||||||
gdb_expect 60 {
|
|
||||||
-re "(main.* at |.*in .*start).*$gdb_prompt" {
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
-re "libgloss/\[a-z\]*\[0-9\]*/stub.c" {
|
send_gdb "${command}\n";
|
||||||
send_gdb "where\n";
|
set tries 0;
|
||||||
gdb_expect {
|
gdb_expect 60 {
|
||||||
-re "main\[^\r\n\]*at \(\[^:]+\):\(\[0-9\]+\)" {
|
-re "(main.* at |.*in .*start).*$gdb_prompt" {
|
||||||
set file $expect_out(1,string);
|
return;
|
||||||
set linenum [expr $expect_out(2,string) + 1];
|
|
||||||
set breakplace "${file}:${linenum}";
|
|
||||||
}
|
|
||||||
default {}
|
|
||||||
}
|
}
|
||||||
send_gdb "break ${breakplace}\n";
|
-re ".*$gdb_prompt" {
|
||||||
gdb_expect 60 {
|
incr tries;
|
||||||
-re "Breakpoint (\[0-9\]+) at.*$gdb_prompt" {
|
if { $tries == 5 } {
|
||||||
set breakpoint $expect_out(1,string);
|
fail "stepping out of breakpoint function";
|
||||||
}
|
|
||||||
-re "Breakpoint (\[0-9\]+): file.*$gdb_prompt" {
|
|
||||||
set breakpoint $expect_out(1,string);
|
|
||||||
}
|
|
||||||
default {}
|
|
||||||
}
|
|
||||||
send_gdb "continue\n";
|
|
||||||
gdb_expect 60 {
|
|
||||||
-re "Breakpoint ${breakpoint},.*$gdb_prompt" {
|
|
||||||
gdb_test "delete $breakpoint" ".*" "";
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
default {}
|
send_gdb "${command}\n";
|
||||||
|
exp_continue;
|
||||||
}
|
}
|
||||||
}
|
default {
|
||||||
-re ".*$gdb_prompt" {
|
|
||||||
incr tries;
|
|
||||||
if { $tries == 5 } {
|
|
||||||
fail "stepping out of breakpoint function";
|
fail "stepping out of breakpoint function";
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
send_gdb "${command}\n";
|
|
||||||
exp_continue;
|
|
||||||
}
|
|
||||||
default {
|
|
||||||
fail "stepping out of breakpoint function";
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
send_gdb "where\n";
|
||||||
|
gdb_expect {
|
||||||
|
-re "main\[^\r\n\]*at \(\[^:]+\):\(\[0-9\]+\)" {
|
||||||
|
set file $expect_out(1,string);
|
||||||
|
set linenum [expr $expect_out(2,string) + 1];
|
||||||
|
set breakplace "${file}:${linenum}";
|
||||||
|
}
|
||||||
|
default {}
|
||||||
|
}
|
||||||
|
send_gdb "break ${breakplace}\n";
|
||||||
|
gdb_expect 60 {
|
||||||
|
-re "Breakpoint (\[0-9\]+) at.*$gdb_prompt" {
|
||||||
|
set breakpoint $expect_out(1,string);
|
||||||
|
}
|
||||||
|
-re "Breakpoint (\[0-9\]+): file.*$gdb_prompt" {
|
||||||
|
set breakpoint $expect_out(1,string);
|
||||||
|
}
|
||||||
|
default {}
|
||||||
|
}
|
||||||
|
send_gdb "continue\n";
|
||||||
|
gdb_expect 60 {
|
||||||
|
-re "Breakpoint ${breakpoint},.*$gdb_prompt" {
|
||||||
|
gdb_test "delete $breakpoint" ".*" "";
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
default {}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user