[RFA]: pending breakpoint support [2/3]

J. Johnston jjohnstn@redhat.com
Fri Jan 23 01:06:00 GMT 2004


Daniel Jacobowitz wrote:
> On Wed, Jan 21, 2004 at 08:08:15PM -0500, J. Johnston wrote:
> 
>>@@ -269,6 +269,9 @@ proc gdb_breakpoint { function } {
>> 	-re "Breakpoint \[0-9\]* at .*: file .*, line $decimal.\r\n$gdb_prompt $" {}
>> 	-re "Breakpoint \[0-9\]*: file .*, line $decimal.\r\n$gdb_prompt $" {}
>> 	-re "Breakpoint \[0-9\]* at .*$gdb_prompt $" {}
>>+	-re "Make breakpoint pending.*y or n. $" { 
>>+		return gdb_test "n" "" "setting breakpoint at $function" 
>>+	}
>> 	-re "$gdb_prompt $" { fail "setting breakpoint at $function" ; return 0 }
>> 	timeout { fail "setting breakpoint at $function (timeout)" ; return 0 }
>>     }
> 
> 
> Well, that's not valid TCL.  Stick to gdb_test on one line and return
> on the next.
>

Ok.

> 
>>+#
>>+# Test setting, querying, and modifying pending breakpoints
>>+#
>>+
>>+# Test deleting all breakpoints when there are none installed,
>>+# GDB should not prompt for confirmation.
>>+# Note that gdb-init.exp provides a "delete_breakpoints" proc
> 
> 
> FYI, it's gdb.exp.  Also this comment doesn't apply to this test
> script...
> 

Ugh, your right.  Comment removed.

> 
>>+# for general use elsewhere.
>>+
>>+gdb_test_multiple "break pendfunc1" "set pending breakpoint" {
>>+     -re ".*Make breakpoint pending.*y or n. $" {
>>+	    gdb_test "y" "Breakpoint.*pendfunc1.*pending." "set pending breakpoint"
>>+     }
>>+}
>>+
> 
> 
> 
>>+send_gdb "commands 1\n"
>>+send_gdb "print k\n"
>>+send_gdb "end\n"
>>+
>>+gdb_test "info break" \
>>+    "Num Type\[ \]+Disp Enb Address\[ \]+What.*
>>+\[0-9\]+\[\t \]+breakpoint     keep n.*PENDING.*pendfunc1.*
>>+\[\t \]+stop only if k == 1.*
>>+\[\t \]+print k.*
>>+\[0-9\]+\[\t \]+breakpoint     keep y.* in main at .*$srcfile:$mainline" \
>>+"pending disabled plus commands"
> 
> 
> Again, whenever you use send_gdb you need to eat the output.  I think
> you can just use gdb_test for this; see commands.exp.
> 

Yes, that worked.

Please see new patch.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: pbreak.patch2
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20040123/ce76bf16/attachment.ksh>


More information about the Gdb-patches mailing list