aboutsummaryrefslogtreecommitdiff
path: root/gdb/frame-base.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/frame-base.c')
-rw-r--r--gdb/frame-base.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gdb/frame-base.c b/gdb/frame-base.c
index db9547b..656ab25 100644
--- a/gdb/frame-base.c
+++ b/gdb/frame-base.c
@@ -73,6 +73,7 @@ frame_base_init (struct obstack *obstack)
{
struct frame_base_table *table
= OBSTACK_ZALLOC (obstack, struct frame_base_table);
+
table->tail = &table->head;
table->default_base = &default_frame_base;
return table;
@@ -83,6 +84,7 @@ frame_base_append_sniffer (struct gdbarch *gdbarch,
frame_base_sniffer_ftype *sniffer)
{
struct frame_base_table *table = gdbarch_data (gdbarch, frame_base_data);
+
(*table->tail) = GDBARCH_OBSTACK_ZALLOC (gdbarch, struct frame_base_table_entry);
(*table->tail)->sniffer = sniffer;
table->tail = &(*table->tail)->next;
@@ -93,6 +95,7 @@ frame_base_set_default (struct gdbarch *gdbarch,
const struct frame_base *default_base)
{
struct frame_base_table *table = gdbarch_data (gdbarch, frame_base_data);
+
table->default_base = default_base;
}
@@ -106,6 +109,7 @@ frame_base_find_by_frame (struct frame_info *this_frame)
for (entry = table->head; entry != NULL; entry = entry->next)
{
const struct frame_base *desc = NULL;
+
desc = entry->sniffer (this_frame);
if (desc != NULL)
return desc;