summaryrefslogtreecommitdiffstats
path: root/lldb/source/API/SBTarget.cpp
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2010-07-23 23:33:17 +0000
committerGreg Clayton <gclayton@apple.com>2010-07-23 23:33:17 +0000
commit9fed0d85b23ace3dfe98b423c3cc91db2adc8ca9 (patch)
tree28337c453c873b05973c76ddf4d0d3f0b2fa86f5 /lldb/source/API/SBTarget.cpp
parent893483000d935a97c109b051f115f60567279fd9 (diff)
downloadbcm5719-llvm-9fed0d85b23ace3dfe98b423c3cc91db2adc8ca9.tar.gz
bcm5719-llvm-9fed0d85b23ace3dfe98b423c3cc91db2adc8ca9.zip
Added needed breakpoint functionality to the public API that includes:
SBTarget: - get breakpoint count - get breakpoint at index SBBreakpoint: - Extract data from breakpoint events llvm-svn: 109289
Diffstat (limited to 'lldb/source/API/SBTarget.cpp')
-rw-r--r--lldb/source/API/SBTarget.cpp34
1 files changed, 15 insertions, 19 deletions
diff --git a/lldb/source/API/SBTarget.cpp b/lldb/source/API/SBTarget.cpp
index 86186434aee..85ec06ca7b5 100644
--- a/lldb/source/API/SBTarget.cpp
+++ b/lldb/source/API/SBTarget.cpp
@@ -277,36 +277,32 @@ SBTarget::BreakpointCreateByAddress (addr_t address)
return sb_bp;
}
-void
-SBTarget::ListAllBreakpoints ()
+SBBreakpoint
+SBTarget::FindBreakpointByID (break_id_t bp_id)
{
- FILE *out_file = m_opaque_sp->GetDebugger().GetOutputFileHandle();
-
- if (out_file == NULL)
- return;
+ SBBreakpoint sb_breakpoint;
+ if (m_opaque_sp && bp_id != LLDB_INVALID_BREAK_ID)
+ *sb_breakpoint = m_opaque_sp->GetBreakpointByID (bp_id);
+ return sb_breakpoint;
+}
+uint32_t
+SBTarget::GetNumBreakpoints () const
+{
if (m_opaque_sp)
- {
- const BreakpointList &bp_list = m_opaque_sp->GetBreakpointList();
- size_t num_bps = bp_list.GetSize();
- for (size_t i = 0; i < num_bps; ++i)
- {
- SBBreakpoint sb_breakpoint (bp_list.GetBreakpointByIndex (i));
- sb_breakpoint.GetDescription (out_file, "full");
- }
- }
+ return m_opaque_sp->GetBreakpointList().GetSize();
+ return 0;
}
SBBreakpoint
-SBTarget::FindBreakpointByID (break_id_t bp_id)
+SBTarget::GetBreakpointAtIndex (uint32_t idx) const
{
SBBreakpoint sb_breakpoint;
- if (m_opaque_sp && bp_id != LLDB_INVALID_BREAK_ID)
- *sb_breakpoint = m_opaque_sp->GetBreakpointByID (bp_id);
+ if (m_opaque_sp)
+ *sb_breakpoint = m_opaque_sp->GetBreakpointList().GetBreakpointAtIndex(idx);
return sb_breakpoint;
}
-
bool
SBTarget::BreakpointDelete (break_id_t bp_id)
{
OpenPOWER on IntegriCloud