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]

[PATCH] Fix outputting of debug info for things marked *INTERNAL*


For whatever reason, we end up with the wrong number of
constructors/destructors having debug info.

We should get two, but we get three, one marked *INTERNAL* at the end of
the mangled string.

This *INTERNAL* one is never referenced in the assembly.

Going by what cp/mangle.c says, this is what is supposed to happen.

However, if it's not going to appear in the assembly (ie this is the
goal), we sure as heck shouldn't have debug info for it being output.

Right now, we do, for both dwarf2 and stabs.

This is broken behavior.

I tried having it mark it DECL_IGNORED_P when it decides to mark it
*INTERNAL*, but then we end up with no ctors/dtors being output.

So, to spur someone familiar with C++ front end to figure out what the
heck to do about it, i present the following, amazingly horrendous
solution, to make you throw up and beg for mercy.

*** dwarf2out.c 2001/01/28 01:50:05     1.237
--- dwarf2out.c 2001/02/10 08:04:07
*************** gen_member_die (type, context_die)
*** 10542,10548 ****
        if (child)
        splice_child_die (context_die, child);
        else
!       gen_decl_die (member, context_die);
      }
  }

--- 10542,10550 ----
        if (child)
        splice_child_die (context_die, child);
        else
!       if (!strstr (IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (member)),
"*INTERNAL*"))
!         gen_decl_die (member, context_die);
!
      }
  }


Take that.
Had enough yet?
Don't make me submit a similar piece of kludgery for STABS.
I'll do it.
I swear.
We can work this out.
Just make the *INTERNAL* constructors/destructors go away from the debug
info, and everyone walks away happy.

I think TV is affecting me,
Dan


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