2009-01-03 05:58:08 +00:00
|
|
|
# Copyright 1999, 2001, 2004, 2006, 2007, 2008, 2009
|
|
|
|
# Free Software Foundation, Inc.
|
2000-02-23 00:25:43 +00:00
|
|
|
|
|
|
|
# This program is free software; you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU General Public License as published by
|
2007-08-23 18:14:19 +00:00
|
|
|
# the Free Software Foundation; either version 3 of the License, or
|
2000-02-23 00:25:43 +00:00
|
|
|
# (at your option) any later version.
|
2007-08-23 18:14:19 +00:00
|
|
|
#
|
2000-02-23 00:25:43 +00:00
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
2007-08-23 18:14:19 +00:00
|
|
|
#
|
2000-02-23 00:25:43 +00:00
|
|
|
# You should have received a copy of the GNU General Public License
|
2007-08-23 18:14:19 +00:00
|
|
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
2000-02-23 00:25:43 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# Test essential Machine interface (MI) operations
|
|
|
|
#
|
|
|
|
# Verify that, using the MI, we can run a simple program and perform basic
|
|
|
|
# debugging activities like: insert breakpoints, run the program,
|
|
|
|
# step, next, continue until it ends and, last but not least, quit.
|
|
|
|
#
|
|
|
|
# The goal is not to test gdb functionality, which is done by other tests,
|
|
|
|
# but to verify the correct output response to MI operations.
|
|
|
|
#
|
|
|
|
|
|
|
|
load_lib mi-support.exp
|
2001-06-18 17:57:43 +00:00
|
|
|
set MIFLAGS "-i=mi"
|
2000-02-23 00:25:43 +00:00
|
|
|
|
|
|
|
gdb_exit
|
|
|
|
if [mi_gdb_start] {
|
|
|
|
continue
|
|
|
|
}
|
|
|
|
|
|
|
|
set testfile "basics"
|
|
|
|
set srcfile ${testfile}.c
|
* gdb.mi/mi-async.exp, gdb.mi/mi-basics.exp,
gdb.mi/mi-break.exp, gdb.mi/mi-cli.exp,
gdb.mi/mi-disassemble.exp, gdb.mi/mi-eval.exp,
gdb.mi/mi-file-transfer.exp, gdb.mi/mi-file.exp,
gdb.mi/mi-regs.exp, gdb.mi/mi-return.exp,
gdb.mi/mi-simplerun.exp, gdb.mi/mi-stepi.exp,
gdb.mi/mi-var-block.exp, gdb.mi/mi-var-cmd.exp,
gdb.mi/mi-var-display.exp, gdb.mi/mi-var-invalidate.exp,
gdb.mi/mi-watch.exp, gdb.mi/mi2-basics.exp,
gdb.mi/mi2-break.exp, gdb.mi/mi2-cli.exp,
gdb.mi/mi2-disassemble.exp, gdb.mi/mi2-eval.exp,
gdb.mi/mi2-file.exp, gdb.mi/mi2-regs.exp,
gdb.mi/mi2-return.exp, gdb.mi/mi2-simplerun.exp,
gdb.mi/mi2-stepi.exp, gdb.mi/mi2-var-block.exp,
gdb.mi/mi2-var-child.exp, gdb.mi/mi2-var-cmd.exp,
gdb.mi/mi2-var-display.exp, gdb.mi/mi2-watch.exp,
gdb.server/ext-run.exp, gdb.server/file-transfer.exp,
gdb.server/server-mon.exp, gdb.server/server-run.exp,
gdb.trace/actions.exp, gdb.trace/backtrace.exp,
gdb.trace/deltrace.exp, gdb.trace/infotrace.exp,
gdb.trace/packetlen.exp, gdb.trace/passc-dyn.exp,
gdb.trace/passcount.exp, gdb.trace/report.exp,
gdb.trace/save-trace.exp, gdb.trace/tfind.exp,
gdb.trace/tracecmd.exp, gdb.trace/while-dyn.exp,
gdb.trace/while-stepping.exp: Use a unique name for the compiled
executable.
2009-06-09 17:12:43 +00:00
|
|
|
set binfile ${objdir}/${subdir}/mi-break
|
2000-02-23 00:25:43 +00:00
|
|
|
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-DFAKEARGV}] != "" } {
|
2006-08-10 05:27:22 +00:00
|
|
|
untested mi-break.exp
|
|
|
|
return -1
|
2000-02-23 00:25:43 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
mi_delete_breakpoints
|
|
|
|
mi_gdb_reinitialize_dir $srcdir/$subdir
|
|
|
|
mi_gdb_load ${binfile}
|
|
|
|
|
2004-08-13 16:21:29 +00:00
|
|
|
# Locate line numbers in basics.c.
|
|
|
|
set line_callee4_head [gdb_get_line_number "callee4 ("]
|
|
|
|
set line_callee4_body [expr $line_callee4_head + 2]
|
|
|
|
set line_callee3_head [gdb_get_line_number "callee3 ("]
|
|
|
|
set line_callee3_body [expr $line_callee3_head + 2]
|
|
|
|
set line_callee2_head [gdb_get_line_number "callee2 ("]
|
|
|
|
set line_callee2_body [expr $line_callee2_head + 2]
|
|
|
|
set line_callee1_head [gdb_get_line_number "callee1 ("]
|
|
|
|
set line_callee1_body [expr $line_callee1_head + 2]
|
|
|
|
set line_main_head [gdb_get_line_number "main ("]
|
|
|
|
set line_main_body [expr $line_main_head + 2]
|
|
|
|
|
2006-02-06 21:55:06 +00:00
|
|
|
set fullname "fullname=\"${fullname_syntax}${srcfile}\""
|
|
|
|
|
2000-02-23 00:25:43 +00:00
|
|
|
proc test_tbreak_creation_and_listing {} {
|
|
|
|
global mi_gdb_prompt
|
|
|
|
global srcfile
|
|
|
|
global hex
|
2004-08-13 16:21:29 +00:00
|
|
|
global line_callee4_head line_callee4_body
|
|
|
|
global line_callee3_head line_callee3_body
|
|
|
|
global line_callee2_head line_callee2_body
|
|
|
|
global line_callee1_head line_callee1_body
|
|
|
|
global line_main_head line_main_body
|
2006-02-06 21:55:06 +00:00
|
|
|
global fullname
|
2000-02-23 00:25:43 +00:00
|
|
|
|
|
|
|
# Insert some breakpoints and list them
|
|
|
|
# Also, disable some so they do not interfere with other tests
|
|
|
|
# Tests:
|
|
|
|
# -break-insert -t main
|
|
|
|
# -break-insert -t basics.c:callee2
|
2004-08-13 16:21:29 +00:00
|
|
|
# -break-insert -t basics.c:$line_callee3_head
|
|
|
|
# -break-insert -t srcfile:$line_callee4_head
|
2000-02-23 00:25:43 +00:00
|
|
|
# -break-list
|
|
|
|
|
2008-04-24 08:46:19 +00:00
|
|
|
mi_create_breakpoint "-t main" 1 del main ".*basics.c" $line_main_body $hex \
|
2000-02-23 00:25:43 +00:00
|
|
|
"break-insert -t operation"
|
|
|
|
|
2008-04-24 08:46:19 +00:00
|
|
|
mi_create_breakpoint "-t basics.c:callee2" 2 del callee2 ".*basics.c" $line_callee2_body $hex \
|
2000-02-23 00:25:43 +00:00
|
|
|
"insert temp breakpoint at basics.c:callee2"
|
|
|
|
|
2009-03-26 23:30:12 +00:00
|
|
|
mi_create_breakpoint "-t basics.c:$line_callee3_head" 3 del callee3 ".*basics.c" $line_callee3_head $hex \
|
2008-02-27 20:29:31 +00:00
|
|
|
"insert temp breakpoint at basics.c:\$line_callee3_head"
|
2000-02-23 00:25:43 +00:00
|
|
|
|
2004-08-13 16:21:29 +00:00
|
|
|
# Getting the quoting right is tricky. That is "\"<file>\":$line_callee4_head"
|
2009-03-26 23:30:12 +00:00
|
|
|
mi_create_breakpoint "-t \"\\\"${srcfile}\\\":$line_callee4_head\"" 4 del callee4 ".*basics.c" $line_callee4_head $hex \
|
2004-08-13 16:21:29 +00:00
|
|
|
"insert temp breakpoint at \"<fullfilename>\":\$line_callee4_head"
|
2000-02-23 00:25:43 +00:00
|
|
|
|
|
|
|
mi_gdb_test "666-break-list" \
|
2008-04-24 08:46:19 +00:00
|
|
|
"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=\".*\"\}.*\\\]\}" \
|
2000-02-23 00:25:43 +00:00
|
|
|
"list of breakpoints"
|
|
|
|
|
|
|
|
mi_gdb_test "777-break-delete" \
|
|
|
|
"777\\^done" \
|
|
|
|
"delete temp breakpoints"
|
|
|
|
}
|
|
|
|
|
|
|
|
proc test_rbreak_creation_and_listing {} {
|
|
|
|
global mi_gdb_prompt
|
|
|
|
global srcfile
|
|
|
|
global hex
|
2004-08-13 16:21:29 +00:00
|
|
|
global line_callee4_head line_callee4_body
|
|
|
|
global line_callee3_head line_callee3_body
|
|
|
|
global line_callee2_head line_callee2_body
|
|
|
|
global line_callee1_head line_callee1_body
|
|
|
|
global line_main_head line_main_body
|
2000-02-23 00:25:43 +00:00
|
|
|
|
|
|
|
# Insert some breakpoints and list them
|
|
|
|
# Also, disable some so they do not interfere with other tests
|
|
|
|
# Tests:
|
|
|
|
# -break-insert -r main
|
|
|
|
# -break-insert -r callee2
|
|
|
|
# -break-insert -r callee
|
|
|
|
# -break-insert -r .*llee
|
|
|
|
# -break-list
|
|
|
|
|
|
|
|
setup_xfail "*-*-*"
|
|
|
|
mi_gdb_test "122-break-insert -r main" \
|
2004-08-13 16:21:29 +00:00
|
|
|
"122\\^done,bkpt=\{number=\"5\",addr=\"$hex\",file=\".*basics.c\",line=\"$line_main_body\"\}" \
|
2000-02-23 00:25:43 +00:00
|
|
|
"break-insert -r operation"
|
|
|
|
|
|
|
|
setup_xfail "*-*-*"
|
|
|
|
mi_gdb_test "133-break-insert -r callee2" \
|
2004-08-13 16:21:29 +00:00
|
|
|
"133\\^done,bkpt=\{number=\"6\",addr=\"$hex\",file=\".*basics.c\",line=\"$line_callee2_body\"\}" \
|
2000-02-23 00:25:43 +00:00
|
|
|
"insert breakpoint with regexp callee2"
|
|
|
|
|
|
|
|
setup_xfail "*-*-*"
|
|
|
|
mi_gdb_test "144-break-insert -r callee" \
|
2004-08-13 16:21:29 +00:00
|
|
|
"144\\^done,bkpt=\{number=\"7\",addr=\"$hex\",file=\".*basics.c\",line=\"$line_callee1_body\"\},bkpt=\{number=\"8\",addr=\"$hex\",file=\".*basics.c\",line=\"$line_callee2_body\"\},bkpt=\{number=\"9\",addr=\"$hex\",file=\".*basics.c\",line=\"$line_callee3_body\"\},bkpt=\{number=\"10\",addr=\"$hex\",file=\".*basics.c\",line=\"$line_callee4_body\"\}" \
|
2000-02-23 00:25:43 +00:00
|
|
|
"insert breakpoint with regexp callee"
|
|
|
|
|
|
|
|
setup_xfail "*-*-*"
|
|
|
|
mi_gdb_test "155-break-insert -r \.\*llee" \
|
2004-08-13 16:21:29 +00:00
|
|
|
"155\\^done,bkpt=\{number=\"11\",addr=\"$hex\",file=\".*basics.c\",line=\"$line_callee1_body\"\},bkpt=\{number=\"12\",addr=\"$hex\",file=\".*basics.c\",line=\"$line_callee2_body\"\},bkpt=\{number=\"13\",addr=\"$hex\",file=\".*basics.c\",line=\"$line_callee3_body\"\},bkpt=\{number=\"14\",addr=\"$hex\",file=\".*basics.c\",line=\"$line_callee4_body\"\}" \
|
2000-02-23 00:25:43 +00:00
|
|
|
"insert breakpoint with regexp .*llee"
|
|
|
|
|
|
|
|
setup_xfail "*-*-*"
|
|
|
|
mi_gdb_test "166-break-list" \
|
2004-08-13 16:21:29 +00:00
|
|
|
"1\\\^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=\"5\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"main\",file=\".*basics.c\",line=\"$line_main_body\",times=\"0\"\},.*\}\\\]\}" \
|
2000-02-23 00:25:43 +00:00
|
|
|
"list of breakpoints"
|
|
|
|
|
|
|
|
mi_gdb_test "177-break-delete" \
|
|
|
|
"177\\^done" \
|
|
|
|
"delete temp breakpoints"
|
|
|
|
}
|
|
|
|
|
2008-01-22 19:43:10 +00:00
|
|
|
proc test_ignore_count {} {
|
|
|
|
global mi_gdb_prompt
|
|
|
|
|
|
|
|
mi_gdb_test "-break-insert -i 1 callme" \
|
|
|
|
"\\^done.*ignore=\"1\".*" \
|
|
|
|
"insert breakpoint with ignore count at callme"
|
|
|
|
|
|
|
|
mi_run_cmd
|
|
|
|
|
2008-06-13 19:53:42 +00:00
|
|
|
mi_expect_stop "breakpoint-hit" "callme" "\{name=\"i\",value=\"2\"\}" ".*basics.c" "52" \
|
2008-06-11 13:35:58 +00:00
|
|
|
{"" "disp=\"keep\"" } "run to breakpoint with ignore count"
|
2008-01-22 19:43:10 +00:00
|
|
|
}
|
|
|
|
|
2008-02-01 06:47:20 +00:00
|
|
|
proc test_error {} {
|
|
|
|
global mi_gdb_prompt
|
|
|
|
|
|
|
|
mi_gdb_test "-break-insert function_that_does_not_exist" \
|
|
|
|
".*\\^error,msg=\"Function \\\\\"function_that_does_not_exist\\\\\" not defined.\"" \
|
|
|
|
"breakpoint at nonexistent function"
|
2008-02-01 16:24:47 +00:00
|
|
|
|
|
|
|
# We used to have a bug whereby -break-insert that failed would not
|
|
|
|
# clear some event hooks. As result, whenever we evaluate expression
|
|
|
|
# containing function call, the internal breakpoint created to handle
|
|
|
|
# function call would be reported, messing up MI output.
|
|
|
|
mi_gdb_test "-var-create V * return_1()" \
|
gdb
* varobj.h (varobj_update_result_t) <new>: New field.
(varobj_get_child_range, varobj_set_child_range): Declare.
(varobj_list_children): Update.
(varobj_enable_pretty_printing, varobj_has_more)
(varobj_pretty_printed_p): Declare.
* varobj.c (pretty_printing): New global.
(varobj_enable_pretty_printing): New function.
(struct varobj_root) <from, to, constructor, child_iter,
saved_item>: New fields.
(varobj_create): Don't call install_default_visualizer.
(instantiate_pretty_printer): Don't use value_copy.
(varobj_has_more): New function.
(restrict_range): New function.
(install_dynamic_child): Likewise.
(dynamic_varobj_has_child_method): Likewise.
(update_dynamic_varobj_children): Remove 'new_and_unchanged'
argument; add 'new', 'unchanged', 'from', and 'to' arguments.
Rewrite.
(varobj_get_num_children): Call update_dynamic_varobj_children.
(varobj_list_children): Add 'from' and 'to' arguments. Ignore
result of update_dynamic_varobj_children. Don't call
install_default_visualizer. Restrict result range.
(varobj_add_child): Don't call install_default_visualizer.
(varobj_pretty_printed_p): New function.
(install_visualizer): Rewrite. Move earlier in file.
(install_default_visualizer): Likewise.
(construct_visualizer): New function.
(install_new_value_visualizer): Likewise.
(install_new_value): Don't call release_value. Special case
pretty-printed objects. Use value_incref. Rearrange "changed"
logic.
(varobj_get_child_range): New function.
(varobj_set_child_range): Likewise.
(varobj_set_visualizer): Rewrite.
(varobj_update): Rewrite pretty-printing logic.
(new_variable): Initialize new fields.
(free_variable): Destroy new fields.
(value_of_root): Copy 'from' and 'to'.
(my_value_of_variable): Handle pretty-printers.
(value_get_print_value): Rework pretty-printing logic.
(cplus_describe_child): Don't use release_value.
* mi/mi-cmds.h (mi_cmd_enable_pretty_printing)
(mi_cmd_var_set_update_range): Declare.
* mi/mi-cmds.c (mi_cmds): Add enable-pretty-printing and
var-set-update-range.
* mi/mi-cmd-var.c (print_varobj): Update. Emit "dynamic"
attribute.
(mi_cmd_var_create): Emit "has_more" attribute.
(mi_cmd_var_set_format): Plug memory leak.
(mi_print_value_p): Replace 'type' argument with 'var'. Handle
pretty-printed varobjs.
(mi_cmd_var_list_children): Accept 'from' and 'to' arguments.
Emit "has_more" attribute.
(mi_cmd_var_evaluate_expression): Plug memory leak.
(mi_cmd_var_assign): Likewise.
(varobj_update_one): Likewise. Emit "dynamic", "has_more", and
"new_children" attributes.
(mi_cmd_enable_pretty_printing): New function.
(mi_cmd_var_set_update_range): Likewise.
gdb/doc
* gdb.texinfo (GDB/MI Variable Objects): Document
-enable-pretty-printing, -var-set-update-range, dynamic varobjs.
Expand -var-update documentation.
gdb/testsuite
* lib/mi-support.exp (mi_create_varobj): Update.
(mi_create_floating_varobj): Likewise.
(mi_create_dynamic_varobj): New proc.
(mi_varobj_update): Update.
(mi_varobj_update_with_type_change): Likewise.
(mi_varobj_update_kv_helper): New proc.
(mi_varobj_update_dynamic_helper): Rewrite.
(mi_varobj_update_dynamic): New proc.
(mi_list_varobj_children): Update.
(mi_list_varobj_children_range): Add 'from' and 'to' arguments.
* gdb.python/python-prettyprint.py (pp_outer): New class.
(pp_nullstr): Likewise.
(lookup_function): Register new printers.
* gdb.python/python-prettyprint.c (struct substruct): New type.
(struct outerstruct): Likewise.
(substruct_test): New function.
(struct nullstr): New type.
(string_1, string_2): New globals.
(main): Add new tests.
* gdb.python/python-mi.exp: Added regression tests.
* gdb.mi/mi2-var-display.exp: Update.
* gdb.mi/mi2-var-cmd.exp: Update.
* gdb.mi/mi2-var-child.exp: Update.
* gdb.mi/mi2-var-block.exp: Update.
* gdb.mi/mi-var-invalidate.exp: Update.
* gdb.mi/mi-var-display.exp: Update.
* gdb.mi/mi-var-cmd.exp: Update.
* gdb.mi/mi-var-child.exp: Update.
* gdb.mi/mi-var-block.exp: Update.
* gdb.mi/mi-break.exp: Update.
* gdb.mi/gdb701.exp: Update.
2009-09-15 18:51:26 +00:00
|
|
|
"\\^done,name=\"V\",numchild=\"0\",value=\"1\",type=\"int\",has_more=\"0\"" \
|
2008-02-01 16:24:47 +00:00
|
|
|
"create varobj for function call"
|
|
|
|
|
|
|
|
mi_gdb_test "-var-update *" \
|
|
|
|
"\\^done,changelist=\\\[\\\]" \
|
|
|
|
"update varobj for function call"
|
2008-02-01 06:47:20 +00:00
|
|
|
}
|
|
|
|
|
2009-01-30 18:28:01 +00:00
|
|
|
proc test_disabled_creation {} {
|
|
|
|
global mi_gdb_prompt
|
|
|
|
global hex
|
|
|
|
global line_callee2_body
|
|
|
|
|
|
|
|
mi_gdb_test "-break-insert -d basics.c:callee2" \
|
|
|
|
"\\^done,bkpt=\{number=\"6\",type=\"breakpoint\",disp=\"keep\",enabled=\"n\",addr=\"$hex\",func=\"callee2\",file=\".*basics.c\",fullname=\".*\",line=\"$line_callee2_body\",times=\"0\",original-location=\".*\"\}" \
|
|
|
|
"test disabled creation"
|
|
|
|
|
|
|
|
mi_gdb_test "-break-delete" \
|
|
|
|
"\\^done" \
|
|
|
|
"test disabled creation: cleanup"
|
|
|
|
}
|
|
|
|
|
2009-08-03 12:39:01 +00:00
|
|
|
proc test_breakpoint_commands {} {
|
|
|
|
global line_callee2_body
|
|
|
|
global hex
|
|
|
|
global fullname
|
|
|
|
|
|
|
|
mi_create_breakpoint "basics.c:callee2" 7 keep callee2 ".*basics.c" $line_callee2_body $hex \
|
|
|
|
"breakpoint commands: insert breakpoint at basics.c:callee2"
|
|
|
|
|
|
|
|
mi_gdb_test "-break-commands 7 \"print 10\" \"continue\"" \
|
|
|
|
"\\^done" \
|
|
|
|
"breakpoint commands: set commands"
|
|
|
|
|
|
|
|
mi_gdb_test "-break-info 7" \
|
|
|
|
"\\^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=\"7\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"callee2\",file=\".*basics.c\",${fullname},line=\"$line_callee2_body\",times=\"0\",script=\{\"print 10\",\"continue\"\},original-location=\".*\"\}.*\\\]\}" \
|
|
|
|
"breakpoint commands: check that commands are set"
|
|
|
|
|
|
|
|
mi_gdb_test "-break-commands 7" \
|
|
|
|
"\\^done" \
|
|
|
|
"breakpoint commands: clear commands"
|
|
|
|
|
|
|
|
mi_list_breakpoints [list [list 7 "keep" "callee2" "basics.c" "$line_callee2_body" $hex]] \
|
|
|
|
"breakpoint commands: check that commands are cleared"
|
2009-10-30 17:34:53 +00:00
|
|
|
|
|
|
|
mi_run_to_main
|
|
|
|
|
|
|
|
mi_create_breakpoint "basics.c:callee2" 9 keep callee2 ".*basics.c" $line_callee2_body $hex \
|
|
|
|
"breakpoint commands: insert breakpoint at basics.c:callee2, again"
|
|
|
|
|
|
|
|
mi_gdb_test "-break-commands 9 \"set \$i=0\" \"while \$i<10\" \"print \$i\" \"set \$i=\$i+1\" \"end\" \"continue\" " \
|
|
|
|
"\\^done" \
|
|
|
|
"breakpoint commands: set commands"
|
|
|
|
|
|
|
|
mi_gdb_test "-exec-continue" \
|
|
|
|
".*\\\$1 = 0.*\\\$10 = 9.*\\*running.*\\*stopped,reason=\"exited-normally\".*" \
|
|
|
|
"test hitting breakpoint with commands"
|
|
|
|
|
|
|
|
|
2009-08-03 12:39:01 +00:00
|
|
|
}
|
|
|
|
|
2000-02-23 00:25:43 +00:00
|
|
|
test_tbreak_creation_and_listing
|
|
|
|
test_rbreak_creation_and_listing
|
|
|
|
|
2008-01-22 19:43:10 +00:00
|
|
|
test_ignore_count
|
|
|
|
|
2008-02-01 06:47:20 +00:00
|
|
|
test_error
|
|
|
|
|
2009-01-30 18:28:01 +00:00
|
|
|
test_disabled_creation
|
|
|
|
|
2009-08-03 12:39:01 +00:00
|
|
|
test_breakpoint_commands
|
|
|
|
|
2000-02-23 00:25:43 +00:00
|
|
|
mi_gdb_exit
|
|
|
|
return 0
|