Skip to content

Conversation

@xusheng6
Copy link
Member

@xusheng6 xusheng6 commented Jan 7, 2026

Fixes #53

Copilot AI and others added 30 commits December 5, 2025 16:08
Co-authored-by: xusheng6 <94503187+xusheng6@users.noreply.github.com>
Co-authored-by: xusheng6 <94503187+xusheng6@users.noreply.github.com>
Co-authored-by: xusheng6 <94503187+xusheng6@users.noreply.github.com>
Co-authored-by: xusheng6 <94503187+xusheng6@users.noreply.github.com>
Co-authored-by: xusheng6 <94503187+xusheng6@users.noreply.github.com>
…with UI integration

Co-authored-by: xusheng6 <94503187+xusheng6@users.noreply.github.com>
- Show breakpoint type column in the breakpoint widget table
- Add separate top-level menu items for "Add Breakpoint" and "Add Hardware Breakpoint"
- Update hardware breakpoint dialog to use combobox for size selection
  - Predefined options: 1, 2, 4, 8 bytes
  - Editable combobox allows custom size input
- Both actions are available in the context menu
- Improved help text in hardware breakpoint dialog

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Move ContainsBreakpoint logic from ffi.cpp to core/debuggercontroller.cpp
  - BNDebuggerContainsRelativeBreakpoint now calls controller->object->ContainsBreakpoint()
  - Follows proper FFI pattern of delegating to controller methods

- Add AddHardwareBreakpoint and RemoveHardwareBreakpoint to core DebuggerController
  - These methods now post debugger events (AbsoluteBreakpointAddedEvent/RemovedEvent)
  - Consistent with software breakpoint event handling

- Simplify hardware breakpoint FFI methods in core/ffi.cpp
  - BNDebuggerAddHardwareBreakpoint calls controller->object->AddHardwareBreakpoint()
  - BNDebuggerRemoveHardwareBreakpoint calls controller->object->RemoveHardwareBreakpoint()
  - No longer directly access DebuggerState and DebugAdapter

This ensures hardware breakpoints trigger UI updates and are properly tracked
in the event system, matching the behavior of software breakpoints.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
…play

Hardware breakpoints are now properly managed through the DebuggerState layer,
just like software breakpoints. This allows them to appear in the breakpoint list
and be properly tracked across the debugging session.

Changes:
- Add HardwareBreakpointInfo structure to track hardware breakpoint details
  - Stores address, type (Execute/Read/Write/Access), and size
  - Implements comparison operators for container operations

- Extend DebuggerBreakpoints class
  - Add m_hardwareBreakpoints vector to track active hardware breakpoints
  - Add AddHardwareBreakpoint/RemoveHardwareBreakpoint/ContainsHardwareBreakpoint
  - Hardware breakpoints are added to adapter AND tracked in the list
  - GetHardwareBreakpointList() for UI to query active hardware breakpoints

- Update DebuggerState
  - Add AddHardwareBreakpoint/RemoveHardwareBreakpoint methods
  - Delegate to DebuggerBreakpoints for management

- Update DebuggerController
  - Now calls m_state->AddHardwareBreakpoint instead of adapter directly
  - Ensures hardware breakpoints go through the proper tracking layer

This ensures hardware breakpoints show up in the breakpoint widget and are
properly persisted in the debugger state, consistent with software breakpoints.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ xusheng6
❌ Copilot
You have signed the CLA already but the status is still pending? Let us recheck it.

@xusheng6
Copy link
Member Author

xusheng6 commented Jan 7, 2026

Closed in favor of #950

@xusheng6 xusheng6 closed this Jan 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support hardware breakpoint

3 participants