mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-27 06:17:47 +08:00
* gdbtk-variable.c (variable_create): Add parentheses to the name
so that casts do not confuse the expression parser.
This commit is contained in:
@ -499,7 +499,14 @@ variable_create (interp, objc, objv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Create the variable */
|
/* 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)
|
if (var != NULL)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user