Skip to content

Commit d17c412

Browse files
committed
Run GCF
1 parent ebc02c4 commit d17c412

File tree

2 files changed

+25
-29
lines changed

2 files changed

+25
-29
lines changed

lldb/source/Plugins/Process/elf-core/ThreadElfCore.cpp

Lines changed: 20 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9-
#include "Plugins/Process/POSIX/CrashReason.h"
109
#include "lldb/Target/RegisterContext.h"
1110
#include "lldb/Target/StopInfo.h"
1211
#include "lldb/Target/Target.h"
@@ -43,7 +42,6 @@
4342
#include "RegisterContextPOSIXCore_x86_64.h"
4443
#include "ThreadElfCore.h"
4544

46-
#include "bits/types/siginfo_t.h"
4745
#include <memory>
4846

4947
using namespace lldb;
@@ -564,32 +562,30 @@ Status ELFLinuxSigInfo::Parse(const DataExtractor &data, const ArchSpec &arch) {
564562
if (data.GetAddressByteSize() == 8)
565563
offset += 4;
566564
switch (si_signo) {
567-
case SIGFPE:
568-
case SIGILL:
569-
case SIGSEGV:
570-
case SIGBUS:
571-
case SIGTRAP:
572-
addr = (void*)data.GetAddress(&offset);
573-
addr_lsb = data.GetU16(&offset);
574-
return error;
575-
default:
576-
return error;
565+
case SIGFPE:
566+
case SIGILL:
567+
case SIGSEGV:
568+
case SIGBUS:
569+
case SIGTRAP:
570+
addr = (void *)data.GetAddress(&offset);
571+
addr_lsb = data.GetU16(&offset);
572+
return error;
573+
default:
574+
return error;
577575
}
578576
}
579577

580578
std::string ELFLinuxSigInfo::GetDescription() {
581579
switch (si_signo) {
582-
case SIGFPE:
583-
case SIGILL:
584-
case SIGSEGV:
585-
case SIGBUS:
586-
case SIGTRAP:
587-
return lldb_private::UnixSignals::CreateForHost()->GetSignalDescription(
588-
si_signo, si_code,
589-
reinterpret_cast<uintptr_t>(addr));
590-
default:
591-
return lldb_private::UnixSignals::CreateForHost()->GetSignalDescription(
592-
si_signo, si_code
593-
);
580+
case SIGFPE:
581+
case SIGILL:
582+
case SIGSEGV:
583+
case SIGBUS:
584+
case SIGTRAP:
585+
return lldb_private::UnixSignals::CreateForHost()->GetSignalDescription(
586+
si_signo, si_code, reinterpret_cast<uintptr_t>(addr));
587+
default:
588+
return lldb_private::UnixSignals::CreateForHost()->GetSignalDescription(
589+
si_signo, si_code);
594590
}
595591
}

lldb/source/Plugins/Process/elf-core/ThreadElfCore.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -75,16 +75,16 @@ struct ELFLinuxPrStatus {
7575
static_assert(sizeof(ELFLinuxPrStatus) == 112,
7676
"sizeof ELFLinuxPrStatus is not correct!");
7777

78-
union ELFSigval {
79-
int sival_int;
80-
void *sival_ptr;
78+
union ELFSigval {
79+
int sival_int;
80+
void *sival_ptr;
8181
};
8282

8383
struct ELFLinuxSigInfo {
8484
int32_t si_signo; // Order matters for the first 3.
8585
int32_t si_errno;
8686
int32_t si_code;
87-
void *addr; /* faulting insn/memory ref. */
87+
void *addr; /* faulting insn/memory ref. */
8888
int32_t addr_lsb; /* Valid LSB of the reported address. */
8989

9090
ELFLinuxSigInfo();
@@ -153,7 +153,7 @@ struct ThreadData {
153153
lldb::tid_t tid;
154154
int signo = 0;
155155
int code = 0;
156-
void* sigaddr = nullptr;
156+
void *sigaddr = nullptr;
157157
int prstatus_sig = 0;
158158
std::string description;
159159
std::string name;

0 commit comments

Comments
 (0)