diff options
author | Jim Kingdon <jkingdon@engr.sgi.com> | 1991-04-22 07:08:07 +0000 |
---|---|---|
committer | Jim Kingdon <jkingdon@engr.sgi.com> | 1991-04-22 07:08:07 +0000 |
commit | fcb887ffcd896af0b53c7ac8808bfeed54b321e8 (patch) | |
tree | 5cd8b0003e433499305094cd4143ae12e71391f4 /gdb/values.c | |
parent | 33614d0fc6d6209e6a3297473b14f04393ce0267 (diff) | |
download | gdb-fcb887ffcd896af0b53c7ac8808bfeed54b321e8.zip gdb-fcb887ffcd896af0b53c7ac8808bfeed54b321e8.tar.gz gdb-fcb887ffcd896af0b53c7ac8808bfeed54b321e8.tar.bz2 |
* breakpoint.c (bpstat_print): Try all elements on the bpstat
chain before giving up with an internal error.
Sun Apr 21 21:43:10 1991 Jim Kingdon (kingdon at cygint.cygnus.com)
* value.h, values.c (value_{,free_to_}mark): New functions.
breakpoint.c (bpstat_stop_status): Use them.
Diffstat (limited to 'gdb/values.c')
-rw-r--r-- | gdb/values.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/gdb/values.c b/gdb/values.c index 196ea23..2449da5 100644 --- a/gdb/values.c +++ b/gdb/values.c @@ -111,6 +111,31 @@ allocate_repeat_value (type, count) return val; } +/* Return a mark in the value chain. All values allocated after the + mark is obtained (except for those released) are subject to being freed + if a subsequent value_free_to_mark is passed the mark. */ +value +value_mark () +{ + return all_values; +} + +/* Free all values allocated since MARK was obtained by value_mark + (except for those released). */ +void +value_free_to_mark (mark) + value mark; +{ + value val, next; + + for (val = all_values; val && val != mark; val = next) + { + next = VALUE_NEXT (val); + value_free (val); + } + all_values = val; +} + /* Free all the values that have been allocated (except for those released). Called after each command, successful or not. */ |