MCPcopy Create free account
hub / github.com/Vector35/debugger / BNDebuggerGetFramesOfThread

Function BNDebuggerGetFramesOfThread

core/ffi.cpp:292–311  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

290
291
292BNDebugFrame* BNDebuggerGetFramesOfThread(BNDebuggerController* controller, uint32_t tid, size_t* count)
293{
294 std::vector<DebugFrame> frames = controller->object->GetFramesOfThread(tid);
295 *count = frames.size();
296
297 BNDebugFrame* results = new BNDebugFrame[frames.size()];
298
299 for (size_t i = 0; i < frames.size(); i++)
300 {
301 results[i].m_index = frames[i].m_index;
302 results[i].m_pc = frames[i].m_pc;
303 results[i].m_sp = frames[i].m_sp;
304 results[i].m_fp = frames[i].m_fp;
305 results[i].m_functionName = BNDebuggerAllocString(frames[i].m_functionName.c_str());
306 results[i].m_functionStart = frames[i].m_functionStart;
307 results[i].m_module = BNDebuggerAllocString(frames[i].m_module.c_str());
308 }
309
310 return results;
311}
312
313
314void BNDebuggerFreeFrames(BNDebugFrame* frames, size_t count)

Callers 1

GetFramesOfThreadMethod · 0.85

Calls 3

BNDebuggerAllocStringFunction · 0.85
sizeMethod · 0.80
GetFramesOfThreadMethod · 0.45

Tested by

no test coverage detected