[Lldb-commits] [PATCH] D155256: [lldb][x86_64] Add fs_base/gs_base support for Linux

David Spickett via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Jul 19 02:52:14 PDT 2023


DavidSpickett added inline comments.


================
Comment at: lldb/test/API/functionalities/postmortem/elf-core/TestLinuxCore.py:647
+        self.assertTrue(reg_gs_base.IsValid(), "gs_base is not available")
+        # The fs_base/gs_base registers in linux-x86_64.core are both zero.
+        # Use "eu-readelf -n linux-x86_64.core" to verify.
----------------
DavidSpickett wrote:
> Is it possible to make them non-zero? Looks like gs_base is often 0 anyway, so making fs_base non-zero would at least prove that we don't just always return 0, and that we don't get fs_base and gs_base mixed up.
Hmm, I see that this core is created from a very simple file that doesn't use pthreads. And adding pthreads in for all the supported platforms might be a can of worms.

There is a thread_crash test you could tack this onto instead, assuming the cpp threads are built on pthreads. It's not great because the test is really focusing on something else, but it's convenient.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D155256/new/

https://reviews.llvm.org/D155256



More information about the lldb-commits mailing list