This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Don't crash on dummy CUs
- From: Doug Evans <dje at google dot com>
- To: Yao Qi <qiyaoltc at gmail dot com>
- Cc: gdb-patches <gdb-patches at sourceware dot org>
- Date: Tue, 21 Jul 2015 07:43:30 -0700
- Subject: Re: [PATCH] Don't crash on dummy CUs
- Authentication-results: sourceware.org; auth=none
- References: <001a11c301ba256356051b42e72e at google dot com> <86a8urhtbs dot fsf at gmail dot com>
On Mon, Jul 20, 2015 at 6:06 AM, Yao Qi <qiyaoltc@gmail.com> wrote:
>
> Doug Evans <dje@google.com> writes:
>
> > + .text
> > +main:
> > + .4byte 0
> > +main_end:
> > +
> > + .section .debug_info
> > + .4byte .Ldebug_info_end - 1f /* Length of Compilation Unit Info */
> > +1:
> > + .2byte 0x2 /* DWARF version number */
> > + .4byte .Ldebug_abbrev0 /* Offset Into Abbrev. Section */
> > + .byte 0x4 /* Pointer Size (in bytes) */
> > +
> > + /* Nothing else, this is a dummy die. */
> > +.Ldebug_info_end:
> > +
> > + .section .debug_abbrev
> > +.Ldebug_abbrev0:
> > + .byte 0x0
>
> Hi Doug,
> Can we generate this file by dwarf assembler? I don't know much about
> dwarf2read.c, so can't give any comments useful to changes there.
>
There's no real value to using the dwarf assembler here, it's an
intentionally empty CU.