[RFC/dwarf-2] Add support for included files

Joel Brobecker brobecker@gnat.com
Tue May 4 00:15:00 GMT 2004


> /home/gates/pinskia/src/gnu/combinesources/src/gdb/dwarf2read.c: In 
> function `dwarf2_create_include_psymtab':
> /home/gates/pinskia/src/gnu/combinesources/src/gdb/dwarf2read.c:1244: 
> error: invalid lvalue in assignment

Sorry about that, this error didn't show up with the compiler I used.
I just built one straight from mainline and could reproduce the error.
Apparently, expressions like this are not legal?

        (char *) something = NULL;

Anyway, I fixed the immediate problem by expanding the PST_PRIVATE
macro into its actual definition, but without the cast. That should
allow you to build again.

2004-05-03  Joel Brobecker  <brobecker@gnat.com>

        * dwarf2read.c (dwarf2_create_include_psymtab): Fix build
        failure detected by recent versions of GCC.
        (psymtab_to_symtab_1): No longer use the PST_PRIVATE macro
        to be consistent with the usage in dwarf2_create_include_psymtab.

Checked in mainline.

-- 
Joel
-------------- next part --------------
Index: dwarf2read.c
===================================================================
RCS file: /cvs/src/src/gdb/dwarf2read.c,v
retrieving revision 1.149
diff -u -p -r1.149 dwarf2read.c
--- dwarf2read.c	3 May 2004 16:21:50 -0000	1.149
+++ dwarf2read.c	4 May 2004 00:08:10 -0000
@@ -1239,9 +1239,9 @@ dwarf2_create_include_psymtab (char *nam
   /* No private part is necessary for include psymtabs.  This property
      can be used to differentiate between such include psymtabs and
      the regular ones.  If it ever happens that a regular psymtab can
-     legitimally have a NULL PST_PRIVATE part, then we'll have to add a
+     legitimally have a NULL private part, then we'll have to add a
      dedicated field for that in the dwarf2_pinfo structure.  */
-  PST_PRIVATE (subpst) = NULL;
+  subpst->read_symtab_private = NULL;
 }
 
 /* Read the Line Number Program data and extract the list of files
@@ -2109,7 +2109,7 @@ psymtab_to_symtab_1 (struct partial_symt
         psymtab_to_symtab_1 (pst->dependencies[i]);
       }
 
-  if (PST_PRIVATE (pst) == NULL)
+  if (pst->read_symtab_private == NULL)
     {
       /* It's an include file, no symbols to read for it.
          Everything is in the parent symtab.  */


More information about the Gdb-patches mailing list