)]}'
{
  "commit": "1da4f4eb02f723bb1393e71f4e7df07952dc103e",
  "tree": "69183aa3bfa2ffd854bfa5a08fa569df0ce48670",
  "parents": [
    "6a107d207aeb54ce1a8719d61dbd8307f72eba5e"
  ],
  "author": {
    "name": "Duncan McBain",
    "email": "dmcbain@modular.com",
    "time": "Wed May 13 09:43:08 2026 +0100"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Wed May 13 09:43:08 2026 +0100"
  },
  "message": "[lldb] Step over non-lldb breakpoints (#190622)\n\nNote: this is a second attempt at 304c680 / #174348, hopefully fixing\nthe post-commit Mac testing failures. The main differences from the\nprevious commit are:\n* Fixing the incorrect masks in ArchitectureArm.cpp\n* Declining to step in StopInfoMachException if the PC and exception\nexc_sub_code don\u0027t match - implies fixup already applied\n* Change to reflect explicit Address constructor - I assume this is\ncorrect, essentially explicitly making a temporary Address object of the\npc address in SkipOverTrapInstruction\n* Removing the debugserver code to step over the trap instruction as it\ninteracts badly with this change (without the check mentioned\npreviously).\n\n---\n\nSeveral languages support some sort of \"breakpoint\" function, which adds\nISA-specific instructions to generate an interrupt at runtime. However,\non some platforms, these instructions don\u0027t increment the program\ncounter. When LLDB sets these instructions it isn\u0027t a problem, as we\nremove them before continuing, then re-add them after stepping over the\nlocation. However, for breakpoint sequences that are part of the\ninferior process, this doesn\u0027t happen - and so users might be left\nunable to continue past the breakpoint without manually interfering with\nthe program counter.\n\nThis patch adds logic to LLDB to intercept SIGTRAPs, inspect the bytes\nof the inferior at the program counter, and if the instruction looks\nlike a BRK or BKPT or similar, increment the pc by the size of the\ninstruction we found. This unifies platform behaviour (e.g. on x86_64,\nLLDB debug sessions already look like this) and improves UX (in my\nopinion, but I think it beats messing with the PC every time).\n\nSome ISAs (like AArch64) require slightly different handling, as while\nthere are multiple possible instructions, we should be careful only to\nfind the ones likely to have been emitted by a compiler backend, and not\nthose inserted from (for example) the UB sanitizer, or any others.\n\nThere is an existing builtin-debugtrap test which was under the macos\nfolder before. This was moved that to \"functionalities\", made it pure C\nonly, and updated it a little bit so that it works regardless of\nplatform. The corresponding Mac-specific logic has been removed, as it\ndoes not work with the new functionality, however a check has been added\nto check the exception address against the program counter and not step\nif these addresses do not match (as might happen when mixing a system\ndebugserver and lldb as of this patch).\n\n---------\n\nCo-authored-by: Jonas Devlieghere \u003cjonas@devlieghere.com\u003e",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "ed64a895717a1dbc06985e8cf11cdef874e4d25d",
      "old_mode": 33188,
      "old_path": "lldb/include/lldb/Core/Architecture.h",
      "new_id": "f31f23347fb541fcd5070c54f6db7a5456c0020b",
      "new_mode": 33188,
      "new_path": "lldb/include/lldb/Core/Architecture.h"
    },
    {
      "type": "modify",
      "old_id": "4db1cd328bc08f6ad63e4357bc500c549c6474a4",
      "old_mode": 33188,
      "old_path": "lldb/include/lldb/Target/Platform.h",
      "new_id": "8760cb9fc6a8c53e52d1c812807edbdbccb8cfd9",
      "new_mode": 33188,
      "new_path": "lldb/include/lldb/Target/Platform.h"
    },
    {
      "type": "modify",
      "old_id": "cdd6a6fbe6aa4bcb3e4119be51b63d99e5444920",
      "old_mode": 33188,
      "old_path": "lldb/include/lldb/Target/StopInfo.h",
      "new_id": "fbbad7c91fba5649e395e3568f0e5d5f695716b0",
      "new_mode": 33188,
      "new_path": "lldb/include/lldb/Target/StopInfo.h"
    },
    {
      "type": "modify",
      "old_id": "1934768876b5d6ae97b089e8c55a3b24c2c656da",
      "old_mode": 33188,
      "old_path": "lldb/source/Plugins/Architecture/AArch64/ArchitectureAArch64.cpp",
      "new_id": "04589b006f4868575114f6ceb0b5eb6ff216cc1f",
      "new_mode": 33188,
      "new_path": "lldb/source/Plugins/Architecture/AArch64/ArchitectureAArch64.cpp"
    },
    {
      "type": "modify",
      "old_id": "ba409428c951ee768e3766d00aa9b1f55e7bc3b2",
      "old_mode": 33188,
      "old_path": "lldb/source/Plugins/Architecture/AArch64/ArchitectureAArch64.h",
      "new_id": "3bf4b66e28e0a92e67774b22a37a7065c5e516ff",
      "new_mode": 33188,
      "new_path": "lldb/source/Plugins/Architecture/AArch64/ArchitectureAArch64.h"
    },
    {
      "type": "modify",
      "old_id": "721c4bcfe6342706856e2e123a72fbb82bb7f9ad",
      "old_mode": 33188,
      "old_path": "lldb/source/Plugins/Architecture/Arm/ArchitectureArm.cpp",
      "new_id": "609857393c2388dc065af7b80c0b8427e24acfb7",
      "new_mode": 33188,
      "new_path": "lldb/source/Plugins/Architecture/Arm/ArchitectureArm.cpp"
    },
    {
      "type": "modify",
      "old_id": "52277dc5dbae0752c0328eccf873feafe95fe92a",
      "old_mode": 33188,
      "old_path": "lldb/source/Plugins/Architecture/Arm/ArchitectureArm.h",
      "new_id": "dfd7b7b651767bc09ff7aba7428a0c522ee085a4",
      "new_mode": 33188,
      "new_path": "lldb/source/Plugins/Architecture/Arm/ArchitectureArm.h"
    },
    {
      "type": "modify",
      "old_id": "bb838558269f787012dde52a59664d39a11341b9",
      "old_mode": 33188,
      "old_path": "lldb/source/Plugins/Architecture/Mips/ArchitectureMips.cpp",
      "new_id": "255b17ca08d04f071b136de1375441a3af8c6c8d",
      "new_mode": 33188,
      "new_path": "lldb/source/Plugins/Architecture/Mips/ArchitectureMips.cpp"
    },
    {
      "type": "modify",
      "old_id": "cedd4127afcb6e4a06dada4e923b247e92107eaf",
      "old_mode": 33188,
      "old_path": "lldb/source/Plugins/Architecture/Mips/ArchitectureMips.h",
      "new_id": "d2475d21b8de6aa91f2cf23650f2ef81cc9e7595",
      "new_mode": 33188,
      "new_path": "lldb/source/Plugins/Architecture/Mips/ArchitectureMips.h"
    },
    {
      "type": "modify",
      "old_id": "5fbc1f62a065f43e7a0389b6daf9d5789d577cc4",
      "old_mode": 33188,
      "old_path": "lldb/source/Plugins/Process/Utility/StopInfoMachException.cpp",
      "new_id": "5b93ceaaed8d50e396b1264e22292787a413fdf0",
      "new_mode": 33188,
      "new_path": "lldb/source/Plugins/Process/Utility/StopInfoMachException.cpp"
    },
    {
      "type": "modify",
      "old_id": "147d53ad31e7ec243922971fccece8ba9ce8fe19",
      "old_mode": 33188,
      "old_path": "lldb/source/Plugins/Process/Utility/StopInfoMachException.h",
      "new_id": "bac5e9777289fbf7a930a9c8e7e5f598942a0349",
      "new_mode": 33188,
      "new_path": "lldb/source/Plugins/Process/Utility/StopInfoMachException.h"
    },
    {
      "type": "modify",
      "old_id": "4786674c6ec36497db6360043cfe3e51db0850cb",
      "old_mode": 33188,
      "old_path": "lldb/source/Target/Platform.cpp",
      "new_id": "2b9966db2f3299e5162c13400b403e9f83fd6d95",
      "new_mode": 33188,
      "new_path": "lldb/source/Target/Platform.cpp"
    },
    {
      "type": "modify",
      "old_id": "768d2e8fc0dae126264cfd3170f7443de7e03869",
      "old_mode": 33188,
      "old_path": "lldb/source/Target/StopInfo.cpp",
      "new_id": "4ce37463778b64d5f293adbaf7fde12a053487f4",
      "new_mode": 33188,
      "new_path": "lldb/source/Target/StopInfo.cpp"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "10495940055b63d2b69fd0ee465e69dad1889d2f",
      "new_mode": 33188,
      "new_path": "lldb/test/API/functionalities/builtin-debugtrap/Makefile"
    },
    {
      "type": "rename",
      "old_id": "e66892b7ee87afee0d9659a08a631d23c77541f5",
      "old_mode": 33188,
      "old_path": "lldb/test/API/macosx/builtin-debugtrap/TestBuiltinDebugTrap.py",
      "new_id": "0b1e754a68d0b0cd8fb6a168bd30707d18e7e40b",
      "new_mode": 33188,
      "new_path": "lldb/test/API/functionalities/builtin-debugtrap/TestBuiltinDebugTrap.py",
      "score": 68
    },
    {
      "type": "rename",
      "old_id": "84332d800148f153d389f135479995fce2f1b896",
      "old_mode": 33188,
      "old_path": "lldb/test/API/macosx/builtin-debugtrap/main.cpp",
      "new_id": "8010be4a0235eb62407ab82e3bc950bc8fa6c0d2",
      "new_mode": 33188,
      "new_path": "lldb/test/API/functionalities/builtin-debugtrap/main.c",
      "score": 92
    },
    {
      "type": "delete",
      "old_id": "99998b20bcb0502181cbf488a2034823e5f66d22",
      "old_mode": 33188,
      "old_path": "lldb/test/API/macosx/builtin-debugtrap/Makefile",
      "new_id": "0000000000000000000000000000000000000000",
      "new_mode": 0,
      "new_path": "/dev/null"
    },
    {
      "type": "modify",
      "old_id": "b5897499b896f42d0542c142fce525f8a0251830",
      "old_mode": 33188,
      "old_path": "lldb/tools/debugserver/source/MacOSX/arm64/DNBArchImplARM64.cpp",
      "new_id": "35147c14a550198c1e5e7bfc8c77d710fa62fcf7",
      "new_mode": 33188,
      "new_path": "lldb/tools/debugserver/source/MacOSX/arm64/DNBArchImplARM64.cpp"
    }
  ]
}
