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

Method add

ui/breakpointswidget.cpp:338–372  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

336
337
338void DebugBreakpointsWidget::add()
339{
340 UIContext* ctxt = UIContext::contextForWidget(this);
341 if (!ctxt)
342 return;
343
344 ViewFrame* frame = ctxt->getCurrentViewFrame();
345 if (!frame)
346 return;
347
348 auto view = frame->getCurrentBinaryView();
349 if (!view)
350 return;
351
352 uint64_t address = 0;
353 if (!ViewFrame::getAddressFromInput(frame, view, address,
354 frame->getCurrentOffset(), "Add Breakpoint", "The address of the breakpoint:", true))
355 return;
356
357 bool isAbsoluteAddress = false;
358 if (view->GetTypeName() == "Debugger")
359 isAbsoluteAddress = true;
360
361 if (isAbsoluteAddress)
362 {
363 m_controller->AddBreakpoint(address);
364 }
365 else
366 {
367 std::string filename = m_controller->GetInputFile();
368 uint64_t offset = address - view->GetStart();
369 ModuleNameAndOffset info = {filename, offset};
370 m_controller->AddBreakpoint(info);
371 }
372}
373
374
375void DebugBreakpointsWidget::remove()

Callers

nothing calls this directly

Calls 2

AddBreakpointMethod · 0.45
GetInputFileMethod · 0.45

Tested by

no test coverage detected