mirror of
https://git.suyu.dev/suyu/breakpad.git
synced 2026-01-10 08:28:10 +01:00
Added crash context float state flag
Instead of listing everywhere the set of architectures that do not require/support explicit float state in their crash context, a new GOOGLE_BREAKPAD_CRASH_CONTEXT_HAS_FLOAT_STATE preprocessor macro has been defined. Adding novel architectures will only require to manage the macro definition in a single place. Change-Id: I2732982f2cdfc9fcd2f71d6e5e122617faff9e82 Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/3876345 Reviewed-by: Mike Frysinger <vapier@chromium.org>
This commit is contained in:
parent
30c7f3cfc1
commit
e69677e93d
4 changed files with 18 additions and 12 deletions
|
|
@ -138,7 +138,7 @@ class MicrodumpWriter {
|
|||
const MicrodumpExtraInfo& microdump_extra_info,
|
||||
LinuxDumper* dumper)
|
||||
: ucontext_(context ? &context->context : NULL),
|
||||
#if !defined(__ARM_EABI__) && !defined(__mips__)
|
||||
#if GOOGLE_BREAKPAD_CRASH_CONTEXT_HAS_FLOAT_STATE
|
||||
float_state_(context ? &context->float_state : NULL),
|
||||
#endif
|
||||
dumper_(dumper),
|
||||
|
|
@ -409,7 +409,7 @@ class MicrodumpWriter {
|
|||
void DumpCPUState() {
|
||||
RawContextCPU cpu;
|
||||
my_memset(&cpu, 0, sizeof(RawContextCPU));
|
||||
#if !defined(__ARM_EABI__) && !defined(__mips__)
|
||||
#if GOOGLE_BREAKPAD_CRASH_CONTEXT_HAS_FLOAT_STATE
|
||||
UContextReader::FillCPUContext(&cpu, ucontext_, float_state_);
|
||||
#else
|
||||
UContextReader::FillCPUContext(&cpu, ucontext_);
|
||||
|
|
@ -605,7 +605,7 @@ class MicrodumpWriter {
|
|||
void* Alloc(unsigned bytes) { return dumper_->allocator()->Alloc(bytes); }
|
||||
|
||||
const ucontext_t* const ucontext_;
|
||||
#if !defined(__ARM_EABI__) && !defined(__mips__)
|
||||
#if GOOGLE_BREAKPAD_CRASH_CONTEXT_HAS_FLOAT_STATE
|
||||
const google_breakpad::fpstate_t* const float_state_;
|
||||
#endif
|
||||
LinuxDumper* dumper_;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue