From: Daniel Jacobowitz <drow@mvista.com>
To: gdb-patches@sources.redhat.com
Subject: Re: [RFA]: pending breakpoint support [2/3]
Date: Thu, 22 Jan 2004 22:40:00 -0000 [thread overview]
Message-ID: <20040122224023.GB18400@nevyn.them.org> (raw)
In-Reply-To: <400F227F.9040004@redhat.com>
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.
> +#
> +# 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...
> +# 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.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
next prev parent reply other threads:[~2004-01-22 22:40 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-01-21 21:03 Jeff Johnston
2004-01-21 22:20 ` Daniel Jacobowitz
2004-01-21 23:12 ` J. Johnston
2004-01-22 0:20 ` Daniel Jacobowitz
2004-01-22 1:08 ` J. Johnston
2004-01-22 22:40 ` Daniel Jacobowitz [this message]
2004-01-23 1:06 ` J. Johnston
2004-01-23 15:01 ` Daniel Jacobowitz
2004-01-21 22:20 Michael Elizabeth Chastain
2004-01-21 22:58 ` J. Johnston
2004-01-21 23:14 ` J. Johnston
2004-01-24 7:31 Michael Elizabeth Chastain
2004-01-24 10:36 ` Eli Zaretskii
2004-02-02 21:17 ` Jeff Johnston
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20040122224023.GB18400@nevyn.them.org \
--to=drow@mvista.com \
--cc=gdb-patches@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox