From: Andrew Burgess <andrew.burgess@embecosm.com>
To: Fei Jie <feij.fnst@cn.fujitsu.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] Add testcases to gdb.base/break.exp
Date: Tue, 27 Oct 2015 11:36:00 -0000 [thread overview]
Message-ID: <20151027093104.GH23628@embecosm.com> (raw)
In-Reply-To: <1445924337-6514-1-git-send-email-feij.fnst@cn.fujitsu.com>
* Fei Jie <feij.fnst@cn.fujitsu.com> [2015-10-27 13:38:57 +0800]:
> *test break at offset -1
> *test break with address
> *test break with non-existed address
> *test break with non-existed condition
> ---
> gdb/testsuite/gdb.base/break.exp | 18 ++++++++++++++++++
> 1 file changed, 18 insertions(+)
>
> diff --git a/gdb/testsuite/gdb.base/break.exp b/gdb/testsuite/gdb.base/break.exp
> index f879bc8..3a997d1 100644
> --- a/gdb/testsuite/gdb.base/break.exp
> +++ b/gdb/testsuite/gdb.base/break.exp
> @@ -399,6 +399,10 @@ set bp_location10 [gdb_get_line_number "set breakpoint 10 here"]
> gdb_test "break +1" \
> "Breakpoint.*at.* file .*$srcfile, line $bp_location10\\." \
> "breakpoint offset +1"
> +#Test break at offset -1
> +gdb_test "break -1" \
> + "Note: breakpoint 6 also set at.*Breakpoint.*at.* file .*$srcfile, line.*" \
> + "breakpoint offset -1"
>
> # Check to see if breakpoint is hit when stepped onto
>
> @@ -940,3 +944,17 @@ gdb_test_no_output "set \$foo=81.5" \
> gdb_test "break $srcfile:\$foo" \
> "Convenience variables used in line specs must have integer values.*" \
> "set breakpoint via non-integer convenience variable disallowed"
> +
> +#Test break with address
> +gdb_test "break *0x400795" \
> + "Breakpoint.*at.* .*$srcfile, line.*" \
> + "breakpoint with address"
That address is not going to be valid for every target. You'll need
to place a label in the code somewhere, take the address of the label,
and use that to generate a breakpoint.
Thanks,
Andrew
prev parent reply other threads:[~2015-10-27 9:31 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-27 11:25 Fei Jie
2015-10-27 11:36 ` Andrew Burgess [this message]
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=20151027093104.GH23628@embecosm.com \
--to=andrew.burgess@embecosm.com \
--cc=feij.fnst@cn.fujitsu.com \
--cc=gdb-patches@sourceware.org \
/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