[all-commits] [llvm/llvm-project] e76cfa: AArch64 debugserver parse ESR register for watchpo...

Jason Molenda via All-commits all-commits at lists.llvm.org
Wed Apr 12 18:36:31 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e76cfaca70be0b45e62149e52f68d8352fa8ea2f
      https://github.com/llvm/llvm-project/commit/e76cfaca70be0b45e62149e52f68d8352fa8ea2f
  Author: Jason Molenda <jason at molenda.com>
  Date:   2023-04-12 (Wed, 12 Apr 2023)

  Changed paths:
    A lldb/test/API/commands/watchpoints/unaligned-watchpoint/Makefile
    A lldb/test/API/commands/watchpoints/unaligned-watchpoint/TestUnalignedWatchpoint.py
    A lldb/test/API/commands/watchpoints/unaligned-watchpoint/main.c
    M lldb/tools/debugserver/source/DNBBreakpoint.cpp
    M lldb/tools/debugserver/source/DNBBreakpoint.h
    M lldb/tools/debugserver/source/DNBDefs.h
    M lldb/tools/debugserver/source/MacOSX/MachException.cpp
    M lldb/tools/debugserver/source/MacOSX/MachProcess.h
    M lldb/tools/debugserver/source/MacOSX/MachProcess.mm
    M lldb/tools/debugserver/source/RNBRemote.cpp

  Log Message:
  -----------
  AArch64 debugserver parse ESR register for watchpoints

Have debugserver parse the watchpoint flags out of the exception
syndrome register when we get a watchpoint mach exception.  Relay
those fields up to lldb in the stop reply packet, if the watchpoint
number was reported by the hardware, use the address from that as
the watchpoint address.

Change how watchpoints are reported to lldb from using the mach
exception data, to using the `reason:watchpoint` and `description:asciihex`
method that lldb-server uses, which can relay the actual trap address
as well as the address of a watched memory region responsible for
the trap, so lldb can step past it.

Have debugserver look for the nearest watchpoint that it has set
when it gets a watchpoint trap, so accesses that are reported as
starting before the watched region are associated with the correct
watchpoint to lldb.  Add a test case for this specific issue.

Differential Revision: https://reviews.llvm.org/D147820
rdar://83996471




More information about the All-commits mailing list