* breakpoint.c (print_one_breakpoint_location): In MI
mode, report the location string the breakpoint was originally created with.
This commit is contained in:
parent
879d3736b8
commit
d24317b480
@ -1,3 +1,9 @@
|
||||
2008-04-24 Vladimir Prus <vladimir@codesourcery.com>
|
||||
|
||||
* breakpoint.c (print_one_breakpoint_location): In MI
|
||||
mode, report the location string the breakpoint was
|
||||
originally created with.
|
||||
|
||||
2008-04-23 Maxim Grigoriev <maxim2405@gmail.com>
|
||||
|
||||
* Makefile.in (xtensa-tdep.o): Update dependencies.
|
||||
|
@ -3696,6 +3696,15 @@ print_one_breakpoint_location (struct breakpoint *b,
|
||||
print_command_lines (uiout, l, 4);
|
||||
do_cleanups (script_chain);
|
||||
}
|
||||
|
||||
if (ui_out_is_mi_like_p (uiout) && !part_of_multiple)
|
||||
{
|
||||
if (b->addr_string)
|
||||
ui_out_field_string (uiout, "original-location", b->addr_string);
|
||||
else if (b->exp_string)
|
||||
ui_out_field_string (uiout, "original-location", b->exp_string);
|
||||
}
|
||||
|
||||
do_cleanups (bkpt_chain);
|
||||
do_cleanups (old_chain);
|
||||
}
|
||||
|
@ -1,5 +1,24 @@
|
||||
2008-04-24 Vladimir Prus <vladimir@codesourcery.com>
|
||||
|
||||
* lib/mi-support.exp (mi_runto_helper): Adjust
|
||||
for the original-location field.
|
||||
(mi_create_breakpoint, mi_list_breakpoints): New.
|
||||
* gdb.mi/mi-break.exp: Adjust.
|
||||
* gdb.mi/mi2-break.exp: Adjust.
|
||||
* gdb.mi/mi-pending.exp: Adjust.
|
||||
* gdb.mi/mi-simplerun.exp: Adjust.
|
||||
* gdb.mi/mi2-simplerun.exp: Adjust.
|
||||
* gdb.mi/mi-syn-frame.exp: Adjust.
|
||||
* gdb.mi/mi2-syn-frame.exp: Adjust.
|
||||
* gdb.mi/mi-until.exp: Adjust.
|
||||
* gdb.mi/mi2-until.exp: Adjust.
|
||||
* gdb.mi/mi-var-display.exp: Adjust.
|
||||
* gdb.mi/mi2-var-display.exp: Adjust.
|
||||
* gdb.mi/mi-watch.exp: Adjust.
|
||||
* gdb.mi/mi2-watch.exp: Adjust.
|
||||
|
||||
2008-04-23 Paolo Bonzini <bonzini@gnu.org>
|
||||
|
||||
|
||||
* aclocal.m4: Add override.m4.
|
||||
* configure: Regenerate.
|
||||
|
||||
@ -13,7 +32,7 @@
|
||||
|
||||
* gdb.dwarf2/dw2-compressed.S, gdb.dwarf2/dw2-compressed.exp: New
|
||||
files.
|
||||
|
||||
|
||||
2008-04-18 Joel Brobecker <brobecker@adacore.com>
|
||||
|
||||
* gdb.ada/atomic_enum: New test program.
|
||||
|
@ -78,25 +78,21 @@ proc test_tbreak_creation_and_listing {} {
|
||||
# -break-insert -t srcfile:$line_callee4_head
|
||||
# -break-list
|
||||
|
||||
mi_gdb_test "222-break-insert -t main" \
|
||||
"222\\^done,bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"del\",enabled=\"y\",addr=\"$hex\",func=\"main\",file=\".*basics.c\",${fullname},line=\"$line_main_body\",times=\"0\"\}" \
|
||||
mi_create_breakpoint "-t main" 1 del main ".*basics.c" $line_main_body $hex \
|
||||
"break-insert -t operation"
|
||||
|
||||
mi_gdb_test "333-break-insert -t basics.c:callee2" \
|
||||
"333\\^done,bkpt=\{number=\"2\",type=\"breakpoint\",disp=\"del\",enabled=\"y\",addr=\"$hex\",func=\"callee2\",file=\".*basics.c\",${fullname},line=\"$line_callee2_body\",times=\"0\"\}" \
|
||||
mi_create_breakpoint "-t basics.c:callee2" 2 del callee2 ".*basics.c" $line_callee2_body $hex \
|
||||
"insert temp breakpoint at basics.c:callee2"
|
||||
|
||||
mi_gdb_test "444-break-insert -t basics.c:$line_callee3_head" \
|
||||
"444\\^done,bkpt=\{number=\"3\",type=\"breakpoint\",disp=\"del\",enabled=\"y\",addr=\"$hex\",func=\"callee3\",file=\".*basics.c\",${fullname},line=\"$line_callee3_body\",times=\"0\"\}" \
|
||||
mi_create_breakpoint "-t basics.c:$line_callee3_head" 3 del callee3 ".*basics.c" $line_callee3_body $hex \
|
||||
"insert temp breakpoint at basics.c:\$line_callee3_head"
|
||||
|
||||
# Getting the quoting right is tricky. That is "\"<file>\":$line_callee4_head"
|
||||
mi_gdb_test "555-break-insert -t \"\\\"${srcfile}\\\":$line_callee4_head\"" \
|
||||
"555\\^done,bkpt=\{number=\"4\",type=\"breakpoint\",disp=\"del\",enabled=\"y\",addr=\"$hex\",func=\"callee4\",file=\".*basics.c\",${fullname},line=\"$line_callee4_body\",times=\"0\"\}" \
|
||||
mi_create_breakpoint "-t \"\\\"${srcfile}\\\":$line_callee4_head\"" 4 del callee4 ".*basics.c" $line_callee4_body $hex \
|
||||
"insert temp breakpoint at \"<fullfilename>\":\$line_callee4_head"
|
||||
|
||||
mi_gdb_test "666-break-list" \
|
||||
"666\\\^done,BreakpointTable=\{nr_rows=\".\",nr_cols=\".\",hdr=\\\[\{width=\".*\",alignment=\".*\",col_name=\"number\",colhdr=\"Num\"\}.*colhdr=\"Type\".*colhdr=\"Disp\".*colhdr=\"Enb\".*colhdr=\"Address\".*colhdr=\"What\".*\\\],body=\\\[bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"del\",enabled=\"y\",addr=\"$hex\",func=\"main\",file=\".*basics.c\",${fullname},line=\"$line_main_body\",times=\"0\"\}.*\\\]\}" \
|
||||
"666\\\^done,BreakpointTable=\{nr_rows=\".\",nr_cols=\".\",hdr=\\\[\{width=\".*\",alignment=\".*\",col_name=\"number\",colhdr=\"Num\"\}.*colhdr=\"Type\".*colhdr=\"Disp\".*colhdr=\"Enb\".*colhdr=\"Address\".*colhdr=\"What\".*\\\],body=\\\[bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"del\",enabled=\"y\",addr=\"$hex\",func=\"main\",file=\".*basics.c\",${fullname},line=\"$line_main_body\",times=\"0\",original-location=\".*\"\}.*\\\]\}" \
|
||||
"list of breakpoints"
|
||||
|
||||
mi_gdb_test "777-break-delete" \
|
||||
|
@ -64,7 +64,7 @@ if [target_info exists gdb_stub] {
|
||||
|
||||
# Set pending breakpoint via MI
|
||||
mi_gdb_test "-break-insert -f pendfunc1" \
|
||||
".*\\^done,bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"<PENDING>\",pending=\"pendfunc1\",times=\"0\"\}"\
|
||||
".*\\^done,bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"<PENDING>\",pending=\"pendfunc1\",times=\"0\",original-location=\"pendfunc1\"\}"\
|
||||
"MI pending breakpoint on pendfunc1"
|
||||
|
||||
mi_run_cmd
|
||||
|
@ -68,24 +68,20 @@ proc test_breakpoints_creation_and_listing {} {
|
||||
# -break-disable
|
||||
# -break-info
|
||||
|
||||
mi_gdb_test "200-break-insert main" \
|
||||
"200\\^done,bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"main\",file=\".*basics.c\",line=\"$line_main_body\",times=\"0\"\}" \
|
||||
mi_create_breakpoint "main" 1 keep main ".*basics.c" $line_main_body $hex \
|
||||
"break-insert operation"
|
||||
|
||||
mi_gdb_test "201-break-insert basics.c:callee2" \
|
||||
"201\\^done,bkpt=\{number=\"2\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"callee2\",file=\".*basics.c\",line=\"$line_callee2_body\",times=\"0\"\}" \
|
||||
mi_create_breakpoint "basics.c:callee2" 2 keep callee2 ".*basics.c" $line_callee2_body $hex \
|
||||
"insert breakpoint at basics.c:callee2"
|
||||
|
||||
mi_gdb_test "202-break-insert basics.c:$line_callee3_head" \
|
||||
"202\\^done,bkpt=\{number=\"3\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"callee3\",file=\".*basics.c\",line=\"$line_callee3_body\",times=\"0\"\}" \
|
||||
mi_create_breakpoint "basics.c:$line_callee3_head" 3 keep callee3 ".*basics.c" $line_callee3_body $hex \
|
||||
"insert breakpoint at basics.c:\$line_callee3_head"
|
||||
|
||||
mi_gdb_test "203-break-insert \"\\\"${srcfile}\\\":$line_callee4_head\"" \
|
||||
"203\\^done,bkpt=\{number=\"4\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"callee4\",file=\".*basics.c\",line=\"$line_callee4_body\",times=\"0\"\}" \
|
||||
mi_create_breakpoint "\"\\\"${srcfile}\\\":$line_callee4_head\"" 4 keep callee4 ".*basics.c" $line_callee4_body $hex \
|
||||
"insert breakpoint at \"<fullfilename>\":\$line_callee4_head"
|
||||
|
||||
mi_gdb_test "204-break-list" \
|
||||
"204\\^done,BreakpointTable=\{.*,hdr=\\\[.*\\\],body=\\\[bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"main\",file=\".*basics.c\",line=\"$line_main_body\",times=\"0\"\},.*\}\\\]\}" \
|
||||
"204\\^done,BreakpointTable=\{.*,hdr=\\\[.*\\\],body=\\\[bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"main\",file=\".*basics.c\",line=\"$line_main_body\",times=\"0\",original-location=\".*\"\},.*\}\\\]\}" \
|
||||
"list of breakpoints"
|
||||
|
||||
mi_gdb_test "205-break-disable 2 3 4" \
|
||||
|
@ -39,10 +39,8 @@ mi_gdb_exit
|
||||
mi_gdb_start
|
||||
mi_run_to_main
|
||||
|
||||
mi_gdb_test "400-break-insert foo" \
|
||||
"400\\^done,bkpt=\{number=\"2\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"foo\",file=\".*mi-syn-frame.c\",line=\"$decimal\",times=\"0\"\}" \
|
||||
"insert breakpoint foo"
|
||||
|
||||
mi_create_breakpoint "foo" 2 keep foo ".*mi-syn-frame.c" $decimal $hex \
|
||||
"insert breakpoint foo"
|
||||
|
||||
#
|
||||
# Call foo() by hand, where we'll hit a breakpoint.
|
||||
@ -73,9 +71,8 @@ mi_gdb_test "404-stack-list-frames 0 0" \
|
||||
# Call have_a_very_merry_interrupt() which will eventually raise a signal
|
||||
# that's caught by handler() which calls subroutine().
|
||||
|
||||
mi_gdb_test "405-break-insert subroutine" \
|
||||
"405\\^done,bkpt=\{number=\"3\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"subroutine\",file=\".*mi-syn-frame.c\",line=\"$decimal\",times=\"0\"\}" \
|
||||
"insert breakpoint subroutine"
|
||||
mi_create_breakpoint "subroutine" 3 keep subroutine ".*mi-syn-frame.c" $decimal $hex \
|
||||
"insert breakpoint subroutine"
|
||||
|
||||
mi_gdb_test "406-data-evaluate-expression have_a_very_merry_interrupt()" \
|
||||
"406\\^error,msg=\"The program being debugged stopped while in a function called from GDB.\\\\nWhen the function \\(have_a_very_merry_interrupt\\) is done executing, GDB will silently\\\\nstop \\(instead of continuing to evaluate the expression containing\\\\nthe function call\\).\"" \
|
||||
|
@ -50,8 +50,7 @@ proc test_running_to_foo {} {
|
||||
global mi_gdb_prompt
|
||||
global hex
|
||||
|
||||
mi_gdb_test "200-break-insert 10" \
|
||||
"200\\^done,bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"foo\",file=\".*until.c\",line=\"10\",times=\"0\"\}" \
|
||||
mi_create_breakpoint "10" 1 "keep" foo ".*until.c" 10 ".*" \
|
||||
"break-insert operation"
|
||||
|
||||
mi_run_cmd
|
||||
|
@ -42,9 +42,8 @@ mi_gdb_load ${binfile}
|
||||
|
||||
set line_dct_end [gdb_get_line_number "{int a = 0;}"]
|
||||
|
||||
mi_gdb_test "200-break-insert $srcfile:$line_dct_end" \
|
||||
"200\\^done,bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"do_children_tests\",file=\".*var-cmd.c\",line=\"$line_dct_end\",times=\"0\"\}" \
|
||||
"break-insert operation"
|
||||
mi_create_breakpoint "$srcfile:$line_dct_end" 1 keep do_children_tests ".*var-cmd.c" $line_dct_end $hex \
|
||||
"break-insert operation"
|
||||
|
||||
mi_run_cmd
|
||||
mi_expect_stop "breakpoint-hit" "do_children_tests" "" ".*var-cmd.c" \
|
||||
@ -371,9 +370,8 @@ mi_gdb_test "-var-delete weird" \
|
||||
|
||||
set line_dst_incr_a_2 [gdb_get_line_number "incr_a(2);"]
|
||||
|
||||
mi_gdb_test "200-break-insert $line_dst_incr_a_2" \
|
||||
"200\\^done,bkpt=\{number=\"2\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"do_special_tests\",file=\".*var-cmd.c\",line=\"$line_dst_incr_a_2\",times=\"0\"\}" \
|
||||
"break-insert operation"
|
||||
mi_create_breakpoint "$line_dst_incr_a_2" 2 keep do_special_tests ".*var-cmd.c" $line_dst_incr_a_2 $hex \
|
||||
"break-insert operation 2"
|
||||
|
||||
mi_execute_to "exec-continue" "breakpoint-hit" "do_special_tests" "" \
|
||||
".*var-cmd.c" $line_dst_incr_a_2 { "" "disp=\"keep\"" } \
|
||||
|
@ -59,7 +59,7 @@ proc test_watchpoint_creation_and_listing {type} {
|
||||
"break-watch operation"
|
||||
|
||||
mi_gdb_test "222-break-list" \
|
||||
"222\\\^done,BreakpointTable=\{nr_rows=\".\",nr_cols=\".\",hdr=\\\[\{width=\".*\",alignment=\".*\",col_name=\"number\",colhdr=\"Num\"\}.*colhdr=\"Type\".*colhdr=\"Disp\".*colhdr=\"Enb\".*colhdr=\"Address\".*colhdr=\"What\".*\\\],body=\\\[bkpt=\{number=\"2\",type=\".*watchpoint\",disp=\"keep\",enabled=\"y\",addr=\"\",what=\"C\",times=\"0\"\}\\\]\}" \
|
||||
"222\\\^done,BreakpointTable=\{nr_rows=\".\",nr_cols=\".\",hdr=\\\[\{width=\".*\",alignment=\".*\",col_name=\"number\",colhdr=\"Num\"\}.*colhdr=\"Type\".*colhdr=\"Disp\".*colhdr=\"Enb\".*colhdr=\"Address\".*colhdr=\"What\".*\\\],body=\\\[bkpt=\{number=\"2\",type=\".*watchpoint\",disp=\"keep\",enabled=\"y\",addr=\"\",what=\"C\",times=\"0\",original-location=\"C\"\}\\\]\}" \
|
||||
"list of watchpoints"
|
||||
|
||||
}
|
||||
|
@ -79,25 +79,21 @@ proc test_tbreak_creation_and_listing {} {
|
||||
# -break-insert -t srcfile:$line_callee4_head
|
||||
# -break-list
|
||||
|
||||
mi_gdb_test "222-break-insert -t main" \
|
||||
"222\\^done,bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"del\",enabled=\"y\",addr=\"$hex\",func=\"main\",file=\".*basics.c\",${fullname},line=\"$line_main_body\",times=\"0\"\}" \
|
||||
mi_create_breakpoint "-t main" 1 del main ".*basics.c" $line_main_body $hex \
|
||||
"break-insert -t operation"
|
||||
|
||||
mi_gdb_test "333-break-insert -t basics.c:callee2" \
|
||||
"333\\^done,bkpt=\{number=\"2\",type=\"breakpoint\",disp=\"del\",enabled=\"y\",addr=\"$hex\",func=\"callee2\",file=\".*basics.c\",${fullname},line=\"$line_callee2_body\",times=\"0\"\}" \
|
||||
mi_create_breakpoint "-t basics.c:callee2" 2 del callee2 ".*basics.c" $line_callee2_body $hex \
|
||||
"insert temp breakpoint at basics.c:callee2"
|
||||
|
||||
mi_gdb_test "444-break-insert -t basics.c:$line_callee3_head" \
|
||||
"444\\^done,bkpt=\{number=\"3\",type=\"breakpoint\",disp=\"del\",enabled=\"y\",addr=\"$hex\",func=\"callee3\",file=\".*basics.c\",${fullname},line=\"$line_callee3_body\",times=\"0\"\}" \
|
||||
mi_create_breakpoint "-t basics.c:$line_callee3_head" 3 del callee3 ".*basics.c" $line_callee3_body $hex \
|
||||
"insert temp breakpoint at basics.c:\$line_callee3_head"
|
||||
|
||||
# Getting the quoting right is tricky. That is "\"<file>\":$line_callee4_head"
|
||||
mi_gdb_test "555-break-insert -t \"\\\"${srcfile}\\\":$line_callee4_head\"" \
|
||||
"555\\^done,bkpt=\{number=\"4\",type=\"breakpoint\",disp=\"del\",enabled=\"y\",addr=\"$hex\",func=\"callee4\",file=\".*basics.c\",${fullname},line=\"$line_callee4_body\",times=\"0\"\}" \
|
||||
mi_create_breakpoint "-t \"\\\"${srcfile}\\\":$line_callee4_head\"" 4 del callee4 ".*basics.c" $line_callee4_body $hex \
|
||||
"insert temp breakpoint at \"<fullfilename>\":\$line_callee4_head"
|
||||
|
||||
mi_gdb_test "666-break-list" \
|
||||
"666\\\^done,BreakpointTable=\{nr_rows=\".\",nr_cols=\".\",hdr=\\\[\{width=\".*\",alignment=\".*\",col_name=\"number\",colhdr=\"Num\"\}.*colhdr=\"Type\".*colhdr=\"Disp\".*colhdr=\"Enb\".*colhdr=\"Address\".*colhdr=\"What\".*\\\],body=\\\[bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"del\",enabled=\"y\",addr=\"$hex\",func=\"main\",file=\".*basics.c\",${fullname},line=\"$line_main_body\",times=\"0\"\}.*\\\]\}" \
|
||||
"666\\\^done,BreakpointTable=\{nr_rows=\".\",nr_cols=\".\",hdr=\\\[\{width=\".*\",alignment=\".*\",col_name=\"number\",colhdr=\"Num\"\}.*colhdr=\"Type\".*colhdr=\"Disp\".*colhdr=\"Enb\".*colhdr=\"Address\".*colhdr=\"What\".*\\\],body=\\\[bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"del\",enabled=\"y\",addr=\"$hex\",func=\"main\",file=\".*basics.c\",${fullname},line=\"$line_main_body\",times=\"0\",original-location=\".*\"\}.*\\\]\}" \
|
||||
"list of breakpoints"
|
||||
|
||||
mi_gdb_test "777-break-delete" \
|
||||
|
@ -68,24 +68,20 @@ proc test_breakpoints_creation_and_listing {} {
|
||||
# -break-disable
|
||||
# -break-info
|
||||
|
||||
mi_gdb_test "200-break-insert main" \
|
||||
"200\\^done,bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"main\",file=\".*basics.c\",line=\"$line_main_body\",times=\"0\"\}" \
|
||||
mi_create_breakpoint "main" 1 keep main ".*basics.c" $line_main_body $hex \
|
||||
"break-insert operation"
|
||||
|
||||
mi_gdb_test "201-break-insert basics.c:callee2" \
|
||||
"201\\^done,bkpt=\{number=\"2\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"callee2\",file=\".*basics.c\",line=\"$line_callee2_body\",times=\"0\"\}" \
|
||||
mi_create_breakpoint "basics.c:callee2" 2 keep callee2 ".*basics.c" $line_callee2_body $hex \
|
||||
"insert breakpoint at basics.c:callee2"
|
||||
|
||||
mi_gdb_test "202-break-insert basics.c:$line_callee3_head" \
|
||||
"202\\^done,bkpt=\{number=\"3\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"callee3\",file=\".*basics.c\",line=\"$line_callee3_body\",times=\"0\"\}" \
|
||||
mi_create_breakpoint "basics.c:$line_callee3_head" 3 keep callee3 ".*basics.c" $line_callee3_body $hex \
|
||||
"insert breakpoint at basics.c:\$line_callee3_head"
|
||||
|
||||
mi_gdb_test "203-break-insert \"\\\"${srcfile}\\\":$line_callee4_head\"" \
|
||||
"203\\^done,bkpt=\{number=\"4\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"callee4\",file=\".*basics.c\",line=\"$line_callee4_body\",times=\"0\"\}" \
|
||||
mi_create_breakpoint "\"\\\"${srcfile}\\\":$line_callee4_head\"" 4 keep callee4 ".*basics.c" $line_callee4_body $hex \
|
||||
"insert breakpoint at \"<fullfilename>\":\$line_callee4_head"
|
||||
|
||||
mi_gdb_test "204-break-list" \
|
||||
"204\\^done,BreakpointTable=\{.*,hdr=\\\[.*\\\],body=\\\[bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"main\",file=\".*basics.c\",line=\"$line_main_body\",times=\"0\"\},.*\}\\\]\}" \
|
||||
"204\\^done,BreakpointTable=\{.*,hdr=\\\[.*\\\],body=\\\[bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"main\",file=\".*basics.c\",line=\"$line_main_body\",times=\"0\",original-location=\".*\"\},.*\}\\\]\}" \
|
||||
"list of breakpoints"
|
||||
|
||||
mi_gdb_test "205-break-disable 2 3 4" \
|
||||
|
@ -41,10 +41,8 @@ mi_gdb_exit
|
||||
mi_gdb_start
|
||||
mi_run_to_main
|
||||
|
||||
mi_gdb_test "400-break-insert foo" \
|
||||
"400\\^done,bkpt=\{number=\"2\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"foo\",file=\".*mi-syn-frame.c\",line=\"$decimal\",times=\"0\"\}" \
|
||||
"insert breakpoint foo"
|
||||
|
||||
mi_create_breakpoint "foo" 2 keep foo ".*mi-syn-frame.c" $decimal $hex \
|
||||
"insert breakpoint foo"
|
||||
|
||||
#
|
||||
# Call foo() by hand, where we'll hit a breakpoint.
|
||||
@ -77,9 +75,8 @@ mi_gdb_test "404-stack-list-frames 0 0" \
|
||||
# Call have_a_very_merry_interrupt() which will eventually raise a signal
|
||||
# that's caught by handler() which calls subroutine().
|
||||
|
||||
mi_gdb_test "405-break-insert subroutine" \
|
||||
"405\\^done,bkpt=\{number=\"3\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"subroutine\",file=\".*mi-syn-frame.c\",line=\"$decimal\",times=\"0\"\}" \
|
||||
"insert breakpoint subroutine"
|
||||
mi_create_breakpoint "subroutine" 3 keep subroutine ".*mi-syn-frame.c" $decimal $hex \
|
||||
"insert breakpoint subroutine"
|
||||
|
||||
mi_gdb_test "406-data-evaluate-expression have_a_very_merry_interrupt()" \
|
||||
"406\\^error,msg=\"The program being debugged stopped while in a function called from GDB.\\\\nWhen the function \\(have_a_very_merry_interrupt\\) is done executing, GDB will silently\\\\nstop \\(instead of continuing to evaluate the expression containing\\\\nthe function call\\).\"" \
|
||||
|
@ -51,8 +51,7 @@ proc test_running_to_foo {} {
|
||||
global mi_gdb_prompt
|
||||
global hex
|
||||
|
||||
mi_gdb_test "200-break-insert 10" \
|
||||
"200\\^done,bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"foo\",file=\".*until.c\",line=\"10\",times=\"0\"\}" \
|
||||
mi_create_breakpoint "10" 1 "keep" foo ".*until.c" 10 ".*" \
|
||||
"break-insert operation"
|
||||
|
||||
mi_run_cmd
|
||||
|
@ -42,9 +42,8 @@ mi_gdb_load ${binfile}
|
||||
|
||||
set line_dct_end [gdb_get_line_number "{int a = 0;}"]
|
||||
|
||||
mi_gdb_test "200-break-insert $srcfile:$line_dct_end" \
|
||||
"200\\^done,bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"do_children_tests\",file=\".*var-cmd.c\",line=\"$line_dct_end\",times=\"0\"\}" \
|
||||
"break-insert operation"
|
||||
mi_create_breakpoint "$srcfile:$line_dct_end" 1 keep do_children_tests ".*var-cmd.c" $line_dct_end $hex \
|
||||
"break-insert operation"
|
||||
|
||||
mi_run_cmd
|
||||
mi_expect_stop "breakpoint-hit" "do_children_tests" "" ".*var-cmd.c" \
|
||||
@ -370,9 +369,8 @@ mi_gdb_test "-var-delete weird" \
|
||||
|
||||
set line_dst_incr_a_2 [gdb_get_line_number "incr_a(2);"]
|
||||
|
||||
mi_gdb_test "200-break-insert $line_dst_incr_a_2" \
|
||||
"200\\^done,bkpt=\{number=\"2\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"do_special_tests\",file=\".*var-cmd.c\",line=\"$line_dst_incr_a_2\",times=\"0\"\}" \
|
||||
"break-insert operation"
|
||||
mi_create_breakpoint "$line_dst_incr_a_2" 2 keep do_special_tests ".*var-cmd.c" $line_dst_incr_a_2 $hex \
|
||||
"break-insert operation 2"
|
||||
|
||||
mi_execute_to "exec-continue" "breakpoint-hit" "do_special_tests" "" \
|
||||
".*var-cmd.c" $line_dst_incr_a_2 { "" "disp=\"keep\"" } \
|
||||
|
@ -59,7 +59,7 @@ proc test_watchpoint_creation_and_listing {type} {
|
||||
"break-watch operation"
|
||||
|
||||
mi_gdb_test "222-break-list" \
|
||||
"222\\\^done,BreakpointTable=\{nr_rows=\".\",nr_cols=\".\",hdr=\\\[\{width=\".*\",alignment=\".*\",col_name=\"number\",colhdr=\"Num\"\}.*colhdr=\"Type\".*colhdr=\"Disp\".*colhdr=\"Enb\".*colhdr=\"Address\".*colhdr=\"What\".*\\\],body=\\\[bkpt=\{number=\"2\",type=\".*watchpoint\",disp=\"keep\",enabled=\"y\",addr=\"\",what=\"C\",times=\"0\"\}\\\]\}" \
|
||||
"222\\\^done,BreakpointTable=\{nr_rows=\".\",nr_cols=\".\",hdr=\\\[\{width=\".*\",alignment=\".*\",col_name=\"number\",colhdr=\"Num\"\}.*colhdr=\"Type\".*colhdr=\"Disp\".*colhdr=\"Enb\".*colhdr=\"Address\".*colhdr=\"What\".*\\\],body=\\\[bkpt=\{number=\"2\",type=\".*watchpoint\",disp=\"keep\",enabled=\"y\",addr=\"\",what=\"C\",times=\"0\",original-location=\"C\"\}\\\]\}" \
|
||||
"list of watchpoints"
|
||||
|
||||
}
|
||||
|
@ -875,7 +875,7 @@ proc mi_runto_helper {func run_or_continue} {
|
||||
|
||||
set test "mi runto $func"
|
||||
mi_gdb_test "200-break-insert -t $func" \
|
||||
"200\\^done,bkpt=\{number=\"\[0-9\]+\",type=\"breakpoint\",disp=\"del\",enabled=\"y\",addr=\"$hex\",func=\"$func\(\\\(.*\\\)\)?\",file=\".*\",line=\"\[0-9\]*\",times=\"0\"\}" \
|
||||
"200\\^done,bkpt=\{number=\"\[0-9\]+\",type=\"breakpoint\",disp=\"del\",enabled=\"y\",addr=\"$hex\",func=\"$func\(\\\(.*\\\)\)?\",file=\".*\",line=\"\[0-9\]*\",times=\"0\",original-location=\".*\"\}" \
|
||||
"breakpoint at $func"
|
||||
|
||||
if {![regexp {number="[0-9]+"} $expect_out(buffer) str]
|
||||
@ -1059,6 +1059,40 @@ proc mi0_continue_to { bkptno func args file line test } {
|
||||
"$func" "$args" "$file" "$line" "" "$test"
|
||||
}
|
||||
|
||||
# Creates a breakpoint and checks the reported fields are as expected
|
||||
proc mi_create_breakpoint { location number disp func file line address test } {
|
||||
verbose -log "Expecting: 222\\^done,bkpt=\{number=\"$number\",type=\"breakpoint\",disp=\"$disp\",enabled=\"y\",addr=\"$address\",func=\"$func\",file=\"$file\",fullname=\".*\",line=\"$line\",times=\"0\",original-location=\".*\"\}"
|
||||
mi_gdb_test "222-break-insert $location" \
|
||||
"222\\^done,bkpt=\{number=\"$number\",type=\"breakpoint\",disp=\"$disp\",enabled=\"y\",addr=\"$address\",func=\"$func\",file=\"$file\",fullname=\".*\",line=\"$line\",times=\"0\",original-location=\".*\"\}" \
|
||||
$test
|
||||
}
|
||||
|
||||
proc mi_list_breakpoints { expected test } {
|
||||
set fullname ".*"
|
||||
|
||||
set body ""
|
||||
set first 1
|
||||
|
||||
foreach item $children {
|
||||
if {$first == 0} {
|
||||
set body "$body,"
|
||||
}
|
||||
set number disp func file line address
|
||||
set number [lindex $item 0]
|
||||
set disp [lindex $item 1]
|
||||
set func [lindex $item 2]
|
||||
set line [lindex $item 3]
|
||||
set address [lindex $item 4]
|
||||
set body "$body,bkpt=\{number=\"$number\",type=\"breakpoint\",disp=\"$disp\",enabled=\"y\",addr=\"$address\",func=\"$func\",file=\"$file\",${fullname},line=\"$line\",times=\"0\",original-location=\".*\"\}"
|
||||
set first 0
|
||||
}
|
||||
|
||||
verbose -log "Expecint: 666\\\^done,BreakpointTable=\{nr_rows=\".\",nr_cols=\".\",hdr=\\\[\{width=\".*\",alignment=\".*\",col_name=\"number\",colhdr=\"Num\"\}.*colhdr=\"Type\".*colhdr=\"Disp\".*colhdr=\"Enb\".*colhdr=\"Address\".*colhdr=\"What\".*\\\],body=\\\[$body\\\]\}" \
|
||||
mi_gdb_test "666-break-list" \
|
||||
"666\\\^done,BreakpointTable=\{nr_rows=\".\",nr_cols=\".\",hdr=\\\[\{width=\".*\",alignment=\".*\",col_name=\"number\",colhdr=\"Num\"\}.*colhdr=\"Type\".*colhdr=\"Disp\".*colhdr=\"Enb\".*colhdr=\"Address\".*colhdr=\"What\".*\\\],body=\\\[$body\\\]\}" \
|
||||
$test
|
||||
}
|
||||
|
||||
# Creates varobj named NAME for EXPRESSION.
|
||||
# Name cannot be "-".
|
||||
proc mi_create_varobj { name expression testname } {
|
||||
|
Loading…
x
Reference in New Issue
Block a user