llvm-project/lldb
Dimitar Vlahovski a228c46c2a ELF core: Adding parsing of the floating-point and SSE registers on x86 32/64 bit elf core files
Summary:
The floating-point and SSE registers could be present in the elf-core
file in the note NT_FPREGSET for 64 bit ones, and in the note
NT_PRXFPREG for 32 bit ones.

The entire note is a binary blob matching the layout of the x87 save
area that gets generated by the FXSAVE instruction (see Intel developers
manual for more information).

This CL mainly modifies the RegisterRead function in
RegisterContextPOSIXCore_x86_64 for it to return the correct data both
for GPR and FPR/SSE registers, and return false (meaning "this register
is not available") for other registers.

I added a test to TestElfCore.py that tests reading FPR/SSE registers
both from a 32 and 64 bit elf-core file and I have inluded the source
which I used to generate the core files.

I tried to also add support for the AVX registers, because this info could
also be present in the elf-core file (note NT_X86_XSTATE - that is the result of
the newer XSAVE instruction). Parsing the contents from the file is
easy. The problem is that the ymm registers are split into two halves
and they are in different places in the note. For making this work one
would either make a "hacky" approach, because there won't be
any other way with the current state of the register contexts - they
assume that "this register is of size N and at offset M" and
don't have the notion of discontinuos registers.

Reviewers: labath

Subscribers: emaste, lldb-commits

Differential Revision: https://reviews.llvm.org/D26300

llvm-svn: 287506
2016-11-20 21:24:49 +00:00
..
cmake [CMake] NFC. Updating CMake dependency specifications 2016-11-18 23:31:53 +00:00
docs gdb-remote: Add jModulesInfo packet 2016-09-08 10:07:04 +00:00
examples *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
include/lldb Convert CommandHistory functions to StringRef. 2016-11-18 23:22:42 +00:00
lit [CMake] Fix standalone build 2016-10-21 18:38:44 +00:00
lldb.xcodeproj Remove TimeValue class 2016-11-16 10:54:22 +00:00
lldb.xcworkspace Revert r275223, which committed the wrong thing. 2016-07-12 23:31:42 +00:00
packages/Python/lldbsuite ELF core: Adding parsing of the floating-point and SSE registers on x86 32/64 bit elf core files 2016-11-20 21:24:49 +00:00
resources Bump the lldb version # in the xcode project files from 2016-03-15 04:36:11 +00:00
scripts Clean up the stop printing header lines. 2016-11-08 20:36:40 +00:00
source ELF core: Adding parsing of the floating-point and SSE registers on x86 32/64 bit elf core files 2016-11-20 21:24:49 +00:00
test [CMake] Support LLDB_TEST_CLANG in check-lldb target(s) 2016-11-02 17:19:26 +00:00
third_party/Python/module *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
tools Fix one more build error with lldb-server. 2016-11-17 06:13:54 +00:00
unittests Convert UriParser to use StringRef. 2016-11-17 01:38:02 +00:00
utils *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
www Fix weak symbol linkage in SBStructuredData, update docs. 2016-11-09 23:21:04 +00:00
.arcconfig Upgrade all the .arcconfigs to https. 2016-07-14 13:15:37 +00:00
.clang-format Updated .clang-format rules so bring LLDB in line with LLVM standards. 2016-09-06 17:19:00 +00:00
.gitignore test infra: clear file-charged issues on rerun of file 2016-10-01 00:17:08 +00:00
CMakeLists.txt [CMake] Initial support for LLDB.framework 2016-09-21 21:02:16 +00:00
CODE_OWNERS.txt Removing myself from CODE_OWNERS, and distributing those duties among other members of the community 2016-11-18 23:18:11 +00:00
INSTALL.txt Revert the patch to Test Commit Access 2015-07-06 11:26:51 +00:00
LICENSE.TXT
use_lldb_suite_root.py *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00