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: Thu, 23 Jul 2015 09:28:12 -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> <CADPb22QsKYAEb_Tkvazk8c2G54_q59BuBa1QY_PgmZdQfbq_CQ at mail dot gmail dot com>
On Tue, Jul 21, 2015 at 7:43 AM, Doug Evans <dje@google.com> wrote:
> 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.
[fyi]
Committed.