Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* coff mixed debug formats
@ 2004-03-24  0:22 Brian Ford
  2004-03-24 22:09 ` Jim Blandy
  0 siblings, 1 reply; 3+ messages in thread
From: Brian Ford @ 2004-03-24  0:22 UTC (permalink / raw)
  To: gdb-patches

[-- Attachment #1: Type: TEXT/PLAIN, Size: 410 bytes --]

2004-03-23  Brian Ford  <ford@vss.fsi.com>

        * coffread.c (coff_symfile_read): Prevent mixed debugging formats from
        corrupting/reinitializing the psymtab like elf_symfile_read.
        * dbxread.c (elfstab_build_psymtabs): Remove bogus comment.

-- 
Brian Ford
Senior Realtime Software Engineer
VITAL - Visual Simulation Systems
FlightSafety International
Phone: 314-551-8460
Fax:   314-551-8444

[-- Attachment #2: Type: TEXT/PLAIN, Size: 2229 bytes --]

? coffmixeddebug.patch
Index: ChangeLog
===================================================================
RCS file: /cvs/src/src/gdb/ChangeLog,v
retrieving revision 1.5602
diff -u -p -r1.5602 ChangeLog
--- ChangeLog	23 Mar 2004 21:21:36 -0000	1.5602
+++ ChangeLog	24 Mar 2004 00:17:03 -0000
@@ -1,3 +1,9 @@
+2004-03-23  Brian Ford  <ford@vss.fsi.com>
+
+	* coffread.c (coff_symfile_read): Prevent mixed debugging formats from
+	corrupting/reinitializing the psymtab like elf_symfile_read.
+	* dbxread.c (elfstab_build_psymtabs): Remove bogus comment.
+
 2004-03-23  Andrew Cagney  <cagney@redhat.com>
 
 	* MAINTAINERS (Past Maintainers): Add Mark Salter and Fernando
Index: coffread.c
===================================================================
RCS file: /cvs/src/src/gdb/coffread.c,v
retrieving revision 1.53
diff -u -p -r1.53 coffread.c
--- coffread.c	27 Feb 2004 17:46:11 -0000	1.53
+++ coffread.c	24 Mar 2004 00:17:03 -0000
@@ -610,6 +610,15 @@ coff_symfile_read (struct objfile *objfi
   /* Free the installed minimal symbol data.  */
   do_cleanups (cleanup_minimal_symbols);
 
+  /* If we are reinitializing, or if we have never loaded syms yet,
+     set table to empty.  MAINLINE is cleared so that *_read_psymtab
+     functions do not all also re-initialize the psymbol table. */
+  if (mainline)
+    {
+      init_psymbol_list (objfile, 0);
+      mainline = 0;
+    }
+
   bfd_map_over_sections (abfd, coff_locate_sections, (void *) info);
 
   if (info->stabsects)
Index: dbxread.c
===================================================================
RCS file: /cvs/src/src/gdb/dbxread.c,v
retrieving revision 1.64
diff -u -p -r1.64 dbxread.c
--- dbxread.c	14 Feb 2004 15:46:32 -0000	1.64
+++ dbxread.c	24 Mar 2004 00:17:07 -0000
@@ -3392,8 +3392,7 @@ coffstab_build_psymtabs (struct objfile 
 }
 \f
 /* Scan and build partial symbols for an ELF symbol file.
-   This ELF file has already been processed to get its minimal symbols,
-   and any DWARF symbols that were in it.
+   This ELF file has already been processed to get its minimal symbols.
 
    This routine is the equivalent of dbx_symfile_init and dbx_symfile_read
    rolled into one.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: coff mixed debug formats
  2004-03-24  0:22 coff mixed debug formats Brian Ford
@ 2004-03-24 22:09 ` Jim Blandy
  2004-04-07 21:56   ` [patch ping/update] " Brian Ford
  0 siblings, 1 reply; 3+ messages in thread
From: Jim Blandy @ 2004-03-24 22:09 UTC (permalink / raw)
  To: Brian Ford; +Cc: gdb-patches


Brian Ford <ford@vss.fsi.com> writes:
> 2004-03-23  Brian Ford  <ford@vss.fsi.com>
> 
>         * coffread.c (coff_symfile_read): Prevent mixed debugging formats from
>         corrupting/reinitializing the psymtab like elf_symfile_read.
>         * dbxread.c (elfstab_build_psymtabs): Remove bogus comment.

The dbxread.c portion of this patch is approved.  The coffread.c
portion looks good to me, too, although I can't approve that.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [patch ping/update] Re: coff mixed debug formats
  2004-03-24 22:09 ` Jim Blandy
