* [PATCH] gdb: Remove hard-coded line number from test
@ 2017-10-19 13:10 Andrew Burgess
2017-10-19 14:17 ` Simon Marchi
0 siblings, 1 reply; 2+ messages in thread
From: Andrew Burgess @ 2017-10-19 13:10 UTC (permalink / raw)
To: gdb-patches; +Cc: Andrew Burgess
Removes the use of a hard-coded line number from a test.
gdb/testsuite/ChangeLog:
* gdb.linespec/ls-errs.exp (do_test): Update comment, use line
number from variable rather than hard-coded.
---
gdb/testsuite/ChangeLog | 5 +++++
gdb/testsuite/gdb.linespec/ls-errs.exp | 4 ++--
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/gdb/testsuite/gdb.linespec/ls-errs.exp b/gdb/testsuite/gdb.linespec/ls-errs.exp
index f55cd0e8e9..ee8bb087f0 100644
--- a/gdb/testsuite/gdb.linespec/ls-errs.exp
+++ b/gdb/testsuite/gdb.linespec/ls-errs.exp
@@ -117,10 +117,10 @@ proc do_test {lang} {
foreach x $invalid_offsets {
set offset $x
- # Relative offsets are relative to line 16. Adjust
+ # Relative offsets are relative to the current line. Adjust
# expected offset from error message accordingly.
if {[string index $x 0] == "+" || [string index $x 0] == "-"} {
- incr offset 24
+ incr offset $bp_location
}
test_break $x invalid_offset $offset
test_break "-line $x" invalid_offset $offset
--
2.12.2
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] gdb: Remove hard-coded line number from test
2017-10-19 13:10 [PATCH] gdb: Remove hard-coded line number from test Andrew Burgess
@ 2017-10-19 14:17 ` Simon Marchi
0 siblings, 0 replies; 2+ messages in thread
From: Simon Marchi @ 2017-10-19 14:17 UTC (permalink / raw)
To: Andrew Burgess; +Cc: gdb-patches
On 2017-10-19 09:10, Andrew Burgess wrote:
> Removes the use of a hard-coded line number from a test.
>
> gdb/testsuite/ChangeLog:
>
> * gdb.linespec/ls-errs.exp (do_test): Update comment, use line
> number from variable rather than hard-coded.
> ---
> gdb/testsuite/ChangeLog | 5 +++++
> gdb/testsuite/gdb.linespec/ls-errs.exp | 4 ++--
> 2 files changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/gdb/testsuite/gdb.linespec/ls-errs.exp
> b/gdb/testsuite/gdb.linespec/ls-errs.exp
> index f55cd0e8e9..ee8bb087f0 100644
> --- a/gdb/testsuite/gdb.linespec/ls-errs.exp
> +++ b/gdb/testsuite/gdb.linespec/ls-errs.exp
> @@ -117,10 +117,10 @@ proc do_test {lang} {
> foreach x $invalid_offsets {
> set offset $x
>
> - # Relative offsets are relative to line 16. Adjust
> + # Relative offsets are relative to the current line. Adjust
> # expected offset from error message accordingly.
> if {[string index $x 0] == "+" || [string index $x 0] == "-"} {
> - incr offset 24
> + incr offset $bp_location
> }
> test_break $x invalid_offset $offset
> test_break "-line $x" invalid_offset $offset
LGTM, thanks.
Simon
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-10-19 14:17 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-19 13:10 [PATCH] gdb: Remove hard-coded line number from test Andrew Burgess
2017-10-19 14:17 ` Simon Marchi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).