From: Nathan Sidwell Date: Fri, 9 Jun 2006 20:01:39 +0000 (+0000) Subject: gdb/testsuite/ X-Git-Tag: gdb-csl-sourcerygxx-4_1-8~5 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ce3bfcb45823f588de330be312bb0e63a1bfa1a3;p=thirdparty%2Fbinutils-gdb.git gdb/testsuite/ * gdb.base/break.c: Add breakpoint 10a marker. * gdb.base/break.exp: Check breakpoint on } --- diff --git a/ChangeLog.csl b/ChangeLog.csl index 5e41d6793b0..ce94383132d 100644 --- a/ChangeLog.csl +++ b/ChangeLog.csl @@ -1,5 +1,9 @@ 2006-06-09 Nathan Sidwell + gdb/testsuite/ + * gdb.base/break.c: Add breakpoint 10a marker. + * gdb.base/break.exp: Check breakpoint on } + gdb/ * m68k-tdep.c (m68k_frame_align): New. (m68k_push_dummy_call): Don't align here. diff --git a/gdb/testsuite/gdb.base/break.c b/gdb/testsuite/gdb.base/break.c index bf398fcca91..db8dbdf8145 100644 --- a/gdb/testsuite/gdb.base/break.c +++ b/gdb/testsuite/gdb.base/break.c @@ -99,7 +99,7 @@ char *argv[], **envp; marker4 (177601976L); argc = (argc == 12345); /* This is silly, but we can step off of it */ /* set breakpoint 2 here */ return argc; /* set breakpoint 10 here */ -} +} /* set breakpoint 10a here */ #ifdef PROTOTYPES int factorial (int value) diff --git a/gdb/testsuite/gdb.base/break.exp b/gdb/testsuite/gdb.base/break.exp index 4a704fbc6d9..8ba761a28e8 100644 --- a/gdb/testsuite/gdb.base/break.exp +++ b/gdb/testsuite/gdb.base/break.exp @@ -262,6 +262,17 @@ gdb_test "step" \ ".*Breakpoint \[0-9\]+, main \\(argc=.*, argv=.*, envp=.*\\) at .*$srcfile:$bp_location10.*$bp_location10\[\t \]+return argc;.*breakpoint 10 here.*" \ "step onto breakpoint" +# Check to see if breakpoint can be set on ending brace of function +set bp_location10a [gdb_get_line_number "set breakpoint 10a here"] + +gdb_test "break $bp_location10a" \ + "Breakpoint.*at.* file .*$srcfile, line $bp_location10a\\." \ + "setting breakpoint at }" + +gdb_test "continue" \ + ".*Breakpoint \[0-9\]+, main \\(argc=.*, argv=.*, envp=.*\\) at .*$srcfile:$bp_location10a.*$bp_location10a\[\t \]+}.*breakpoint 10a here.*" \ + "continue to breakpoint at }" + # # delete all breakpoints so we can start over, course this can be a test too #