This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[PATCH RFA] Increase maximum section index
- To: gdb-patches at sources dot redhat dot com
- Subject: [PATCH RFA] Increase maximum section index
- From: Mark Kettenis <kettenis at wins dot uva dot nl>
- Date: Tue, 5 Dec 2000 00:36:02 +0100
- CC: jimb at cygnus dot com, ezannoni at cygnus dot com
Hi,
The current Hurd libc (glibc 2.2), has .bss as section number 49.
Since the maximum GDB section number is 40 this means that inspecting
uninitialized variables in libc fails horribly. We should probably
make the number of sections a dynamic quantity, but meanwhile I
propose the following patch.
OK to check this in?
Mark
2000-12-03 Mark Kettenis <kettenis@gnu.org>
* gdb-stabs.h (SECT_OFF_MAX): Increase to 64.
* symfile.h (MAX_SECTIONS): Increase to 64.
Index: gdb-stabs.h
===================================================================
RCS file: /cvs/src/src/gdb/gdb-stabs.h,v
retrieving revision 1.3
diff -u -p -r1.3 gdb-stabs.h
--- gdb-stabs.h 2000/05/04 16:52:33 1.3
+++ gdb-stabs.h 2000/12/04 23:30:45
@@ -28,7 +28,7 @@
#if !defined (GDBSTABS_H)
#define GDBSTABS_H
-#define SECT_OFF_MAX 40 /* Count of possible values */
+#define SECT_OFF_MAX 64 /* Count of possible values */
/* The stab_section_info chain remembers info from the ELF symbol table,
while psymtabs are being built for the other symbol tables in the
Index: symfile.h
===================================================================
RCS file: /cvs/src/src/gdb/symfile.h,v
retrieving revision 1.6
diff -u -p -r1.6 symfile.h
--- symfile.h 2000/09/02 00:12:17 1.6
+++ symfile.h 2000/12/04 23:30:45
@@ -1,5 +1,5 @@
/* Definitions for reading symbol files into GDB.
- Copyright (C) 1990, 1991, 1992, 1993, 1994, 1996
+ Copyright (C) 1990, 1991, 1992, 1993, 1994, 1996, 2000
Free Software Foundation, Inc.
This file is part of GDB.
@@ -61,7 +61,7 @@ struct psymbol_allocation_list
solib.c to communicate the section addresses in shared objects to
symbol_file_add (). */
-#define MAX_SECTIONS 40
+#define MAX_SECTIONS 64
struct section_addr_info
{
/* Sections whose names are file format dependent. */