Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: dje@google.com (Doug Evans)
To: gdb-patches@sourceware.org
Subject: [commit] dwarf2read.c (load_partial_dies): Change condition to assert.
Date: Sat, 07 Apr 2012 19:39:00 -0000	[thread overview]
Message-ID: <20120407193915.4B21224618E@ruffy.mtv.corp.google.com> (raw)

Hi.

There's no caller where cu->per_cu == NULL,
and I'd rather have the assert.

Regression tested on amd64-linux.

2012-04-07  Doug Evans  <dje@google.com>

	* dwarf2read.c (load_partial_dies): Change condition to assert.

Index: dwarf2read.c
===================================================================
RCS file: /cvs/src/src/gdb/dwarf2read.c,v
retrieving revision 1.627
diff -u -p -r1.627 dwarf2read.c
--- dwarf2read.c	19 Mar 2012 19:59:19 -0000	1.627
+++ dwarf2read.c	7 Apr 2012 19:33:59 -0000
@@ -9522,7 +9522,8 @@ load_partial_dies (bfd *abfd, gdb_byte *
   parent_die = NULL;
   last_die = NULL;
 
-  if (cu->per_cu && cu->per_cu->load_all_dies)
+  gdb_assert (cu->per_cu != NULL);
+  if (cu->per_cu->load_all_dies)
     load_all = 1;
 
   cu->partial_dies


             reply	other threads:[~2012-04-07 19:39 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-07 19:39 Doug Evans [this message]
2012-04-07 20:40 ` Michael Eager
2012-04-07 20:49   ` Doug Evans
2012-04-07 21:46     ` Michael Eager
2012-04-07 22:14       ` Doug Evans
2012-04-07 22:27         ` Michael Eager

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=20120407193915.4B21224618E@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