diff options
author | Daniel Jacobowitz <drow@false.org> | 2009-03-11 20:26:02 +0000 |
---|---|---|
committer | Daniel Jacobowitz <drow@false.org> | 2009-03-11 20:26:02 +0000 |
commit | c5bc3a77a2085c737a1ced35de5470ffea2a646c (patch) | |
tree | 65d31a39321d6d530f58253c55970a5288954a6e /gdb | |
parent | 09e8c3bf89960586cdca95e1ccf044be35497ae0 (diff) | |
download | gdb-c5bc3a77a2085c737a1ced35de5470ffea2a646c.zip gdb-c5bc3a77a2085c737a1ced35de5470ffea2a646c.tar.gz gdb-c5bc3a77a2085c737a1ced35de5470ffea2a646c.tar.bz2 |
* breakpoint.c (bpstat_check_breakpoint_conditions): Use
value_mark and value_free_to_mark.
* objfiles.c (free_objfile): Call objfile_free_data before
freeing the BFD.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 7 | ||||
-rw-r--r-- | gdb/breakpoint.c | 9 | ||||
-rw-r--r-- | gdb/objfiles.c | 4 |
3 files changed, 18 insertions, 2 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index ea4697a..400bb73 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,10 @@ +2009-03-11 Daniel Jacobowitz <dan@codesourcery.com> + + * breakpoint.c (bpstat_check_breakpoint_conditions): Use + value_mark and value_free_to_mark. + * objfiles.c (free_objfile): Call objfile_free_data before + freeing the BFD. + 2009-03-10 Hui Zhu <teawater@gmail.com> * disasm.c (gdb_disassembly): Remove unused argument diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index 893e1c2..472eda4 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c @@ -2882,6 +2882,13 @@ bpstat_check_breakpoint_conditions (bpstat bs, ptid_t ptid) if (bl->cond && bl->owner->disposition != disp_del_at_next_stop) { + /* We use value_mark and value_free_to_mark because it could + be a long time before we return to the command level and + call free_all_values. We can't call free_all_values + because we might be in the middle of evaluating a + function call. */ + struct value *mark = value_mark (); + /* Need to select the frame, with all that implies so that the conditions will have the right context. */ select_frame (get_current_frame ()); @@ -2890,7 +2897,7 @@ bpstat_check_breakpoint_conditions (bpstat bs, ptid_t ptid) "Error in testing breakpoint condition:\n", RETURN_MASK_ALL); /* FIXME-someday, should give breakpoint # */ - free_all_values (); + value_free_to_mark (mark); } if (bl->cond && value_is_zero) { diff --git a/gdb/objfiles.c b/gdb/objfiles.c index bc77de8..795d53b 100644 --- a/gdb/objfiles.c +++ b/gdb/objfiles.c @@ -422,6 +422,9 @@ free_objfile (struct objfile *objfile) (*objfile->sf->sym_finish) (objfile); } + /* Discard any data modules have associated with the objfile. */ + objfile_free_data (objfile); + /* We always close the bfd, unless the OBJF_KEEPBFD flag is set. */ if (objfile->obfd != NULL && !(objfile->flags & OBJF_KEEPBFD)) @@ -476,7 +479,6 @@ free_objfile (struct objfile *objfile) /* The last thing we do is free the objfile struct itself. */ - objfile_free_data (objfile); if (objfile->name != NULL) { xfree (objfile->name); |