* gdbtk-variable.c (variable_create): Add parentheses to the name
so that casts do not confuse the expression parser.
This commit is contained in:
parent
c7fde2d901
commit
c951836e48
1 changed files with 8 additions and 1 deletions
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue