/* Definitions for frame unwinder, for GDB, the GNU debugger.
- Copyright (C) 2003, 2004, 2007, 2008, 2009, 2010
+ Copyright (C) 2003, 2004, 2007, 2008, 2009, 2010, 2011
Free Software Foundation, Inc.
This file is part of GDB.
{
struct frame_unwind_table *table
= OBSTACK_ZALLOC (obstack, struct frame_unwind_table);
+
/* Start the table out with a few default sniffers. OSABI code
can't override this. */
table->list = OBSTACK_ZALLOC (obstack, struct frame_unwind_table_entry);
- table->list->unwinder = dummy_frame_unwind;
- table->list->next = OBSTACK_ZALLOC (obstack, struct frame_unwind_table_entry);
- table->list->next->unwinder = inline_frame_unwind;
+ table->list->unwinder = &dummy_frame_unwind;
+ table->list->next = OBSTACK_ZALLOC (obstack,
+ struct frame_unwind_table_entry);
+ table->list->next->unwinder = &inline_frame_unwind;
/* The insertion point for OSABI sniffers. */
table->osabi_head = &table->list->next->next;
return table;
(*ip)->unwinder = unwinder;
}
-const struct frame_unwind *
+/* Iterate through sniffers for THIS_FRAME frame until one returns with an
+ unwinder implementation. THIS_FRAME->UNWIND must be NULL, it will get set
+ by this function. Possibly initialize THIS_CACHE. */
+
+void
frame_unwind_find_by_frame (struct frame_info *this_frame, void **this_cache)
{
struct gdbarch *gdbarch = get_frame_arch (this_frame);
this_cache))
{
discard_cleanups (old_cleanup);
- return entry->unwinder;
+ return;
}
do_cleanups (old_cleanup);
}
register NEW_REGNUM. */
struct value *
-frame_unwind_got_register (struct frame_info *frame, int regnum, int new_regnum)
+frame_unwind_got_register (struct frame_info *frame,
+ int regnum, int new_regnum)
{
return value_of_register_lazy (frame, new_regnum);
}
return reg_val;
}
-extern initialize_file_ftype _initialize_frame_unwind; /* -Wmissing-prototypes */
+/* -Wmissing-prototypes */
+extern initialize_file_ftype _initialize_frame_unwind;
void
_initialize_frame_unwind (void)