[all-commits] [llvm/llvm-project] 8e85d1: [lldb][test] Add expedited-stack-memory backtrace/...

Yao Qi via All-commits all-commits at lists.llvm.org
Mon Jul 6 02:51:38 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 8e85d1f3d458ae91d8838ccde75c1488dd514794
      https://github.com/llvm/llvm-project/commit/8e85d1f3d458ae91d8838ccde75c1488dd514794
  Author: Yao Qi <yao_qi at apple.com>
  Date:   2026-07-06 (Mon, 06 Jul 2026)

  Changed paths:
    M lldb/packages/Python/lldbsuite/test/gdbclientutils.py
    A lldb/test/API/macosx/expedited-stack-memory/Makefile
    A lldb/test/API/macosx/expedited-stack-memory/TestExpeditedStackMemory.py
    A lldb/test/API/macosx/expedited-stack-memory/main.c

  Log Message:
  -----------
  [lldb][test] Add expedited-stack-memory backtrace/locals packet test (#205897)

Add a Darwin API test that checks which gdb-remote packets lldb sends
while
inspecting the stack at a public stop, using the gdb-remote packet log
(the
same approach as TestExpeditedThreadPCs.py).

debugserver expedites the frame-pointer backchain in the `jThreadsInfo`
reply
at a public stop and lldb caches it, so:

- A backtrace (`GetNumFrames` + `GetFrameAtIndex` over every frame)
sends no
packets at all. With the memory cache disabled it must read the
backchain
frame by frame, which confirms the test exercises the unwinder's memory
    reads.

- Examining frame locals is not covered by the expedite, so it reads
value
memory. The reads are classified as stack vs heap using the variables'
    own addresses (known from main.c).

Locals are examined two ways, modeling how an IDE inspects values at a
stop:
walking the whole stack but examining only the selected frame's locals
(frame 0, as a variables view does on a stop), and examining every
frame's
locals (a "view all frames" mode). The stopped frame (`func_e`) carries
scalar,
aggregate, and pointer-to-heap locals so frame 0 alone reads both stack
and
heap memory; the outer frames keep locals so the all-frames case reads
the
same variety across several frames.  Values are read with
`use_dynamic=eDynamicCanRunTarget` to match how an IDE reads them.



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