This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
RE: How to locate the DIE from Dwarf Error message?
- From: "Keith Walker" <kwalker at arm dot com>
- To: "'Terry Guo'" <flameroc at gmail dot com>
- Cc: <gdb at sourceware dot org>
- Date: Wed, 9 Apr 2014 10:53:36 +0100
- Subject: RE: How to locate the DIE from Dwarf Error message?
- Authentication-results: sourceware.org; auth=none
- References: <CAGbRaL7e_1v-DVHNwUNRZg5V4XhrViVtFw7pFCT9H8m1DqQu1g at mail dot gmail dot com>
I would expect that the error is referencing a DIE at an offset of 0x1d1b8
in the .debug_info (or possibly .debug_types) section.
I suspect that you will find that this DIE has an attribute which has a
reference which points at offset 0x0 which has caused this error message.
[ This is the DWARF equivalent of attempting to dereference a NULL pointer
:-) ]
Of course the real question will then be why is there a reference to 0x0
rather than to an actual DIE.
Keith
> -----Original Message-----
> From: gdb-owner@sourceware.org [mailto:gdb-owner@sourceware.org] On
> Behalf Of Terry Guo
> Sent: 09 April 2014 03:26
> To: gdb@sourceware.org
> Subject: How to locate the DIE from Dwarf Error message?
>
> Hi there,
>
> I am using gdb to debug my ELF file and getting below message:
>
> Dwarf Error: Cannot find DIE at 0x0 referenced from DIE at 0x1d1b8 [in
> module /Users/darius/work/micro/ussio/ussio-dbg-bug/main.elf]
>
> After dump the dwarf information from main.elf with command
> "arm-none-eabi-readelf -w main.elf", I can not find anything related
> to address 0x1d1b8. So what does the 0x1d1b8 stand for? How can I
> figure out which DIE at this address? Please help. Thanks.
>
> BR,
> Terry