This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] dwarf2read.c: Don't read pc/line-number mapping for type units


On Mon, Jan 9, 2012 at 7:51 PM, Joel Brobecker <brobecker@adacore.com> wrote:
>> Type units don't need the pc/line-number mapping,
>> and this can save a lot of space.
>
> Types in general have a sloc, and we sometimes use them. For instance,
> trying the following:
>
> ? ? ? ?(gdb) ptype ambiguous_type
> ? ? ? ?Multiple matches for ambiguous_type
> ? ? ? ?[0] cancel
> ? ? ? ?[1] pck.ambiguous_type at pck.adb:8
> ? ? ? ?[2] bar.ambiguous_type at bar.adb:9
> ? ? ? ?>
>
> Is your patch going to affect the above?

Appended is what I committed to trunk.
I think it's fine.

>> Joel: I'd also like to check this into the 7.4 branch.
>> IMO it's safe enough.
>
> No problem on my end if the concerns above are unfounded.
> Although I know I do not know this file as well as you do.

It's rarely how much I know, it's how much I remember. 1/2 :-)

The memory space reduction is substantial so I'd like to get this in 7.4.
[the reduction only kicks in for .debug_types, btw]

2012-01-10  Doug Evans  <dje@google.com>

        * dwarf2read.c (dwarf_decode_lines): Remove arg "abfd".  New arg
        "want_line_info".  All callers updated.
        (dwarf_decode_lines_1): New function.
        (handle_DW_AT_stmt_list): Add function comment.
        New arg "want_line_info".  All callers updated.
        (read_file_scope,read_type_unit_scope): Move comment from
        handle_DW_AT_stmt_list to here.

Attachment: gdb-120110-type-unit-line-info-2.patch.txt
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]