mirror of
https://git.suyu.dev/suyu/breakpad.git
synced 2025-12-22 21:56:18 +01:00
Remove disassembler_objdump from the build on non-linux platforms.
Change-Id: I29d628ac7cf79bfca1794ba325c945a0f122b360 Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/3964364 Reviewed-by: Ivan Penkov <ivanpe@chromium.org>
This commit is contained in:
parent
95857a18bb
commit
f617814017
5 changed files with 273 additions and 184 deletions
|
|
@ -44,11 +44,14 @@
|
|||
#include "google_breakpad/processor/process_state.h"
|
||||
#include "google_breakpad/processor/exploitability.h"
|
||||
#include "google_breakpad/processor/stack_frame_symbolizer.h"
|
||||
#include "processor/disassembler_objdump.h"
|
||||
#include "processor/logging.h"
|
||||
#include "processor/stackwalker_x86.h"
|
||||
#include "processor/symbolic_constants_win.h"
|
||||
|
||||
#ifdef __linux__
|
||||
#include "processor/disassembler_objdump.h"
|
||||
#endif
|
||||
|
||||
namespace google_breakpad {
|
||||
|
||||
MinidumpProcessor::MinidumpProcessor(SymbolSupplier* supplier,
|
||||
|
|
@ -770,6 +773,7 @@ static bool IsCanonicalAddress(uint64_t address) {
|
|||
return true;
|
||||
}
|
||||
|
||||
#ifdef __linux__
|
||||
static void CalculateFaultAddressFromInstruction(Minidump* dump,
|
||||
uint64_t* address) {
|
||||
MinidumpException* exception = dump->GetException();
|
||||
|
|
@ -832,6 +836,7 @@ static void CalculateFaultAddressFromInstruction(Minidump* dump,
|
|||
*address = write_address;
|
||||
}
|
||||
}
|
||||
#endif // __linux__
|
||||
|
||||
// static
|
||||
string MinidumpProcessor::GetCrashReason(Minidump* dump, uint64_t* address,
|
||||
|
|
@ -2070,6 +2075,7 @@ string MinidumpProcessor::GetCrashReason(Minidump* dump, uint64_t* address,
|
|||
static_cast<MDCPUArchitecture>(raw_system_info->processor_architecture),
|
||||
*address);
|
||||
|
||||
#ifdef __linux__
|
||||
// For invalid accesses to non-canonical addresses, amd64 cpus don't provide
|
||||
// the fault address, so recover it from the disassembly and register state
|
||||
// if possible.
|
||||
|
|
@ -2078,6 +2084,7 @@ string MinidumpProcessor::GetCrashReason(Minidump* dump, uint64_t* address,
|
|||
&& std::numeric_limits<uint64_t>::max() == *address) {
|
||||
CalculateFaultAddressFromInstruction(dump, address);
|
||||
}
|
||||
#endif // __linux__
|
||||
}
|
||||
|
||||
return reason;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue