diff options
author | Vladimir Prus <vladimir@codesourcery.com> | 2008-01-22 19:43:10 +0000 |
---|---|---|
committer | Vladimir Prus <vladimir@codesourcery.com> | 2008-01-22 19:43:10 +0000 |
commit | 60c4664782e3f003a4d032c984c29b2a7a7cfdeb (patch) | |
tree | c4d5e3f8dbe50d887a9df5466b616d4a5a66dcca /gdb/testsuite | |
parent | d053948ad25af1794149e779f05431b8705197ce (diff) | |
download | gdb-60c4664782e3f003a4d032c984c29b2a7a7cfdeb.zip gdb-60c4664782e3f003a4d032c984c29b2a7a7cfdeb.tar.gz gdb-60c4664782e3f003a4d032c984c29b2a7a7cfdeb.tar.bz2 |
* breakpoint.c (break_command_really): New parameter
ignore_count.
(break_command_1): Pass 0 as
ignore_count to break_command_really.
(gdb_breakpoint): Pass ignore_count to
break_command_really.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r-- | gdb/testsuite/ChangeLog | 8 | ||||
-rw-r--r-- | gdb/testsuite/gdb.mi/basics.c | 8 | ||||
-rw-r--r-- | gdb/testsuite/gdb.mi/mi-break.exp | 24 | ||||
-rw-r--r-- | gdb/testsuite/gdb.mi/mi-cli.exp | 2 | ||||
-rw-r--r-- | gdb/testsuite/gdb.mi/mi2-cli.exp | 2 |
5 files changed, 42 insertions, 2 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 74099f6..18f387c 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,11 @@ +2008-01-22 Vladimir Prus <vladimir@codesourcery.com> + + * gdb.mi/basics.c: Setup for testing breakpoints + ignore count. + * gdb.mi/mi-break.exp: Test for breakpoint ignore count. + * gdb.mi/mi-cli.exp: Adjust. + * gdb.mi/mi2-cli.exp: Adjust. + 2008-01-17 Pedro Alves <pedro@codesourcery.com> * gdb.mi/mi-var-child.c (do_children_tests): Add 'dummy' integer diff --git a/gdb/testsuite/gdb.mi/basics.c b/gdb/testsuite/gdb.mi/basics.c index d56bf9d..5b52112 100644 --- a/gdb/testsuite/gdb.mi/basics.c +++ b/gdb/testsuite/gdb.mi/basics.c @@ -46,6 +46,11 @@ callee1 (int intarg, char *strarg, double fltarg) callee2 (intarg, strarg); } +void callme (int i) +{ + printf ("callme\n"); +} + main () { callee1 (2, "A string argument.", 3.5); @@ -53,6 +58,9 @@ main () printf ("Hello, World!"); + callme (1); + callme (2); + return 0; } diff --git a/gdb/testsuite/gdb.mi/mi-break.exp b/gdb/testsuite/gdb.mi/mi-break.exp index b51fd18..af438b9 100644 --- a/gdb/testsuite/gdb.mi/mi-break.exp +++ b/gdb/testsuite/gdb.mi/mi-break.exp @@ -153,8 +153,32 @@ proc test_rbreak_creation_and_listing {} { "delete temp breakpoints" } +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 + + gdb_expect { + -re ".*func=\"callme\".*args=\\\[\{name=\"i\",value=\"2\"\}\\\].*\r\n$mi_gdb_prompt$" { + pass "run to breakpoint with ignore count" + } + -re ".*$mi_gdb_prompt$" { + fail "run to breakpoint with ignore count" + } + timeout { + fail "run to breakpoint with ignore count (timeout)" + } + } +} + test_tbreak_creation_and_listing test_rbreak_creation_and_listing +test_ignore_count + mi_gdb_exit return 0 diff --git a/gdb/testsuite/gdb.mi/mi-cli.exp b/gdb/testsuite/gdb.mi/mi-cli.exp index 64789b5..ef674b0 100644 --- a/gdb/testsuite/gdb.mi/mi-cli.exp +++ b/gdb/testsuite/gdb.mi/mi-cli.exp @@ -186,7 +186,7 @@ gdb_expect { } mi_gdb_test "-interpreter-exec console \"list\"" \ - "\~\"$line_main_return\[\\\\t ]*return 0;\\\\n\".*\\^done" \ + "\~\"$line_main_return\[\\\\t ]*callme \\(1\\);\\\\n\".*\\^done" \ "-interpreter-exec console \"list\" at basics.c:\$line_main_return" mi_gdb_test "-interpreter-exec console \"help set args\"" \ diff --git a/gdb/testsuite/gdb.mi/mi2-cli.exp b/gdb/testsuite/gdb.mi/mi2-cli.exp index ee8d47d..7879bd7 100644 --- a/gdb/testsuite/gdb.mi/mi2-cli.exp +++ b/gdb/testsuite/gdb.mi/mi2-cli.exp @@ -186,7 +186,7 @@ gdb_expect { } mi_gdb_test "-interpreter-exec console \"list\"" \ - "\~\"$line_main_return\[\\\\t ]*return 0;\\\\n\".*\\^done" \ + "\~\"$line_main_return\[\\\\t ]*callme \\(1\\);\\\\n\".*\\^done" \ "-interpreter-exec console \"list\" at basics.c:\$line_main_return" mi_gdb_test "-interpreter-exec console \"help set args\"" \ |