From: Caroline Tice <cmtice@google.com>
To: Tom Tromey <tom@tromey.com>
Cc: Caroline Tice via Gdb-patches <gdb-patches@sourceware.org>,
Eric Christopher <echristo@google.com>
Subject: Re: [PATCH] Fix issues with reading rnglists, especially from dwo files, for DWARF v5
Date: Tue, 2 Jun 2020 10:04:19 -0700 [thread overview]
Message-ID: <CABtf2+RyF+G_YsVum8jNjb-kGLORrqhz+8cUJEc-pgYc3tPwtA@mail.gmail.com> (raw)
In-Reply-To: <87lfl634rs.fsf@tromey.com>
[-- Attachment #1: Type: text/plain, Size: 3141 bytes --]
On Mon, Jun 1, 2020 at 1:33 PM Tom Tromey <tom@tromey.com> wrote:
>
> >>>>> "Caroline" == Caroline Tice via Gdb-patches <gdb-patches@sourceware.org> writes:
>
> Caroline> This patch fixes these issues. I verified that it fixes the
> Caroline> issues I saw and that it does not cause any testsuite
> Caroline> regressions (on x86_64 ubuntu linux).
>
> Is there a way to reproduce the failures with the current test suite?
> Say, by running some test using some board file?
I have not been able to reproduce it with the current testsuite. The
issue is largely related to processing DW_FORM_rmglistx, which I have
not been able to get GCC to produce (it generated a DW_FORM_sec_offset
instead); I get my issue using llvm. I will attempt to attach a
gzip'ed tarball (if gmail will let me) containing my small test case.
It has 2 .cpp files, 1 .h file, the two clang-generated .dwo files,
and the final binary. The command I used to compile the sources, and
obtain the .dwo & binary files is:
$ clang++ -gdwarf-5 -O0 -gsplit-dwarf pre-order.cpp
pre-order-common.cpp -o pre-order
To see the first of the issues, you need to enable complaints (change
the value of "stop_whining" in complaints.c to something like 10).
When you do that, rebuild gdb, and load the binary into gdb, it
immediately complains:
$ ~/fsf-gdb.clean.obj/gdb/gdb pre-order
...
Reading symbols from pre-order...
During symbol reading: Invalid .debug_rnglists data (no base address)
During symbol reading: Invalid .debug_rnglists data (no base address)
(gdb) quit
This is because of the incorrect reading of the DW_FORM_rnglistx
index. GDB then ignores the rnglists altogether because it can't read
them.
>
> Caroline> @@ -793,12 +796,18 @@ struct virtual_v2_dwo_sections
> Caroline> bfd_size_type loc_offset;
> Caroline> bfd_size_type loc_size;
>
> Caroline> + bfd_size_type loclists_offset;
> Caroline> + bfd_size_type loclists_size;
> Caroline> +
> Caroline> bfd_size_type macinfo_offset;
> Caroline> bfd_size_type macinfo_size;
>
> Caroline> bfd_size_type macro_offset;
> Caroline> bfd_size_type macro_size;
>
> Caroline> + bfd_size_type rnglists_offset;
> Caroline> + bfd_size_type rnglists_size;
>
> These new members don't seem to be used anywhere.
Oh. Those get used in my next upcoming patch (where I update GDB to
handle DWARFv5 .dwp files). I can either leave them in this patch, or
remove them from here and put them in the next one, whichever you
prefer.
>
> Caroline> +static struct dwarf2_section_info *cu_debug_rnglist_section (struct
> Caroline> + dwarf2_cu *cu);
>
> Probably better to split before the "(" and then indent the continuation
> line 2 spaces.
>
> Caroline> - default:
> Caroline> + case DW_RLE_startx_endx:
>
> Looks like the indentation here is incorrect.
>
> Caroline> +
> Caroline> + attr = die->attr (DW_AT_rnglists_base);
>
> Extra space after the "=".
Thanks for the review! I will fix the formatting issues, and resubmit
as soon as you indicate whether to leave in or take out the currently
unused fields.
-- Caroline
>
> Tom
[-- Attachment #2: gdb-rnglist-test.tar.gz --]
[-- Type: application/x-gzip, Size: 27275 bytes --]
next prev parent reply other threads:[~2020-06-02 17:04 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-01 17:16 Caroline Tice
2020-06-01 20:33 ` Tom Tromey
2020-06-02 17:04 ` Caroline Tice [this message]
2020-06-03 14:49 ` Tom Tromey
2020-06-04 21:39 ` Caroline Tice
2020-06-09 23:32 ` Caroline Tice
2020-06-16 15:37 ` Caroline Tice
2020-06-18 20:27 ` Tom Tromey
2020-06-23 19:04 ` Caroline Tice
2020-07-01 0:09 ` Caroline Tice
2020-07-01 0:34 ` Simon Marchi
2020-07-01 0:36 ` Simon Marchi
2020-07-01 19:57 ` Caroline Tice
2020-07-02 5:41 ` Simon Marchi
2020-07-03 22:47 ` [PATCH V3] " Caroline Tice
2020-07-04 5:11 ` Simon Marchi
2020-07-09 15:48 ` [PATCH V4] " Caroline Tice
2020-07-11 17:54 ` Simon Marchi
2020-07-14 15:47 ` [PATCH V5] " Caroline Tice
2020-07-15 2:04 ` Simon Marchi
2020-07-15 3:15 ` Simon Marchi
2020-07-15 16:57 ` Caroline Tice
2020-07-15 17:04 ` H.J. Lu
2020-07-15 22:35 ` Caroline Tice
2020-07-16 2:34 ` Simon Marchi
2020-07-16 4:46 ` Caroline Tice
2020-07-16 15:41 ` Simon Marchi
2020-07-16 15:46 ` Caroline Tice
2020-07-16 16:09 ` Simon Marchi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CABtf2+RyF+G_YsVum8jNjb-kGLORrqhz+8cUJEc-pgYc3tPwtA@mail.gmail.com \
--to=cmtice@google.com \
--cc=echristo@google.com \
--cc=gdb-patches@sourceware.org \
--cc=tom@tromey.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox