[lldb-dev] C++ API: Passing information from debuggee to debugger
labath at google.com
Tue Jun 2 09:56:41 PDT 2015
On 2 June 2015 at 16:32, Eugene Birukov <eugenebi at hotmail.com> wrote:
> 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.
The situation I was worried about is that if two threads hit the
breakpoint in your function simultaneously, you can't tell which hit
the breakpoint _first_ -- hence no strict serialization. However, you
can still recover all the data from the function calls just fine and
as long as you don't care about the ordering between these two
function calls you are fine without a mutex.
More information about the lldb-dev