From: Doug Evans <dje@google.com>
To: gdb-patches@sourceware.org
Subject: Re: [commit] (read_cutu_die_from_dwo): Fix assertion
Date: Thu, 03 Apr 2014 19:15:00 -0000 [thread overview]
Message-ID: <21309.45871.16571.481751@ruffy.mtv.corp.google.com> (raw)
In-Reply-To: <yjt2zjk2s00h.fsf@ruffy.mtv.corp.google.com>
Doug Evans writes:
> Hi.
>
> Thinko on my part, checked in as obvious.
>
> 2014-04-03 Doug Evans <dje@google.com>
>
> * dwarf2read.c (read_cutu_die_from_dwo): Fix assertion, at most one
> of stub_comp_unit_die, stub_comp_dir is non-NULL.
>
> diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
> index 3e77cf8..103219c 100644
> --- a/gdb/dwarf2read.c
> +++ b/gdb/dwarf2read.c
> @@ -4977,8 +4977,8 @@ read_cutu_die_from_dwo (struct dwarf2_per_cu_data *this_cu,
> struct attribute *attr;
> struct die_info *comp_unit_die;
>
> - /* Exactly one of these must be provided. */
> - gdb_assert ((stub_comp_unit_die != NULL) + (stub_comp_dir != NULL) == 1);
> + /* At most one of these may be provided. */
> + gdb_assert ((stub_comp_unit_die != NULL) + (stub_comp_dir != NULL) <= 1);
>
> /* These attributes aren't processed until later:
> DW_AT_stmt_list, DW_AT_low_pc, DW_AT_high_pc, DW_AT_ranges.
Bleah. Plus the correspondent function comment update.
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index 103219c..d156504 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -4946,8 +4946,8 @@ init_cu_die_reader (struct die_reader_specs *reader,
from it to the DIE in the DWO. If NULL we are skipping the stub.
STUB_COMP_DIR is similar to STUB_COMP_UNIT_DIE: When reading a TU directly
from the DWO file, bypassing the stub, it contains the DW_AT_comp_dir
- attribute of the referencing CU. Exactly one of STUB_COMP_UNIT_DIE and
- STUB_COMP_DIR must be non-NULL.
+ attribute of the referencing CU. At most one of STUB_COMP_UNIT_DIE and
+ STUB_COMP_DIR may be non-NULL.
*RESULT_READER,*RESULT_INFO_PTR,*RESULT_COMP_UNIT_DIE,*RESULT_HAS_CHILDREN
are filled in with the info of the DIE from the DWO file.
ABBREV_TABLE_PROVIDED is non-zero if the caller of init_cutu_and_read_dies
prev parent reply other threads:[~2014-04-03 19:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-03 19:09 Doug Evans
2014-04-03 19:15 ` Doug Evans [this message]
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=21309.45871.16571.481751@ruffy.mtv.corp.google.com \
--to=dje@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