This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [obv] Remove redundant '\' in mi2-cli.exp
On 09/25/2012 02:04 AM, Pedro Alves wrote:
> I'm positive this must have been done on purpose -- so that the test
> output message in the .sum file matches the first argument to mi_gdb_test.
> The same reason you have elsewhere in the file too:
>
> "-interpreter-exec console \"file \$binfile\"
>
> too.
>
> It also makes the the .sum output stable(r) if the test .c file changes
> a bit (changing line numbers). IMO, it's always good practice to avoid
> line numbers in .sum test message output.
>
> If you grep for '\\\$' for example, you'll find several other instances of
> the same pattern.
These "$line" was introduced by this patch below, and it is done on
purpose.
[patch/testsuite/mi] mi*-*.exp: use gdb_get_line_number
http://sourceware.org/ml/gdb-patches/2004-08/msg00498.html
This patch is to revert my previous commit, and fix the test below
which output line to .sum (I was motivated by it to draft the original
patch :)).
I'll check it in tomorrow.
--
Yao
gdb/testsuite:
2012-09-25 Yao Qi <yao@codesourcery.com>
* gdb.mi/mi2-cli.exp: Avoid line number in test summary.
Revert:
2012-09-21 Yao Qi <yao@codesourcery.com>
* gdb.mi/mi2-cli.exp: Remove redundant '\'.
---
gdb/testsuite/gdb.mi/mi2-cli.exp | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/gdb/testsuite/gdb.mi/mi2-cli.exp b/gdb/testsuite/gdb.mi/mi2-cli.exp
index 892e457..03ede23 100644
--- a/gdb/testsuite/gdb.mi/mi2-cli.exp
+++ b/gdb/testsuite/gdb.mi/mi2-cli.exp
@@ -154,11 +154,11 @@ mi_execute_to "interpreter-exec console step" $reason "callee4" "" ".*basics.c"
mi_gdb_test "600-break-insert -t basics.c:$line_main_hello" \
{600\^done,bkpt=.number="3",type="breakpoint".*\}} \
- "-break-insert -t basics.c:$line_main_hello"
+ "-break-insert -t basics.c:\$line_main_hello"
mi_execute_to "exec-continue" "breakpoint-hit" "main" "" ".*basics.c" \
$line_main_hello { "" "disp=\"del\"" } \
- "-exec-continue to line $line_main_hello"
+ "-exec-continue to line \$line_main_hello"
# Test that the token is output even for CLI commands
# Also test that *stopped includes frame information.
--
1.7.7.6