This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[commit/varobj] Add missing \n
- From: Andrew Cagney <cagney at gnu dot org>
- To: gdb-patches at sources dot redhat dot com
- Date: Fri, 14 Jan 2005 13:17:07 -0500
- Subject: [commit/varobj] Add missing \n
The depressing part here is that the testsuite was actually checking for
the wrong output so it also needed a tweak.
committed,
Andrew
Index: ChangeLog
2005-01-14 Andrew Cagney <cagney@gnu.org>
* varobj.c (varobj_create): Add missing \n.
Index: testsuite/ChangeLog
2005-01-14 Andrew Cagney <cagney@gnu.org>
* gdb.mi/mi-var-cmd.exp: Adjust "create int" test to match output.
* gdb.mi/mi2-var-cmd.exp: Ditto.
Index: varobj.c
===================================================================
RCS file: /cvs/src/src/gdb/varobj.c,v
retrieving revision 1.43
diff -p -u -r1.43 varobj.c
--- varobj.c 12 Nov 2004 21:45:08 -0000 1.43
+++ varobj.c 14 Jan 2005 18:04:56 -0000
@@ -1,5 +1,6 @@
/* Implementation of the GDB variable objects API.
- Copyright 1999, 2000, 2001 Free Software Foundation, Inc.
+
+ Copyright 1999, 2000, 2001, 2005 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -472,8 +473,8 @@ varobj_create (char *objname,
if (var->root->exp->elts[0].opcode == OP_TYPE)
{
do_cleanups (old_chain);
- fprintf_unfiltered (gdb_stderr,
- "Attempt to use a type name as an expression.");
+ fprintf_unfiltered (gdb_stderr, "Attempt to use a type name"
+ " as an expression.\n");
return NULL;
}
Index: testsuite/gdb.mi/mi-var-cmd.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/mi-var-cmd.exp,v
retrieving revision 1.17
diff -p -u -r1.17 mi-var-cmd.exp
--- testsuite/gdb.mi/mi-var-cmd.exp 17 Aug 2004 09:38:29 -0000 1.17
+++ testsuite/gdb.mi/mi-var-cmd.exp 14 Jan 2005 18:04:59 -0000
@@ -1,4 +1,5 @@
-# Copyright 1999, 2000, 2001, 2002, 2004 Free Software Foundation, Inc.
+# Copyright 1999, 2000, 2001, 2002, 2004, 2005 Free Software
+# Foundation, Inc.
#
# This Program Is Free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -148,7 +149,7 @@ mi_gdb_test "-var-create lsimple.integer
# Type names (like int, long, etc..) are all proper expressions to gdb.
# make sure variable code does not allow users to create variables, though.
mi_gdb_test "-var-create int * int" \
- "&\"Attempt to use a type name as an expression.mi_cmd_var_create: unable to create variable object\\\\n\".*\\^error,msg=\"mi_cmd_var_create: unable to create variable object\"" \
+ "&\"Attempt to use a type name as an expression.\\\\n\".*&\"mi_cmd_var_create: unable to create variable object\\\\n\".*\\^error,msg=\"mi_cmd_var_create: unable to create variable object\"" \
"create int"
Index: testsuite/gdb.mi/mi2-var-cmd.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/mi2-var-cmd.exp,v
retrieving revision 1.3
diff -p -u -r1.3 mi2-var-cmd.exp
--- testsuite/gdb.mi/mi2-var-cmd.exp 17 Aug 2004 09:38:29 -0000 1.3
+++ testsuite/gdb.mi/mi2-var-cmd.exp 14 Jan 2005 18:04:59 -0000
@@ -1,4 +1,5 @@
-# Copyright 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+# Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2004 Free Software
+# Foundation, Inc.
#
# This Program Is Free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -148,7 +149,7 @@ mi_gdb_test "-var-create lsimple.integer
# Type names (like int, long, etc..) are all proper expressions to gdb.
# make sure variable code does not allow users to create variables, though.
mi_gdb_test "-var-create int * int" \
- "&\"Attempt to use a type name as an expression.mi_cmd_var_create: unable to create variable object\\\\n\".*\\^error,msg=\"mi_cmd_var_create: unable to create variable object\"" \
+ "&\"Attempt to use a type name as an expression.\\\\n\".*&\"mi_cmd_var_create: unable to create variable object\\\\n\".*\\^error,msg=\"mi_cmd_var_create: unable to create variable object\"" \
"create int"