Re: [RFA] dwarf2cfi.c fix for shlibs

Michal Ludvig
2002-05-22T13:23:32Z

[-- Attachment #1: Type: text/plain, Size: 791 bytes --]

Elena Zannoni wrote:

> You should use
>
> fde->initial_location = read_pointer (abfd, &start)
> + ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile));
>
> instead.
> Otherwise it's ok.

Thanks, commited to both mainline and branch along with the eh_frame thing.

> 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

Appended patch should fix these warnings. Commited as obvious.

Michal Ludvig
--
* SuSE CR, s.r.o * mludvig@suse.cz
* +420 2 9654 5373 * http://www.suse.cz

[-- Attachment #2: cfi-ptrwarning.diff --]
[-- Type: text/plain, Size: 719 bytes --]

Index: dwarf2cfi.c
===================================================================
RCS file: /cvs/src/src/gdb/dwarf2cfi.c,v
retrieving revision 1.1.2.3
diff -c -3 -p -r1.1.2.3 dwarf2cfi.c
*** dwarf2cfi.c 22 May 2002 12:55:38 -0000 1.1.2.3
--- dwarf2cfi.c 22 May 2002 13:15:28 -0000
*************** execute_stack_op (struct objfile *objfil
*** 875,881 ****
while (op_ptr < op_end)
{
enum dwarf_location_atom op = *op_ptr++;
! ULONGEST result, reg;
LONGEST offset;

switch (op)
--- 875,882 ----
while (op_ptr < op_end)
{
enum dwarf_location_atom op = *op_ptr++;
! CORE_ADDR result;
! ULONGEST reg;
LONGEST offset;

switch (op)