Experiences building and using gdb 6.8 on Solaris

Paul Pluzhnikov ppluzhnikov@google.com
Thu Apr 30 16:18:00 GMT 2009


On Thu, Apr 30, 2009 at 7:51 AM, Frank Middleton
<f.middleton@apogeect.com> wrote:

> Still seems to fail...
> elfread.c:433: internal-error: sect_index_data not initialized

I misread the exact location where it fails.
Does attached patch fix it for you?

Cheers,
-- 
Paul Pluzhnikov
-------------- next part --------------
Index: elfread.c
===================================================================
RCS file: /cvs/src/src/gdb/elfread.c,v
retrieving revision 1.76
diff -u -p -u -r1.76 elfread.c
--- elfread.c	3 Jan 2009 05:57:51 -0000	1.76
+++ elfread.c	30 Apr 2009 15:03:41 -0000
@@ -427,10 +427,11 @@ elf_symtab_read (struct objfile *objfile
 			  int max_index;
 			  size_t size;
 
-			  max_index 
-			    = max (SECT_OFF_BSS (objfile),
-				   max (SECT_OFF_DATA (objfile),
-					SECT_OFF_RODATA (objfile)));
+			  max_index = SECT_OFF_BSS (objfile);
+			  if (objfile->sect_index_data > max_index)
+			    max_index = objfile->sect_index_data;
+			  if (objfile->sect_index_rodata > max_index)
+			    max_index = objfile->sect_index_rodata;
 
 			  /* max_index is the largest index we'll
 			     use into this array, so we must


More information about the Gdb mailing list