| 290 | |
| 291 | |
| 292 | BNDebugFrame* 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 | |
| 314 | void BNDebuggerFreeFrames(BNDebugFrame* frames, size_t count) |
no test coverage detected