This can be done unambiguously because Breakpad used its own values for the
magic numbers identifying its own context structure. You’ll find this in
the ContextFlags field.

Breakpad MD_CONTEXT_ARM is 0x40000000 and MD_CONTEXT_ARM64 is 0x80000000.
Microsoft CONTEXT_ARM is 0x00200000 and CONTEXT_ARM64 is 0x00400000.

There’s also a magic number in the system info stream. Breakpad does use
the same value as Microsoft for 32-bit ARM (PROCESSOR_ARCHITECTURE_ARM =
5). The unambiguity here shouldn’t be a problem because context structures
always have their own flag field that you can use to distinguish. Breakpad
does use a distinct value for 64-bit: Breakpad MD_CPU_ARCHITECTURE_ARM64 is
0x8003 (Crashpad calls this kMinidumpCPUArchitectureARM64Breakpad), and
Microsoft PROCESSOR_ARCHITECTURE_ARM64 is 12 (Crashpad’s
kMinidumpCPUArchitectureARM64).

On Tue, Jul 31, 2018 at 11:59 AM Greg Clayton <clayb...@gmail.com> wrote:

>
>
> On Jul 30, 2018, at 12:17 PM, Leonard Mosescu <mose...@google.com> wrote:
>
> FYI, Breakpad & Crashpad will start generating the Microsoft flavor of ARM
> minidumps soon.
>
>
> How do we tell the difference? I am guessing the ProcessorArchitecture
> will both be set to "PROCESSOR_ARCHITECTURE_ARM". Are plug-ins expected to
> look at the byte size of the thread context then?
>
> Greg
>
>
> On Wed, Jul 25, 2018 at 9:44 AM, Leonard Mosescu via Phabricator <
> revi...@reviews.llvm.org> wrote:
>
>> lemo added inline comments.
>>
>>
>> ================
>> Comment at:
>> source/Plugins/Process/minidump/RegisterContextMinidump_ARM.cpp:51
>> +  reg_fpscr,
>> +  reg_d0,   reg_d1,  reg_d2,  reg_d3,  reg_d4,  reg_d5,  reg_d6,  reg_d7,
>> +  reg_d8,   reg_d9, reg_d10, reg_d11, reg_d12, reg_d13, reg_d14, reg_d15,
>> ----------------
>> Pavel's comment reminded me: what about the S registers (32bit fp) and Q
>> registers (128bit Neon)?
>>
>>
>> https://reviews.llvm.org/D49750
>>
>>
>>
>>
>
>
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to