@ 2004-04-07 21:56   ` Brian Ford
  0 siblings, 0 replies; 3+ messages in thread
From: Brian Ford @ 2004-04-07 21:56 UTC (permalink / raw)
  To: gdb-patches

[-- Attachment #1: Type: TEXT/PLAIN, Size: 1041 bytes --]

This fix for:

http://sources.redhat.com/ml/gdb/2004-03/msg00212.html

and the DWARF 2 frame info support, was stolen from elfread.c.

2004-04-07  Brian Ford  <ford@vss.fsi.com>

	* coffread.c (coff_symfile_read): Prevent mixed debugging formats
	from corrupting/reinitializing the psymtab.  Support DWARF 2 frame
	info.
	* dbxread.c (elfstab_build_psymtabs): Remove bogus comment.

dbxread.c comment patch approval:

On Wed, 24 Mar 2004, Jim Blandy wrote:

> Brian Ford writes:
> > 2004-03-23  Brian Ford  <ford@vss.fsi.com>
> >
> >         * coffread.c (coff_symfile_read): Prevent mixed debugging formats from
> >         corrupting/reinitializing the psymtab like elf_symfile_read.
> >         * dbxread.c (elfstab_build_psymtabs): Remove bogus comment.
>
> The dbxread.c portion of this patch is approved.  The coffread.c
> portion looks good to me, too, although I can't approve that.

-- 
Brian Ford
Senior Realtime Software Engineer
VITAL - Visual Simulation Systems
FlightSafety International
Phone: 314-551-8460
Fax:   314-551-8444

[-- Attachment #2: Type: TEXT/PLAIN, Size: 1755 bytes --]

Index: coffread.c
===================================================================
RCS file: /cvs/src/src/gdb/coffread.c,v
retrieving revision 1.54
diff -u -p -r1.54 coffread.c
--- coffread.c	2 Apr 2004 19:23:05 -0000	1.54
+++ coffread.c	7 Apr 2004 21:36:08 -0000
@@ -610,6 +610,15 @@ coff_symfile_read (struct objfile *objfi
   /* Free the installed minimal symbol data.  */
   do_cleanups (cleanup_minimal_symbols);
 
+  /* If we are reinitializing, or if we have not loaded syms yet,
+     empty the psymtab.  "mainline" is cleared so the *_read_psymtab
+     functions do not all re-initialize the psymtab.  */
+  if (mainline)
+    {
+      init_psymbol_list (objfile, 0);
+      mainline = 0;
+    }
+
   bfd_map_over_sections (abfd, coff_locate_sections, (void *) info);
 
   if (info->stabsects)
@@ -639,6 +648,8 @@ coff_symfile_read (struct objfile *objfi
       /* DWARF2 sections.  */
       dwarf2_build_psymtabs (objfile, mainline);
     }
+
+  dwarf2_build_frame_info (objfile);
 
   do_cleanups (back_to);
 }
Index: dbxread.c
===================================================================
RCS file: /cvs/src/src/gdb/dbxread.c,v
retrieving revision 1.64
diff -u -p -r1.64 dbxread.c
--- dbxread.c	14 Feb 2004 15:46:32 -0000	1.64
+++ dbxread.c	7 Apr 2004 21:36:09 -0000
@@ -3392,8 +3392,7 @@ coffstab_build_psymtabs (struct objfile 
 }
 \f
 /* Scan and build partial symbols for an ELF symbol file.
-   This ELF file has already been processed to get its minimal symbols,
-   and any DWARF symbols that were in it.
+   This ELF file has already been processed to get its minimal symbols.
 
    This routine is the equivalent of dbx_symfile_init and dbx_symfile_read
    rolled into one.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-04-07 21:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-03-24  0:22 coff mixed debug formats Brian Ford
2004-03-24 22:09 ` Jim Blandy
2004-04-07 21:56   ` [patch ping/update] " Brian Ford

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox