This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[intercu] Handle DW_FORM_indirect too


Something that occured to me as I was posting the last patch; better safe
than sorry.  This won't affect performance in the common case, i.e. when
using GCC, since neither GCC nor GNU ld will generate DW_FORM_indirect.

Committed to the intercu branch.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer

2004-02-23  Daniel Jacobowitz  <drow@mvista.com>

	* dwarf2read.c (dwarf2_read_abbrevs): Return 1 for DW_FORM_indirect
	also.

Index: dwarf2read.c
===================================================================
RCS file: /cvs/src/src/gdb/dwarf2read.c,v
retrieving revision 1.135.2.27
diff -u -p -r1.135.2.27 dwarf2read.c
--- dwarf2read.c	23 Feb 2004 20:02:37 -0000	1.135.2.27
+++ dwarf2read.c	23 Feb 2004 20:08:17 -0000
@@ -4714,6 +4714,11 @@ dwarf2_read_abbrevs (bfd *abfd, struct d
 	  if (abbrev_form == DW_FORM_ref_addr)
 	    saw_ref_addr = 1;
 
+	  /* If we don't know what form this attribute will have, then it
+	     might potentially be a DW_FORM_ref_addr.  */
+	  if (abbrev_form == DW_FORM_indirect)
+	    saw_ref_addr = 1;
+
 	  cur_attrs[cur_abbrev->num_attrs].name = abbrev_name;
 	  cur_attrs[cur_abbrev->num_attrs++].form = abbrev_form;
 	  abbrev_name = read_unsigned_leb128 (abfd, abbrev_ptr, &bytes_read);


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]