From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31157 invoked by alias); 6 Mar 2003 23:06:27 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 31139 invoked from network); 6 Mar 2003 23:06:26 -0000 Received: from unknown (HELO kerberos.suse.cz) (195.47.106.10) by 172.16.49.205 with SMTP; 6 Mar 2003 23:06:26 -0000 Received: from chimera.suse.cz (chimera.suse.cz [10.20.0.2]) by kerberos.suse.cz (SuSE SMTP server) with ESMTP id DBA7659D307 for ; Fri, 7 Mar 2003 00:06:25 +0100 (CET) Received: from suse.cz (naga.suse.cz [10.20.1.16]) by chimera.suse.cz (8.11.0/8.11.0/SuSE Linux 8.11.0-0.4) with ESMTP id h26N6P406165 for ; Fri, 7 Mar 2003 00:06:25 +0100 X-Authentication-Warning: chimera.suse.cz: Host naga.suse.cz [10.20.1.16] claimed to be suse.cz Message-ID: <3E67D471.3040100@suse.cz> Date: Thu, 06 Mar 2003 23:06:00 -0000 From: Michal Ludvig Organization: SuSE CR User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20021130 X-Accept-Language: cs, cz, en MIME-Version: 1.0 To: GDB Patches Subject: [RFA] Debug info detection. Content-Type: multipart/mixed; boundary="------------070600090805090504040702" X-SW-Source: 2003-03/txt/msg00147.txt.bz2 This is a multi-part message in MIME format. --------------070600090805090504040702 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-length: 431 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@suse.cz * (+420) 296.545.373 * http://www.suse.cz --------------070600090805090504040702 Content-Type: text/plain; name="cfi-haveinfo-1.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="cfi-haveinfo-1.diff" Content-length: 1451 2003-03-06 Michal Ludvig * 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 --------------070600090805090504040702--