mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-21 10:34:21 +08:00
* breakpoint.c (clear_command): Add cleanup for
sals.sals if an argument is given. * linespec.c (parse_linespec): Do cleanups after parsing a convenience variable.
This commit is contained in:
@ -1,3 +1,11 @@
|
|||||||
|
2012-11-10 Keith Seitz <keiths@redhat.com>
|
||||||
|
|
||||||
|
* breakpoint.c (clear_command): Add cleanup for
|
||||||
|
sals.sals if an argument is given.
|
||||||
|
|
||||||
|
* linespec.c (parse_linespec): Do cleanups after
|
||||||
|
parsing a convenience variable.
|
||||||
|
|
||||||
2012-11-10 Keith Seitz <keiths@redhat.com>
|
2012-11-10 Keith Seitz <keiths@redhat.com>
|
||||||
|
|
||||||
PR gdb/14288
|
PR gdb/14288
|
||||||
|
@ -11792,6 +11792,7 @@ clear_command (char *arg, int from_tty)
|
|||||||
sals = decode_line_with_current_source (arg,
|
sals = decode_line_with_current_source (arg,
|
||||||
(DECODE_LINE_FUNFIRSTLINE
|
(DECODE_LINE_FUNFIRSTLINE
|
||||||
| DECODE_LINE_LIST_MODE));
|
| DECODE_LINE_LIST_MODE));
|
||||||
|
make_cleanup (xfree, sals.sals);
|
||||||
default_match = 0;
|
default_match = 0;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -2095,20 +2095,17 @@ parse_linespec (linespec_parser *parser, char **argptr)
|
|||||||
cleanup = make_cleanup (xfree, var);
|
cleanup = make_cleanup (xfree, var);
|
||||||
PARSER_RESULT (parser)->line_offset
|
PARSER_RESULT (parser)->line_offset
|
||||||
= linespec_parse_variable (PARSER_STATE (parser), var);
|
= linespec_parse_variable (PARSER_STATE (parser), var);
|
||||||
|
do_cleanups (cleanup);
|
||||||
|
|
||||||
/* If a line_offset wasn't found (VAR is the name of a user
|
/* If a line_offset wasn't found (VAR is the name of a user
|
||||||
variable/function), then skip to normal symbol processing. */
|
variable/function), then skip to normal symbol processing. */
|
||||||
if (PARSER_RESULT (parser)->line_offset.sign != LINE_OFFSET_UNKNOWN)
|
if (PARSER_RESULT (parser)->line_offset.sign != LINE_OFFSET_UNKNOWN)
|
||||||
{
|
{
|
||||||
discard_cleanups (cleanup);
|
|
||||||
|
|
||||||
/* Consume this token. */
|
/* Consume this token. */
|
||||||
linespec_lexer_consume_token (parser);
|
linespec_lexer_consume_token (parser);
|
||||||
|
|
||||||
goto convert_to_sals;
|
goto convert_to_sals;
|
||||||
}
|
}
|
||||||
|
|
||||||
do_cleanups (cleanup);
|
|
||||||
}
|
}
|
||||||
else if (token.type != LSTOKEN_STRING && token.type != LSTOKEN_NUMBER)
|
else if (token.type != LSTOKEN_STRING && token.type != LSTOKEN_NUMBER)
|
||||||
unexpected_linespec_error (parser);
|
unexpected_linespec_error (parser);
|
||||||
|
Reference in New Issue
Block a user