[Lldb-commits] [PATCH] D133446: [LLDB][NativePDB] Global ctor and dtor should be global decls.
Zequan Wu via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Wed Sep 14 10:31:10 PDT 2022
zequanwu added a comment.
In D133446#3788956 <https://reviews.llvm.org/D133446#3788956>, @labath wrote:
> In D133446#3787362 <https://reviews.llvm.org/D133446#3787362>, @zequanwu wrote:
>
>> In D133446#3786561 <https://reviews.llvm.org/D133446#3786561>, @labath wrote:
>>
>>> In D133446#3780961 <https://reviews.llvm.org/D133446#3780961>, @zequanwu wrote:
>>>
>>>> In D133446#3779600 <https://reviews.llvm.org/D133446#3779600>, @labath wrote:
>>>>
>>>>> I believe that this fixes the crash, but the names of generated functions still look fairly weird. Could we create them using their mangled name instead? That way, someone might actually call them, if he was so inclined.
>>>>
>>>> It looks like they don't have mangled name stored in pdb.
>>>
>>> Hmm.. That's unfortunate. In that case, I'm wondering if this shouldn't be handled somehow directly inside `MSVCUndecoratedNameParser`. What does the function return right now? Do you think that result is going to be useful for other users of that class?
>>
>> `MSVCUndecoratedNameParser` expects a undercoated name of a entity(class, function, variable, etc) and returns the a pair of {pointer to parent decl context, base name of the entity}.
>
> Hmm... are you sure about that? `CreateDeclInfoForUndecoratedName` returns a {decl ctx, base name} pair. `MSVCUndecoratedNameParser` returns (creates) an array of `MSVCUndecoratedNameSpecifier`s. My question was about what those specifiers are specifically for the inputs we're talking about here (`static void B::dynamic atexit destructor for 'glob'()` or such), and whether those outputs "make sense" for some user of that class (it's clear that they don't make sense here).
>
> Basically, I'm trying to see whether it's possible (desirable?) to move this logic into the parser class. The parser already does a lot of string manipulation, so checking for these strings there would make more sense to me than doing some sort of a pre-parse from the outside.
Sorry, I misunderstood you and copied the wrong function name there. And yeah, I think the logic should be moved into `MSVCUndecoratedNameParser`.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D133446/new/
https://reviews.llvm.org/D133446
More information about the lldb-commits
mailing list