[dragonegg] r186952 - The debug info verifier requires a non-empty name here. Pacify it.

Robinson, Paul Paul_Robinson at playstation.sony.com
Tue Jul 23 13:03:46 PDT 2013


> -----Original Message-----
> From: llvm-commits-bounces at cs.uiuc.edu [mailto:llvm-commits-
> bounces at cs.uiuc.edu] On Behalf Of David Blaikie
> Sent: Tuesday, July 23, 2013 10:24 AM
> To: Duncan Sands
> Cc: llvm-commits at cs.uiuc.edu
> Subject: Re: [dragonegg] r186952 - The debug info verifier requires a
> non-empty name here. Pacify it.
> 
> On Tue, Jul 23, 2013 at 10:20 AM, Duncan Sands <baldrick at free.fr> wrote:
> > Hi David,
> >
> >
> > On 23/07/13 19:01, David Blaikie wrote:
> >>
> >> On Tue, Jul 23, 2013 at 9:08 AM, Duncan Sands <baldrick at free.fr>
> wrote:
> >>>
> >>> Author: baldrick
> >>> Date: Tue Jul 23 11:07:59 2013
> >>> New Revision: 186952
> >>>
> >>> URL: http://llvm.org/viewvc/llvm-project?rev=186952&view=rev
> >>> Log:
> >>> The debug info verifier requires a non-empty name here.  Pacify it.
> >>
> >>
> >> If such debug info really doesn't need a name (I haven't looked at
> the
> >> code further to see which entity this code is for - a global
> variable,
> >> I guess) & we can/do support that (a test case would be good) we
> >> should just fix the verification not to complain about such a valid
> >> construct.
> >
> >
> > thanks for taking an interest.
> >
> > It's like this: dragonegg produces debug info for this global variable
> > because
> > it produces debug info for all global variables, not because I think
> it will
> > enhance someone's debugging experience.  However it seems pretty
> reasonable
> > to
> > me that it should be possible to produce natural debug info for any
> global
> > variable.  In this case natural means without a name, since this
> variable is
> > really anonymous.  In the original source code it is the number 77,
> now sunk
> > into a global constant so it can have its address taken.  Still, it
> exists.
> >
> > So my view, taken from 1000 miles up and from the planet of those who
> know
> > nothing about debug info, is that nothing should be required to have a
> name,
> > because sometimes things just don't have names.  For example, I
> already have
> > to create artificial names for types because otherwise the debug
> metadata is
> > rejected, but I don't like it.
> >
> > If having no name means that the entity can't even be accessed in the
> > debugger,
> > then maybe that metadata should be dropped *as an optimization*.  But
> not
> > rejected as wrong.
> >
> > As I said, my view from a planet far far away from the land of those
> that
> > actually know something about debug info.
> 
> Yep - sorry to make you repeat yourself. I did read your explanation
> on the other thread in which Eric pointed out that nothing in the
> debug info /requires/ a name, etc. I guess I'll wait for Eric to chime
> back in here or there on where he thinks this should be dealt with.
> 
> - David

I'm not Eric, but it seems to me this sort of "variable" would be
artificial, so maybe the verifier shouldn't insist on a name for
things that are artificial?
--paulr

> 
> >
> > Ciao, Duncan.
> >
> >
> >>
> >>>
> >>> Modified:
> >>>      dragonegg/trunk/src/Debug.cpp
> >>>
> >>> Modified: dragonegg/trunk/src/Debug.cpp
> >>> URL:
> >>> http://llvm.org/viewvc/llvm-
> project/dragonegg/trunk/src/Debug.cpp?rev=186952&r1=186951&r2=186952&vie
> w=diff
> >>>
> >>>
> ========================================================================
> ======
> >>> --- dragonegg/trunk/src/Debug.cpp (original)
> >>> +++ dragonegg/trunk/src/Debug.cpp Tue Jul 23 11:07:59 2013
> >>> @@ -411,6 +411,8 @@ void DebugInfo::EmitGlobalVariable(Globa
> >>>     expanded_location Loc =
> expand_location(DECL_SOURCE_LOCATION(decl));
> >>>     DIType TyD = getOrCreateType(TREE_TYPE(decl));
> >>>     StringRef DispName = GV->getName();
> >>> +  if (DispName.empty())
> >>> +    DispName = "__unknown__";
> >>>     if (DECL_NAME(decl)) {
> >>>       if (IDENTIFIER_POINTER(DECL_NAME(decl)))
> >>>         DispName = IDENTIFIER_POINTER(DECL_NAME(decl));
> >>>
> >>>
> >>> _______________________________________________
> >>> llvm-commits mailing list
> >>> llvm-commits at cs.uiuc.edu
> >>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
> >
> >
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits





More information about the llvm-commits mailing list