003 File Manager
Current Path:
/usr/src/contrib/llvm-project/lldb/source/Plugins/Process/elf-core
usr
/
src
/
contrib
/
llvm-project
/
lldb
/
source
/
Plugins
/
Process
/
elf-core
/
📁
..
📄
ProcessElfCore.cpp
(32.61 KB)
📄
ProcessElfCore.h
(5.56 KB)
📄
RegisterContextPOSIXCore_arm.cpp
(2.25 KB)
📄
RegisterContextPOSIXCore_arm.h
(1.79 KB)
📄
RegisterContextPOSIXCore_arm64.cpp
(2.88 KB)
📄
RegisterContextPOSIXCore_arm64.h
(1.85 KB)
📄
RegisterContextPOSIXCore_mips64.cpp
(3 KB)
📄
RegisterContextPOSIXCore_mips64.h
(1.88 KB)
📄
RegisterContextPOSIXCore_powerpc.cpp
(3.59 KB)
📄
RegisterContextPOSIXCore_powerpc.h
(1.98 KB)
📄
RegisterContextPOSIXCore_ppc64le.cpp
(4.6 KB)
📄
RegisterContextPOSIXCore_ppc64le.h
(1.73 KB)
📄
RegisterContextPOSIXCore_s390x.cpp
(3.04 KB)
📄
RegisterContextPOSIXCore_s390x.h
(1.83 KB)
📄
RegisterContextPOSIXCore_x86_64.cpp
(2.92 KB)
📄
RegisterContextPOSIXCore_x86_64.h
(1.69 KB)
📄
RegisterUtilities.cpp
(1.34 KB)
📄
RegisterUtilities.h
(3.94 KB)
📄
ThreadElfCore.cpp
(13.69 KB)
📄
ThreadElfCore.h
(4.72 KB)
Editing: RegisterUtilities.cpp
//===-- RegisterUtilities.cpp ---------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// #include "Plugins/Process/elf-core/RegisterUtilities.h" #include "llvm/ADT/STLExtras.h" using namespace lldb_private; static llvm::Optional<uint32_t> getNoteType(const llvm::Triple &Triple, llvm::ArrayRef<RegsetDesc> RegsetDescs) { for (const auto &Entry : RegsetDescs) { if (Entry.OS != Triple.getOS()) continue; if (Entry.Arch != llvm::Triple::UnknownArch && Entry.Arch != Triple.getArch()) continue; return Entry.Note; } return llvm::None; } DataExtractor lldb_private::getRegset(llvm::ArrayRef<CoreNote> Notes, const llvm::Triple &Triple, llvm::ArrayRef<RegsetDesc> RegsetDescs) { auto TypeOr = getNoteType(Triple, RegsetDescs); if (!TypeOr) return DataExtractor(); uint32_t Type = *TypeOr; auto Iter = llvm::find_if( Notes, [Type](const CoreNote &Note) { return Note.info.n_type == Type; }); return Iter == Notes.end() ? DataExtractor() : Iter->data; }
Upload File
Create Folder