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]

[PATCH] Cleanup some more section_addr_info structs



[Who is the som maintainer? Do we have one?]

I forgot to get rid of these uses of the special field
text_addr of section_addr_info:

2000-04-20  Elena Zannoni  <ezannoni@kwikemart.cygnus.com>

	* win32-nat.c  (handle_load_dll): Don't treat .text as a special
 	section anymore.
	* somread.c (som_symfile_offsets): Ditto.
	* somsolib.c (som_solib_add_solib_objfile): Ditto.


Index: somsolib.c
===================================================================
RCS file: /cvs/src/src/gdb/somsolib.c,v
retrieving revision 1.1.1.6
diff -p -u -r1.1.1.6 somsolib.c
--- somsolib.c  1999/11/17 02:30:29     1.1.1.6
+++ somsolib.c  2000/04/20 18:35:56
@@ -290,7 +290,8 @@ som_solib_add_solib_objfile (so, name, f
   struct section_addr_info section_addrs;
 
   memset (&section_addrs, 0, sizeof (section_addrs));
-  section_addrs.text_addr = text_addr;
+  section_addrs.other[0].name = ".text";
+  section_addrs.other[0].addr = text_addr;
   so->objfile = symbol_file_add (name, from_tty, &section_addrs, 0, OBJF_SHARED);
   so->abfd = so->objfile->obfd;

Index: somread.c
===================================================================
RCS file: /cvs/src/src/gdb/somread.c,v
retrieving revision 1.1.1.7
diff -c -p -u -r1.1.1.7 somread.c
cvs server: conflicting specifications of output style
--- somread.c   1999/10/05 23:08:49     1.1.1.7
+++ somread.c   2000/04/20 18:44:51
@@ -465,6 +465,7 @@ som_symfile_offsets (objfile, addrs)
      struct section_addr_info *addrs;
 {
   int i;
+  CORE_ADDR text_addr;
 
   objfile->num_sections = SECT_OFF_MAX;
   objfile->section_offsets = (struct section_offsets *)
@@ -474,8 +475,13 @@ som_symfile_offsets (objfile, addrs)
      offsets from the library, else get them from addrs.  */
   if (!som_solib_section_offsets (objfile, objfile->section_offsets))
     {
+      for (i = 0; i < SECT_OFF_MAX && addrs->other[i].name; i++)
+       if (strcmp (addrs->other[i].name, ".text") == 0)
+         break;
+      text_addr = addrs->other[i].addr;
+
       for (i = 0; i < SECT_OFF_MAX; i++)
-       ANOFFSET (objfile->section_offsets, i) = addrs -> text_addr;
+       ANOFFSET (objfile->section_offsets, i) = text_addr;
     }
 }

Index: win32-nat.c
===================================================================
RCS file: /cvs/src/src/gdb/win32-nat.c,v
retrieving revision 1.5
diff -u -p -r1.5 win32-nat.c
--- win32-nat.c 2000/03/25 02:26:21     1.5
+++ win32-nat.c 2000/04/20 18:50:16
@@ -510,7 +510,8 @@ handle_load_dll (PTR dummy)
      FIXME: Is this the real reason that we need the 0x1000 ? */
 
   printf_unfiltered ("%x:%s", event->lpBaseOfDll, dll_name);
-  section_addrs.text_addr = (int) event->lpBaseOfDll + 0x1000;
+  section_addrs.other[0].name = ".text";
+  section_addrs.other[0].addr = (int) event->lpBaseOfDll + 0x1000;
   symbol_file_add (dll_name, 0, &section_addrs, 0, OBJF_SHARED);
   printf_unfiltered ("\n");



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