[Lldb-commits] [lldb] [lldb] Add SB API to make a breakpoint a hardware breakpoint (PR #146602)
Jason Molenda via lldb-commits
lldb-commits at lists.llvm.org
Tue Jul 1 14:49:35 PDT 2025
jasonmolenda wrote:
ah sure enough, ``` } else if (packet_cmd == 'z') {
// remove
switch (break_type) {
case '0': // remove software breakpoint
case '1': // remove hardware breakpoint
if (DNBBreakpointClear(pid, addr)) {
```
there's no requirement to be correct about which packet you use to clear an existing breakpoint, with debugserver
lldb-server passes whether a hardware or software breakpoint is being requested to be cleared,
```
if (want_breakpoint) {
// Try to clear the breakpoint.
const Status error =
m_current_process->RemoveBreakpoint(addr, want_hardware);
```
and
```
Status NativeProcessLinux::RemoveBreakpoint(lldb::addr_t addr, bool hardware) {
if (hardware)
return RemoveHardwareBreakpoint(addr);
else
return NativeProcessProtocol::RemoveBreakpoint(addr);
}
```
good chance this won't work on linux.
https://github.com/llvm/llvm-project/pull/146602
More information about the lldb-commits
mailing list