This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Patch Debug] Emit pubnames for reorder & partition case.
On 12/20/2010 01:20 PM, IainS wrote:
>
> On 20 Dec 2010, at 21:15, Richard Henderson wrote:
>
>> On 12/20/2010 03:18 AM, IainS wrote:
>>> + /* There is no real support in DW2 for this .. so we make
>>> + a work-around. First, emit the pub name for the segment
>>> + containing the function label. Then make and emit a
>>> + simplified subprogram DIE for the second segment with the
>>> + name post-fixed with _$hot$ or _$cold$. We use the same
>>> + linkage name for the second die so that gdb will find both
>>> + sections when given "b foo". */
>>
>> This doesn't work when $ is not allowed, aka NO_DOLLAR_IN_LABEL.
>> Presumably we need this workaround since Darwin is strict dwarf2?
>
> Yes, we need the work-around ..
> but I'm not massively attached to $ (or even £ ;-))
>
> is it OK apart from that?
Yeah, and I suppose you're after matching the symbols here with
the symbols from that previous patch.
Ok with an extra bit akin to the use in clone_function_name:
#ifndef NO_DOT_IN_LABEL
prefix[len] = '.';
#elif !defined NO_DOLLAR_IN_LABEL
prefix[len] = '$';
#else
prefix[len] = '_';
#endif
though of course you may swap the preferencing of [$.] to match
what you already have in darwin.c.
r~