This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[RFA] Debug info detection.
- From: Michal Ludvig <mludvig at suse dot cz>
- To: GDB Patches <gdb-patches at sources dot redhat dot com>
- Date: Fri, 07 Mar 2003 00:06:25 +0100
- Subject: [RFA] Debug info detection.
- Organization: SuSE CR
Hi all,
The attached patch adds new function cfi_have_unwind_info() that I'll
use for detection, whether a given function has a dwarf2 unwind info
(from .eh_frame or .debug_frame) or not. I'll use it in the upcomming
x86_64_frame_p() to detect which set of unwind functions should be
returned for a given frame.
OK to commit?
Michal Ludvig
--
* SuSE CR, s.r.o * mludvig at suse dot cz
* (+420) 296.545.373 * http://www.suse.cz
2003-03-06 Michal Ludvig <mludvig at suse dot cz>
* dwarf2cfi.c (cfi_have_unwind_info): New function.
* dwarf2cfi.h (cfi_have_unwind_info): New prototype.
Index: dwarf2cfi.c
===================================================================
RCS file: /cvs/src/src/gdb/dwarf2cfi.c,v
retrieving revision 1.31
diff -u -p -r1.31 dwarf2cfi.c
--- dwarf2cfi.c 10 Feb 2003 11:50:20 -0000 1.31
+++ dwarf2cfi.c 6 Mar 2003 22:57:56 -0000
@@ -835,6 +835,12 @@ frame_state_for (struct context *context
fde->data + fde->data_length, context, fs);
}
+struct fde_unit *
+cfi_have_unwind_info (CORE_ADDR pc)
+{
+ return get_fde_for_addr (pc);
+}
+
static void
get_reg (char *reg, struct context *context, int regnum)
{
Index: dwarf2cfi.h
===================================================================
RCS file: /cvs/src/src/gdb/dwarf2cfi.h,v
retrieving revision 1.4
diff -u -p -r1.4 dwarf2cfi.h
--- dwarf2cfi.h 9 Dec 2002 02:04:16 -0000 1.4
+++ dwarf2cfi.h 6 Mar 2003 22:57:56 -0000
@@ -75,6 +75,9 @@ void cfi_init_extra_frame_info (int from
/* Obtain return address of the frame. */
CORE_ADDR cfi_get_ra (struct frame_info *fi);
+/* Check if there is an unwind info for a given PC. */
+struct fde_unit *cfi_have_unwind_info (CORE_ADDR pc);
+
/* Find register number REGNUM relative to FRAME and put its
(raw) contents in *RAW_BUFFER. Set *OPTIMIZED if the variable
was optimized out (and thus can't be fetched). If the variable