public inbox for archer-commits@sourceware.org
help / color / mirror / Atom feed
* [SCM]  archer-tromey-dwz-multifile: fix binary search thinko
@ 2012-06-06 19:09 tromey
  0 siblings, 0 replies; only message in thread
From: tromey @ 2012-06-06 19:09 UTC (permalink / raw)
  To: archer-commits

The branch, archer-tromey-dwz-multifile has been updated
       via  ed604dd3d75f53284ea11af3354ba0a415f4aef8 (commit)
       via  89cdd03a520f5b43da5cb49133f65a27516a4fb4 (commit)
      from  ee8d9d8801288fb677620e6bfe6e3df888605e81 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email.

- Log -----------------------------------------------------------------
commit ed604dd3d75f53284ea11af3354ba0a415f4aef8
Author: Tom Tromey <tromey@redhat.com>
Date:   Wed Jun 6 12:40:43 2012 -0600

    fix binary search thinko

commit 89cdd03a520f5b43da5cb49133f65a27516a4fb4
Author: Tom Tromey <tromey@redhat.com>
Date:   Wed Jun 6 11:47:37 2012 -0600

    specially handle DW_FORM_GNU_ref_alt when looking up a type
    
    previous we were not dealing properly with the dwz/not-dwz distinction here

-----------------------------------------------------------------------

Summary of changes:
 gdb/dwarf2read.c |   14 +++++++++++---
 1 files changed, 11 insertions(+), 3 deletions(-)

First 500 lines of diff:
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index cbb5d20..37ff4c2 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -14081,7 +14081,15 @@ lookup_die_type (struct die_info *die, struct attribute *attr,
 
   /* First see if we have it cached.  */
 
-  if (is_ref_attr (attr))
+  if (attr->form == DW_FORM_GNU_ref_alt)
+    {
+      struct dwarf2_per_cu_data *per_cu;
+      sect_offset offset = dwarf2_get_ref_die_offset (attr);
+
+      per_cu = dwarf2_find_containing_comp_unit (offset, 1, cu->objfile);
+      this_type = get_die_type_at_offset (offset, per_cu);
+    }
+  else if (is_ref_attr (attr))
     {
       sect_offset offset = dwarf2_get_ref_die_offset (attr);
 
@@ -16867,8 +16875,8 @@ dwarf2_find_containing_comp_unit (sect_offset offset,
 
       mid_cu = dwarf2_per_objfile->all_comp_units[mid];
       cu_off = &mid_cu->offset;
-      if (mid_cu->is_dwz > offset_in_dwz
-	  || cu_off->sect_off >= offset.sect_off)
+      if (mid_cu->is_dwz >= offset_in_dwz
+	  && cu_off->sect_off >= offset.sect_off)
 	high = mid;
       else
 	low = mid + 1;


hooks/post-receive
--
Repository for Project Archer.


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2012-06-06 19:09 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-06 19:09 [SCM] archer-tromey-dwz-multifile: fix binary search thinko tromey

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).