stack-protector guard location

Roland McGrath roland@redhat.com
Fri Aug 28 09:07:00 GMT 2009


> Well, given enough debugger hacking, I suppose that could be
> made to work in this instance at the moment.  But it would
> probably break when we have need of another anonymous variable
> type of thing for some other feature.

Granted.  My initial thought was that we might add some sort of custom
attribute to mark this.  But that's likely to be even further from Just Works.

> I guess I just assumed that the debugger really wouldn't get
> too confused because the variable name isn't likely to overlap
> with anything that's currently in use.  I do like the current
> patch because your use cases Just Work with the current gdb.

I actually didn't mean "confused gdb" so much as "make gdb confuse its
user".  i.e. "info locals" showing __stack_guard__ is a dubious feature.
Frankly "p &__stack_guard__" is a rather dubious to me.  Nothing (what
nothing?  well, hardly anything) says my program can't have a real variable
called __stack_guard__.

Anyway, it doesn't have a name.  That's just lying.  It ain't right.

Perhaps no DW_AT_name but DW_AT_description of "stack-guard".

> But hey, an opinion from the debugger camp is certainly welcome.

I'm not a debugger camper but I impersonate one in compiler camps.


Thanks,
Roland



More information about the Gcc-patches mailing list