summaryrefslogtreecommitdiff
path: root/gdb/breakpoint.c
diff options
context:
space:
mode:
authorPeter Schauer <Peter.Schauer@mytum.de>1996-04-28 10:49:54 +0000
committerPeter Schauer <Peter.Schauer@mytum.de>1996-04-28 10:49:54 +0000
commit39ce68291e9afa7e74fa2daf74237b2296ea8b5c (patch)
treeb6466187ad9a0916219bb069e7289b108fe0fd77 /gdb/breakpoint.c
parent6c0643e30f9b6c45fa120035893a3d1226f2ebf1 (diff)
* breakpoint.c (delete_breakpoint): Fix bpt->val, bpt->exp
storage leaks. (breakpoint_re_set_one): Fix b->exp, b->val, b->cond storage leaks. * infcmd.c (run_command), solib.c (locate_base): Check for target_has_execution in addition to inferior_pid, a core file from a threaded program is yielding a non-zero inferior_pid. * sparc-tdep.c (get_saved_register): Handle window registers in a dummy frame correctly.
Diffstat (limited to 'gdb/breakpoint.c')
-rw-r--r--gdb/breakpoint.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index bb18f5677b..a92164660b 100644
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -1972,6 +1972,8 @@ set_raw_breakpoint (sal)
static int internal_breakpoint_number = -1;
+#ifdef GET_LONGJMP_TARGET
+
static void
create_longjmp_breakpoint (func_name)
char *func_name;
@@ -2007,6 +2009,8 @@ create_longjmp_breakpoint (func_name)
b->number = internal_breakpoint_number--;
}
+#endif /* #ifdef GET_LONGJMP_TARGET */
+
/* Call this routine when stepping and nexting to enable a breakpoint if we do
a longjmp(). When we hit that breakpoint, call
set_longjmp_resume_breakpoint() to figure out where we are going. */
@@ -3299,8 +3303,12 @@ delete_breakpoint (bpt)
free (bpt->cond_string);
if (bpt->addr_string != NULL)
free (bpt->addr_string);
+ if (bpt->exp != NULL)
+ free (bpt->exp);
if (bpt->exp_string != NULL)
free (bpt->exp_string);
+ if (bpt->val != NULL)
+ value_free (bpt->val);
if (bpt->source_file != NULL)
free (bpt->source_file);
@@ -3433,9 +3441,13 @@ breakpoint_re_set_one (bint)
particular level, but that's going to be less stable than filenames
or functionnames. */
/* So for now, just use a global context. */
+ if (b->exp)
+ free ((PTR)b->exp);
b->exp = parse_expression (b->exp_string);
b->exp_valid_block = innermost_block;
mark = value_mark ();
+ if (b->val)
+ value_free (b->val);
b->val = evaluate_expression (b->exp);
release_value (b->val);
if (VALUE_LAZY (b->val))
@@ -3444,6 +3456,8 @@ breakpoint_re_set_one (bint)
if (b->cond_string != NULL)
{
s = b->cond_string;
+ if (b->cond)
+ free ((PTR)b->cond);
b->cond = parse_exp_1 (&s, (struct block *)0, 0);
}
if (b->enable == enabled)