From: Tom Tromey <tom@tromey.com>
To: Caroline Tice via Gdb-patches <gdb-patches@sourceware.org>
Cc: Tom Tromey <tom@tromey.com>, Caroline Tice <cmtice@google.com>,
Eric Christopher <echristo@google.com>
Subject: Re: [PATCH] Fix issues with reading rnglists, especially from dwo files, for DWARF v5
Date: Thu, 18 Jun 2020 14:27:24 -0600 [thread overview]
Message-ID: <87h7v815n7.fsf@tromey.com> (raw)
In-Reply-To: <CABtf2+RRjkCa4gkyAsRwxGwqkJ5g=jyN7uk7Au7ym5y4+qCrqw@mail.gmail.com> (Caroline Tice via Gdb-patches's message of "Tue, 9 Jun 2020 16:32:15 -0700")
>>>>> "Caroline" == Caroline Tice via Gdb-patches <gdb-patches@sourceware.org> writes:
Thanks for the patch.
Caroline> + /* if (dwarf2_attr_no_follow (comp_unit_die, DW_AT_ranges)) */
No need for commented-out code.
Caroline> + if (comp_unit_die->attr (DW_AT_ranges) != nullptr)
Caroline> + {
Caroline> + cu->cu_ranges_from_skeleton = true;
Caroline> + }
You can remove the braces here. Normally in gdb there are only braces
if there are multiple statements (or a comment).
Caroline> + if (tag == DW_TAG_compile_unit &&
Caroline> + cu->cu_ranges_from_skeleton)
The GNU / gdb style is to break before operators, not after (including
assignment FWIW). There are several occurrences of this, I didn't mark
them all.
Caroline> + if (section == nullptr)
Caroline> + error(_("Cannot find .debug_rnglists section [in module %s]"),
Space before "(".
Caroline> diff --git a/testsuite/gdb.dwarf2/dw5-rnglist-test.cc b/testsuite/gdb.dwarf2/dw5-rnglist-test.cc
Caroline> new file mode 100644
Caroline> index 0000000..4d650e1279
Caroline> --- /dev/null
Caroline> +++ b/testsuite/gdb.dwarf2/dw5-rnglist-test.cc
Caroline> @@ -0,0 +1,71 @@
Caroline> +#include <iostream>
Tests also need the copyright header.
Caroline> diff --git a/testsuite/gdb.dwarf2/dw5-rnglist-test.exp b/testsuite/gdb.dwarf2/dw5-rnglist-test.exp
Caroline> new file mode 100644
Caroline> index 0000000..b5c6c3bfe3
Caroline> --- /dev/null
Caroline> +++ b/testsuite/gdb.dwarf2/dw5-rnglist-test.exp
Caroline> @@ -0,0 +1,40 @@
Caroline> +# Copyright 2011-2020 Free Software Foundation, Inc.
This should probably just be 2020.
Tom
next prev parent reply other threads:[~2020-06-18 20:27 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
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 [this message]
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=87h7v815n7.fsf@tromey.com \
--to=tom@tromey.com \
--cc=cmtice@google.com \
--cc=echristo@google.com \
--cc=gdb-patches@sourceware.org \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).