[lldb-dev] RFC: siginfo reading/writing support

Jim Ingham via lldb-dev lldb-dev at lists.llvm.org
Thu Jan 13 09:09:47 PST 2022


You are really going to make a lldb_private::CompilerType, since that’s what backs the Type & ultimately the SBTypes.  There’s a self-contained example where we make a CompilerType to represent the pairs in the synthetic child provider for NSDictionaries in the function GetLLDBNSPairType in NSDictionary.cpp.  And then you can follow the use of that function to see how that gets turned into a Type.

Also, the whole job of the DWARF parser is to make up CompilerTypes out of information from external sources, so if you need other examples for how to add elements to a CompilerType the DWARF parser is replete with them.

Jim

> On Jan 13, 2022, at 4:03 AM, Michał Górny <mgorny at gentoo.org> wrote:
> 
> On Wed, 2022-01-12 at 11:22 -0800, Jim Ingham wrote:
>> If we can’t always get our hands on the siginfo type, we will have to cons that type up by hand.  But we would have had to do that if we were implementing this feature in the expression parser anyway, and we already hand-make types to hand out in SBValues for a bunch of the synthetic child providers already, so that’s a well trodden path.
> 
> Could you point me to some example I could base my code on?  ;-)
> 
> -- 
> Best regards,
> Michał Górny
> 



More information about the lldb-dev mailing list