projects
/
binutils-gdb.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c7fde2d
)
* gdbtk-variable.c (variable_create): Add parentheses to the name
author
Keith Seitz
<keiths@cygnus>
Wed, 3 Feb 1999 21:39:02 +0000
(21:39 +0000)
committer
Keith Seitz
<keiths@cygnus>
Wed, 3 Feb 1999 21:39:02 +0000
(21:39 +0000)
so that casts do not confuse the expression parser.
gdb/gdbtk-variable.c
patch
|
blob
|
history
diff --git
a/gdb/gdbtk-variable.c
b/gdb/gdbtk-variable.c
index 5a3220d63f392a1d0af2db65beaf0c93a1b4f6bd..c7fc73acbe0b56421a52125e0c7ee98335c4abd2 100644
(file)
--- a/
gdb/gdbtk-variable.c
+++ b/
gdb/gdbtk-variable.c
@@
-499,7
+499,14
@@
variable_create (interp, objc, objv)
}
/* Create the variable */
- var = create_variable (name, name, pc);
+ {
+ /* Add parentheses to the name so that casts do
+ not confuse it. */
+ char *newname = (char *) xmalloc (strlen (name) + 2);
+ sprintf (newname, "(%s)", name);
+ var = create_variable (name, newname, pc);
+ FREEIF (newname);
+ }
if (var != NULL)
{