[all-commits] [llvm/llvm-project] 378f24: [lldb] Add SB API to make a breakpoint a hardware ...

Jonas Devlieghere via All-commits all-commits at lists.llvm.org
Thu Jul 3 11:17:41 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 378f248934d603e3fba9d958d2db997814d057d5
      https://github.com/llvm/llvm-project/commit/378f248934d603e3fba9d958d2db997814d057d5
  Author: Jonas Devlieghere <jonas at devlieghere.com>
  Date:   2025-07-03 (Thu, 03 Jul 2025)

  Changed paths:
    M lldb/include/lldb/API/SBBreakpoint.h
    M lldb/include/lldb/Breakpoint/Breakpoint.h
    M lldb/include/lldb/Breakpoint/BreakpointLocation.h
    M lldb/source/API/SBBreakpoint.cpp
    M lldb/source/Breakpoint/Breakpoint.cpp
    M lldb/source/Breakpoint/BreakpointLocation.cpp
    A lldb/test/API/functionalities/breakpoint/hardware_breakpoints/simple_hw_breakpoints/Makefile
    A lldb/test/API/functionalities/breakpoint/hardware_breakpoints/simple_hw_breakpoints/TestSimpleHWBreakpoints.py
    A lldb/test/API/functionalities/breakpoint/hardware_breakpoints/simple_hw_breakpoints/main.c

  Log Message:
  -----------
  [lldb] Add SB API to make a breakpoint a hardware breakpoint (#146602)

This adds SBBreakpoint::SetIsHardware, allowing clients to mark an
existing breakpoint as a hardware breakpoint purely through the API.
This is safe to do after creation, as the hardware/software distinction
doesn't affect how breakpoint locations are selected.

In some cases (e.g. when writing a trap instruction would alter program
behavior), it's important to use hardware breakpoints. Ideally, we’d
extend the various `Create` methods to support this, but given their
number, this patch limits the scope to the post-creation API. As a
workaround, users can also rely on target.require-hardware-breakpoint or
use the `breakpoint set` command.

rdar://153528045



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list