This is the mail archive of the gdb-patches@sourceware.cygnus.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]

Re: path for gdb/dwarf2read.c, support 16-bit targets in dwarf-2


Hi Andrew,

Andrew Cagney wrote:
> 
> As far as I know, the dwarf2 and elf information are both ment to be
> self contained.  There shouldn't be any need to refer to some arbitrary
> bfd table to determine what is going on.  If the info says that an
> address is 16 bits for a given section then it sounds like GDB should
> just believe it.
> 
Ok

> As JimK suggested:
> > Or to put it another way, specifically what went wrong on the 68HC11
> > if you didn't change dwarf2read.c?  If it was just the "Dwarf Error:
> > bad address size" error, what happens if you just comment out that
> > check?
> 
> Rather than diging values out of archures I think the possibility of:
>         cu_header.address_size < elf-header.address_size
> should be documented as being just as legetimate (sarcasm :-) as:
>         cu_header.address_size > elf-header.address_size
> and the check either replaced or removed.
> 
>         Andrew

Ok, lets remove the strange test (it does not exist in bfd/dwarf2.c
nor in readelf.c...)

Thanks,
	Stephane
 
2000-03-21  Stephane Carrez  <stcarrez@worldnet.fr>

	* dwarf2read.c (dwarf2_build_psymtabs_hard): Do not check
	the dwarf address size against elf address size.
--- /src/gnu/cygnus/gdb/gdb/dwarf2read.c	Sat Mar  4 11:38:38 2000
+++ gdb/dwarf2read.c	Tue Mar 21 20:50:13 2000
@@ -980,12 +980,6 @@ dwarf2_build_psymtabs_hard (objfile, mai
 		 (long) (beg_of_comp_unit - dwarf_info_buffer));
 	  return;
 	}
-      if (address_size < address_significant_size)
-	{
-	  error ("Dwarf Error: bad address size (%ld) in compilation unit header (offset 0x%lx + 11).",
-		 (long) cu_header.addr_size,
-		 (long) (beg_of_comp_unit - dwarf_info_buffer));
-	}
 
       /* Read the abbrevs for this compilation unit into a table */
       dwarf2_read_abbrevs (abfd, cu_header.abbrev_offset);

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