This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


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

Re: Another 3 debug hooks


Richard Henderson wrote:-

> Stabs info shouldn't care what order these things are in so 
> long as they are present somewhere; I would think that sdb
> info would be the same.  To be sure, I tested the following
> patchlet vs the gdb testsuite on i686-linux and as I expected,
> no regressions.

This causes a segfault in dbxout_symbol when it is passed an
incomplete type.  I believe types are output only when complete by
rest_of_type_compilation() instead.

Your original idea is to transfer what was done in varasm.c to the
toplev.c loop.  So should we change

> +/* Debug information for a global DECL.  Called from toplev.c after
> +   compilation proper has finished.  */
> +static void
> +dbxout_global_decl (decl)
> +     tree decl;
> +{
> +  dbxout_symbol (decl, 0);
>  }

to be instead

  /* Output global variables only here.  */
  if (TREE_CODE (decl) == VAR_DECL)
    dbxout_symbol (decl, 0);

That's my best guess; I'm not particularly familiar with the way the
compiler works here (though becoming more so all the time!).  Do we
need a DECL_RTL_SET_P() too?

I think the code for sdb I posted is OK on this point, since it
already checked for VAR_DECL anyway.  Dwarf and Dwarf2 are OK as they
never used varasm.c in the first place.

Neil.


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