mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-12-02 02:38:04 +00:00
Adding setting thread specific breakpoints by name, ID, index & queue name to the SB interfaces.
llvm-svn: 106268
This commit is contained in:
parent
f3aea7aecf
commit
62b02c61c9
@ -79,6 +79,24 @@ public:
|
||||
|
||||
lldb::tid_t
|
||||
GetThreadID ();
|
||||
|
||||
void
|
||||
SetThreadIndex (uint32_t index);
|
||||
|
||||
uint32_t
|
||||
GetThreadIndex() const;
|
||||
|
||||
void
|
||||
SetThreadName (const char *thread_name);
|
||||
|
||||
const char *
|
||||
GetThreadName () const;
|
||||
|
||||
void
|
||||
SetQueueName (const char *queue_name);
|
||||
|
||||
const char *
|
||||
GetQueueName () const;
|
||||
|
||||
void
|
||||
SetCallback (BreakpointHitCallback callback, void *baton);
|
||||
|
@ -42,10 +42,28 @@ public:
|
||||
SetIgnoreCount (int32_t n);
|
||||
|
||||
void
|
||||
SetThreadID (lldb::tid_t thread_id);
|
||||
SetThreadID (lldb::tid_t sb_thread_id);
|
||||
|
||||
lldb::tid_t
|
||||
GetThreadID ();
|
||||
|
||||
void
|
||||
SetThreadIndex (uint32_t index);
|
||||
|
||||
uint32_t
|
||||
GetThreadIndex() const;
|
||||
|
||||
void
|
||||
SetThreadName (const char *thread_name);
|
||||
|
||||
const char *
|
||||
GetThreadName () const;
|
||||
|
||||
void
|
||||
SetQueueName (const char *queue_name);
|
||||
|
||||
const char *
|
||||
GetQueueName () const;
|
||||
|
||||
bool
|
||||
IsResolved ();
|
||||
|
@ -20,8 +20,9 @@
|
||||
#include "lldb/Core/Stream.h"
|
||||
#include "lldb/Core/StreamFile.h"
|
||||
#include "lldb/Target/Process.h"
|
||||
#include "lldb/Target/Thread.h"
|
||||
#include "lldb/Target/Target.h"
|
||||
#include "lldb/Target/Thread.h"
|
||||
#include "lldb/Target/ThreadSpec.h"
|
||||
|
||||
|
||||
#include "lldb/lldb-enumerations.h"
|
||||
@ -276,6 +277,70 @@ SBBreakpoint::GetThreadID ()
|
||||
return lldb_thread_id;
|
||||
}
|
||||
|
||||
void
|
||||
SBBreakpoint::SetThreadIndex (uint32_t index)
|
||||
{
|
||||
if (m_break_sp)
|
||||
m_break_sp->GetOptions()->GetThreadSpec()->SetIndex (index);
|
||||
}
|
||||
|
||||
uint32_t
|
||||
SBBreakpoint::GetThreadIndex() const
|
||||
{
|
||||
if (m_break_sp)
|
||||
{
|
||||
const ThreadSpec *thread_spec = m_break_sp->GetOptions()->GetThreadSpec();
|
||||
if (thread_spec == NULL)
|
||||
return 0;
|
||||
else
|
||||
return thread_spec->GetIndex();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
SBBreakpoint::SetThreadName (const char *thread_name)
|
||||
{
|
||||
if (m_break_sp)
|
||||
m_break_sp->GetOptions()->GetThreadSpec()->SetName (thread_name);
|
||||
}
|
||||
|
||||
const char *
|
||||
SBBreakpoint::GetThreadName () const
|
||||
{
|
||||
if (m_break_sp)
|
||||
{
|
||||
const ThreadSpec *thread_spec = m_break_sp->GetOptions()->GetThreadSpec();
|
||||
if (thread_spec == NULL)
|
||||
return NULL;
|
||||
else
|
||||
return thread_spec->GetName();
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void
|
||||
SBBreakpoint::SetQueueName (const char *queue_name)
|
||||
{
|
||||
if (m_break_sp)
|
||||
m_break_sp->GetOptions()->GetThreadSpec()->SetQueueName (queue_name);
|
||||
}
|
||||
|
||||
const char *
|
||||
SBBreakpoint::GetQueueName () const
|
||||
{
|
||||
if (m_break_sp)
|
||||
{
|
||||
const ThreadSpec *thread_spec = m_break_sp->GetOptions()->GetThreadSpec();
|
||||
if (thread_spec == NULL)
|
||||
return NULL;
|
||||
else
|
||||
return thread_spec->GetQueueName();
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
size_t
|
||||
SBBreakpoint::GetNumResolvedLocations() const
|
||||
{
|
||||
|
@ -17,6 +17,7 @@
|
||||
#include "lldb/Target/ThreadSpec.h"
|
||||
#include "lldb/Core/Stream.h"
|
||||
#include "lldb/Core/StreamFile.h"
|
||||
#include "lldb/Target/ThreadSpec.h"
|
||||
|
||||
using namespace lldb;
|
||||
using namespace lldb_private;
|
||||
@ -108,6 +109,70 @@ SBBreakpointLocation::GetThreadID ()
|
||||
return sb_thread_id;
|
||||
}
|
||||
|
||||
void
|
||||
SBBreakpointLocation::SetThreadIndex (uint32_t index)
|
||||
{
|
||||
if (m_break_loc_sp)
|
||||
m_break_loc_sp->GetLocationOptions()->GetThreadSpec()->SetIndex (index);
|
||||
}
|
||||
|
||||
uint32_t
|
||||
SBBreakpointLocation::GetThreadIndex() const
|
||||
{
|
||||
if (m_break_loc_sp)
|
||||
{
|
||||
const ThreadSpec *thread_spec = m_break_loc_sp->GetOptionsNoCopy()->GetThreadSpec();
|
||||
if (thread_spec == NULL)
|
||||
return 0;
|
||||
else
|
||||
return thread_spec->GetIndex();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
SBBreakpointLocation::SetThreadName (const char *thread_name)
|
||||
{
|
||||
if (m_break_loc_sp)
|
||||
m_break_loc_sp->GetLocationOptions()->GetThreadSpec()->SetName (thread_name);
|
||||
}
|
||||
|
||||
const char *
|
||||
SBBreakpointLocation::GetThreadName () const
|
||||
{
|
||||
if (m_break_loc_sp)
|
||||
{
|
||||
const ThreadSpec *thread_spec = m_break_loc_sp->GetOptionsNoCopy()->GetThreadSpec();
|
||||
if (thread_spec == NULL)
|
||||
return NULL;
|
||||
else
|
||||
return thread_spec->GetName();
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void
|
||||
SBBreakpointLocation::SetQueueName (const char *queue_name)
|
||||
{
|
||||
if (m_break_loc_sp)
|
||||
m_break_loc_sp->GetLocationOptions()->GetThreadSpec()->SetQueueName (queue_name);
|
||||
}
|
||||
|
||||
const char *
|
||||
SBBreakpointLocation::GetQueueName () const
|
||||
{
|
||||
if (m_break_loc_sp)
|
||||
{
|
||||
const ThreadSpec *thread_spec = m_break_loc_sp->GetOptionsNoCopy()->GetThreadSpec();
|
||||
if (thread_spec == NULL)
|
||||
return NULL;
|
||||
else
|
||||
return thread_spec->GetQueueName();
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
bool
|
||||
SBBreakpointLocation::IsResolved ()
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user