mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-10-13 10:55:46 +08:00
gdb/
* breakpoint.c (update_watchpoint): Add source empty line. Prefer EXP_STRING_REPARSE to EXP_STRING. (watch_command_1): Set also EXP_STRING_REPARSE. (delete_breakpoint): Free also EXP_STRING_REPARSE. * breakpoint.h (struct breakpoint): New field exp_string_reparse. Update comment for exp_string.
This commit is contained in:
@ -1,3 +1,12 @@
|
|||||||
|
2010-08-16 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||||
|
|
||||||
|
* breakpoint.c (update_watchpoint): Add source empty line. Prefer
|
||||||
|
EXP_STRING_REPARSE to EXP_STRING.
|
||||||
|
(watch_command_1): Set also EXP_STRING_REPARSE.
|
||||||
|
(delete_breakpoint): Free also EXP_STRING_REPARSE.
|
||||||
|
* breakpoint.h (struct breakpoint): New field exp_string_reparse.
|
||||||
|
Update comment for exp_string.
|
||||||
|
|
||||||
2010-08-16 Tom Tromey <tromey@redhat.com>
|
2010-08-16 Tom Tromey <tromey@redhat.com>
|
||||||
|
|
||||||
* value.c (release_value): Clear 'next' pointer.
|
* value.c (release_value): Clear 'next' pointer.
|
||||||
|
@ -1339,12 +1339,13 @@ update_watchpoint (struct breakpoint *b, int reparse)
|
|||||||
if (within_current_scope && reparse)
|
if (within_current_scope && reparse)
|
||||||
{
|
{
|
||||||
char *s;
|
char *s;
|
||||||
|
|
||||||
if (b->exp)
|
if (b->exp)
|
||||||
{
|
{
|
||||||
xfree (b->exp);
|
xfree (b->exp);
|
||||||
b->exp = NULL;
|
b->exp = NULL;
|
||||||
}
|
}
|
||||||
s = b->exp_string;
|
s = b->exp_string_reparse ? b->exp_string_reparse : b->exp_string;
|
||||||
b->exp = parse_exp_1 (&s, b->exp_valid_block, 0);
|
b->exp = parse_exp_1 (&s, b->exp_valid_block, 0);
|
||||||
/* If the meaning of expression itself changed, the old value is
|
/* If the meaning of expression itself changed, the old value is
|
||||||
no longer relevant. We don't want to report a watchpoint hit
|
no longer relevant. We don't want to report a watchpoint hit
|
||||||
@ -8211,10 +8212,13 @@ watch_command_1 (char *arg, int accessflag, int from_tty, int just_location)
|
|||||||
t = check_typedef (TYPE_TARGET_TYPE (check_typedef (t)));
|
t = check_typedef (TYPE_TARGET_TYPE (check_typedef (t)));
|
||||||
name = type_to_string (t);
|
name = type_to_string (t);
|
||||||
|
|
||||||
b->exp_string = xstrprintf ("* (%s *) %s", name,
|
b->exp_string_reparse = xstrprintf ("* (%s *) %s", name,
|
||||||
core_addr_to_string (addr));
|
core_addr_to_string (addr));
|
||||||
xfree (name);
|
xfree (name);
|
||||||
|
|
||||||
|
b->exp_string = xstrprintf ("-location: %.*s",
|
||||||
|
(int) (exp_end - exp_start), exp_start);
|
||||||
|
|
||||||
/* The above expression is in C. */
|
/* The above expression is in C. */
|
||||||
b->language = language_c;
|
b->language = language_c;
|
||||||
}
|
}
|
||||||
@ -9658,6 +9662,7 @@ delete_breakpoint (struct breakpoint *bpt)
|
|||||||
xfree (bpt->addr_string);
|
xfree (bpt->addr_string);
|
||||||
xfree (bpt->exp);
|
xfree (bpt->exp);
|
||||||
xfree (bpt->exp_string);
|
xfree (bpt->exp_string);
|
||||||
|
xfree (bpt->exp_string_reparse);
|
||||||
value_free (bpt->val);
|
value_free (bpt->val);
|
||||||
xfree (bpt->source_file);
|
xfree (bpt->source_file);
|
||||||
xfree (bpt->exec_pathname);
|
xfree (bpt->exec_pathname);
|
||||||
|
@ -450,8 +450,11 @@ struct breakpoint
|
|||||||
/* String form of the breakpoint condition (malloc'd), or NULL if there
|
/* String form of the breakpoint condition (malloc'd), or NULL if there
|
||||||
is no condition. */
|
is no condition. */
|
||||||
char *cond_string;
|
char *cond_string;
|
||||||
/* String form of exp (malloc'd), or NULL if none. */
|
/* String form of exp to use for displaying to the user (malloc'd), or
|
||||||
|
NULL if none. */
|
||||||
char *exp_string;
|
char *exp_string;
|
||||||
|
/* String form to use for reparsing of EXP (malloc'd) or NULL. */
|
||||||
|
char *exp_string_reparse;
|
||||||
|
|
||||||
/* The expression we are watching, or NULL if not a watchpoint. */
|
/* The expression we are watching, or NULL if not a watchpoint. */
|
||||||
struct expression *exp;
|
struct expression *exp;
|
||||||
|
Reference in New Issue
Block a user