From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9319 invoked by alias); 21 May 2002 02:05:48 -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 9270 invoked from network); 21 May 2002 02:05:45 -0000 Received: from unknown (HELO cygnus.com) (205.180.83.203) by sources.redhat.com with SMTP; 21 May 2002 02:05:45 -0000 Received: from localhost.redhat.com (remus.sfbay.redhat.com [172.16.27.252]) by runyon.cygnus.com (8.8.7-cygnus/8.8.7) with ESMTP id TAA22215 for ; Mon, 20 May 2002 19:05:44 -0700 (PDT) Received: by localhost.redhat.com (Postfix, from userid 469) id AF6C910FC9; Mon, 20 May 2002 22:05:09 -0400 (EDT) From: Elena Zannoni MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15593.43860.998519.308832@localhost.redhat.com> Date: Mon, 20 May 2002 19:05:00 -0000 To: Michal Ludvig Cc: gdb-patches@sources.redhat.com Subject: Re: [RFA] dwarf2cfi.c fix for shlibs In-Reply-To: <3CE27AD4.4090406@suse.cz> References: <3CE27AD4.4090406@suse.cz> X-SW-Source: 2002-05/txt/msg00828.txt.bz2 Michal Ludvig writes: > Hi all, > this patch fixed mapping of FDE entries from shared libraries. > OK to commit to mainline and branch? > > 2002-05-15 Michal Ludvig > > * dwarf2cfi.c (dwarf2_build_frame_info): Add objfile->section_offset > to fde->initial_location so that frames of shared libraries are mapped > correctly. > > Michal Ludvig > -- > * SuSE CR, s.r.o * mludvig@suse.cz > * +420 2 9654 5373 * http://www.suse.cz > Index: dwarf2cfi.c > =================================================================== > RCS file: /cvs/src/src/gdb/dwarf2cfi.c,v > retrieving revision 1.1.2.2 > diff -c -3 -p -r1.1.2.2 dwarf2cfi.c > *** dwarf2cfi.c 14 May 2002 09:50:39 -0000 1.1.2.2 > --- dwarf2cfi.c 15 May 2002 15:03:06 -0000 > *************** dwarf2_build_frame_info (struct objfile > *** 1476,1482 **** > fde = fde_unit_alloc (); > > fde_chunks.array[fde_chunks.elems++] = fde; > ! fde->initial_location = read_pointer (abfd, &start); > fde->address_range = read_pointer (abfd, &start); > > for (cie = cie_chunks; > --- 1476,1483 ---- > fde = fde_unit_alloc (); > > fde_chunks.array[fde_chunks.elems++] = fde; > ! fde->initial_location = read_pointer (abfd, &start) > ! + objfile->section_offsets[objfile->sect_index_text].offsets[0]; > fde->address_range = read_pointer (abfd, &start); > > for (cie = cie_chunks; You should use fde->initial_location = read_pointer (abfd, &start) + ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile)); instead. Otherwise it's ok. Elena BTW: I get 2 warnings compiling dwarf2cfi.c on i386. /home/ezannoni/sources/src/gdb/dwarf2cfi.c: In function `execute_stack_op': /home/ezannoni/sources/src/gdb/dwarf2cfi.c:1079: warning: cast to pointer from integer of different size /home/ezannoni/sources/src/gdb/dwarf2cfi.c:1086: warning: cast to pointer from integer of different size