[lldb-dev] C++ API: Passing information from debuggee to debugger
eugenebi at hotmail.com
Tue Jun 2 08:32:47 PDT 2015
OK, thanks a lot!
The problem is that there are complications if the target is stripped off symbols, but I probably can work around by still sending a signal (i.e. getting reliable interrupted) and inspecting registers to find my pointer. Another vague worry is if overzealous compiler would optimize it out, but of course I can compile this specific method with optimization turned off. I.e. there are some hoops to jump through instead of just getting it work.
I do not fully understand why we need mutex here... Each thread allocates data in its own memory (either allocated or on stack) and when it breaks each thread has its own local pointer (either on stack or in register). I.e. it seems this can be made lock-free.
> Date: Tue, 2 Jun 2015 11:00:47 +0100
> From: colin at codeplay.com
> To: labath at google.com; eugenebi at hotmail.com
> CC: lldb-dev at cs.uiuc.edu
> Subject: Re: [lldb-dev] C++ API: Passing information from debuggee to debugger
> comment inline
> On 02/06/2015 10:21, Pavel Labath wrote:
> > Hello,
> > Yes, please file a bug. I been wanting to implement passing of the
> > struct siginfo_t from the inferior all the way up to lldb (besides
> > your use case, it is also useful for displaying more precise
> > information about segfaults, etc.). However, that is not a priority
> > now, so it may take a while (patches welcome though :) ).
> >>> So, is there any other "legal" way to achieve what I need?
> > As I understand it, the way people do this kind of thing usually is to
> > have a special function in the inferior (e.g., void
> > my_debugger_interface(my_data *). Then the debugger can set a
> > breakpoint on this function and read all the data it needs from the
> > function arguments. If you want to be sure two threads don't call this
> > function simultaneously, you can protect it with a regular mutex.
> For an example, the recent r238768 implements this sort of system in the
> RenderScript language runtime.
> > pl
> > _______________________________________________
> > lldb-dev mailing list
> > lldb-dev at cs.uiuc.edu
> > http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev
> - Colin Riley
> Senior Director,
> Parallel/Graphics Debugger Systems
> Codeplay Software Ltd
> 45 York Place, Edinburgh, EH1 3HP
> Tel: 0131 466 0503
> Fax: 0131 557 6600
> Website: http://www.codeplay.com
> Twitter: https://twitter.com/codeplaysoft
> This email and any attachments may contain confidential and /or privileged information and is for use by the addressee only. If you are not the intended recipient, please notify Codeplay Software Ltd immediately and delete the message from your computer. You may not copy or forward it,or use or disclose its contents to any other person. Any views or other information in this message which do not relate to our business are not authorized by Codeplay software Ltd, nor does this message form part of any contract unless so stated.
> As internet communications are capable of data corruption Codeplay Software Ltd does not accept any responsibility for any changes made to this message after it was sent. Please note that Codeplay Software Ltd does not accept any liability or responsibility for viruses and it is your responsibility to scan any attachments.
> Company registered in England and Wales, number: 04567874
> Registered office: 81 Linkfield Street, Redhill RH1 6BY
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the lldb-dev