[lldb-dev] break on exceptions/windows
Greg Clayton via lldb-dev
lldb-dev at lists.llvm.org
Mon Apr 4 11:41:05 PDT 2016
> On Apr 4, 2016, at 11:36 AM, Carlo Kok <ck at remobjects.com> wrote:
>
>
>
> Op 2016-04-04 om 20:30 schreef Greg Clayton:
>>
>>> On Apr 4, 2016, at 11:24 AM, Zachary Turner <zturner at google.com> wrote:
>>>
>>> It seems like we already have some precedent for conditional command arguments. For example:
>>>
>>> (lldb) help platform process list
>>> ...
>>> -u <unsigned-integer> ( --uid <unsigned-integer> )
>>> [POSIX] Find processes that have a matching user ID.
>>>
>>> So on Windows this argument doesn't make sense. Could we make an argument that is conditional on the *target* rather than the host? Then, for example, you could have something like this:
>>>
>>> (lldb) help break set
>>> ...
>>> --code <hex-integer> ( --code <hex-integer> )
>>> [Windows Target] Break when the exception with code <code> is raised.
>>>
>>> How to plumb this to the ProcessWindows plugin is an open question, but should be mostly mechanical.
>>
>> This is like my suggestion of:
>>
>> (lldb) breakpoint set --exception-code 0x40010005
>>
>> The code can be passed to the current Platform along with the current target:
>>
>> Error Platform::SetExceptionBreakpointWithExceptionCode (lldb_private::Target *target, uint64_t exception_code);
>>
>> The process can be extracted from the target when the breakpoint needs to be resolved.
>>
>>
>
> 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?
>
> --
> Carlo Kok
> RemObjects Software
More information about the lldb-dev
mailing list