This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch] Allow dummy CUs created by incremental linker
- From: Tom Tromey <tromey at redhat dot com>
- To: Cary Coutant <ccoutant at google dot com>
- Cc: gdb-patches at sourceware dot org, Doug Evans <dje at google dot com>
- Date: Wed, 19 Oct 2011 08:40:15 -0600
- Subject: Re: [patch] Allow dummy CUs created by incremental linker
- References: <CAHACq4q74NiMgxg=J7b0HCotZfJtwdfxHhCnkfwwvWu=FMgJDg@mail.gmail.com>
>>>>> "Cary" == Cary Coutant <ccoutant@google.com> writes:
Cary> With the new incremental linking support in gold, we leave patch space
Cary> in the file at link time, and use that patch space for incremental
Cary> updates. If the file has debug info, that means that the debug info
Cary> might have "holes" in it. Because the debugger can't deal with
Cary> arbitrary holes in the debug info, gold fills the holes with dummy
Cary> compilation units, where each dummy CU consists of a compilation unit
Cary> header whose length field cover the hole, and the rest of the space
Cary> filled with zeroes. This patch updated gdb to tolerate these dummy
Cary> CUs, by checking for an empty CU before attempting to read the DIEs.
Thanks.
Cary> +static unsigned int
Cary> +peek_abbrev_code (bfd *abfd, gdb_byte *info_ptr)
Cary> +{
Cary> + unsigned int bytes_read;
Cary> + return read_unsigned_leb128 (abfd, info_ptr, &bytes_read);
Our coding style requires a newline after the declarations.
Ok with that change.
Tom