[all-commits] [llvm/llvm-project] 2af345: [lldb-server] Add type info for qMemoryinfo repons...

Felipe de Azevedo Piovezan via All-commits all-commits at lists.llvm.org
Wed Jul 15 01:21:31 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 2af345af8dbffa975589b5f774ab006f372b4c00
      https://github.com/llvm/llvm-project/commit/2af345af8dbffa975589b5f774ab006f372b4c00
  Author: Felipe de Azevedo Piovezan <fpiovezan at apple.com>
  Date:   2026-07-15 (Wed, 15 Jul 2026)

  Changed paths:
    M lldb/include/lldb/Target/MemoryRegionInfo.h
    M lldb/source/Plugins/Process/Utility/LinuxProcMaps.cpp
    M lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
    M lldb/unittests/Process/Utility/LinuxProcMapsTest.cpp

  Log Message:
  -----------
  [lldb-server] Add type info for qMemoryinfo reponse (#209235)

Use the name of the memory region to report the known cases where an
address points to stack/heap: "[stack]" or "[heap"].

According to [1], the "[stack]" name is the main thread's stack region:
```
  [stack]
                     The initial process's (also known as the main
                     thread's) stack.
```

For other threads, we can't know their stack region because this field
got removed in newer kernels:

```
 [stack:tid] (from Linux 3.4 to Linux 4.4)
        A thread's stack (where the tid is a thread ID).  It
        corresponds to the /proc/pid/task/tid/ path.  This
        field was removed in Linux 4.5, since providing this
        information for a process with large numbers of
        threads is expensive.
```

So we can only set "isStack" to Yes in some cases, and to "No" when the
name is "[heap]". If there is no name, or the name is something else, we
keep the "don't know" answer.

[1]: https://man7.org/linux/man-pages/man5/proc_pid_maps.5.html



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