[lldb-dev] break on exceptions/windows

Carlo Kok via lldb-dev lldb-dev at lists.llvm.org
Mon Apr 4 11:48:15 PDT 2016



Op 2016-04-04 om 20:41 schreef Greg Clayton:
>
>> On Apr 4, 2016, at 11:36 AM, Carlo Kok <ck at remobjects.com> wrote:

>>>
>>
>> There should be a way then to do a "break on every exception", instead of just 1 specific code.
>
> That would be easy with the --exception-name:
>
> (lldb) breakpoint set --exception-name=all
>
>> and some way for the api to get the payload (which can have a variable number of parameters)
>
> What are you thinking here? Example?

I have a frontend language (and I imagine lots of others have one) where 
I can throw exceptions. Windows has no predefined way of how an 
exception object is formatted, you give it a list of pointer sized ints 
and a count, and that's what it fills the exception object with, for 
example I pass:
[0] Return address
[1] frame pointer
[2] Class instance of the exception object
with my custom exception code.

msvc does the same with completely different values. Other languages 
will have their own values. When using the api I would want access to 
the code (To know of it's mine, these are the cods Zachery Turner 
mentioned) and the payload (to get access to the object) so that I show 
what exception occurred and turn it into a string representation.

---
Carlo Kok
RemObjects Software


More information about the lldb-dev mailing list