2019-04-02 19:58:37 +08:00
|
|
|
# RUN: yaml2obj %s | obj2yaml - | FileCheck %s
|
|
|
|
|
|
|
|
--- !minidump
|
2019-05-09 23:13:53 +08:00
|
|
|
Streams:
|
2019-04-02 19:58:37 +08:00
|
|
|
- Type: SystemInfo
|
|
|
|
Processor Arch: ARM64
|
|
|
|
Platform ID: Linux
|
Minidump: Add support for reading/writing strings
Summary:
Strings in minidump files are stored as a 32-bit length field, giving
the length of the string in *bytes*, which is followed by the
appropriate number of UTF16 code units. The string is also supposed to
be null-terminated, and the null-terminator is not a part of the length
field. This patch:
- adds support for reading these strings out of the minidump file (this
implementation does not depend on proper null-termination)
- adds support for writing them to a minidump file
- using the previous two pieces implements proper (de)serialization of
the CSDVersion field of the SystemInfo stream. Previously, this was
only read/written as hex, and no attempt was made to access the
referenced string -- now this string is read and written correctly.
The changes are tested via yaml2obj|obj2yaml round-trip as well as a
unit test which checks the corner cases of the string deserialization
logic.
Reviewers: jhenderson, zturner, clayborg
Subscribers: llvm-commits, aprantl, markmentovai, amccarth, lldb-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D59775
llvm-svn: 357749
2019-04-05 16:06:26 +08:00
|
|
|
CSD Version: Linux 3.13.0-91-generic
|
2019-05-09 23:13:53 +08:00
|
|
|
CPU:
|
2019-04-02 19:58:37 +08:00
|
|
|
CPUID: 0x05060708
|
|
|
|
- Type: LinuxAuxv
|
|
|
|
Content: DEADBEEFBAADF00D
|
|
|
|
- Type: LinuxMaps
|
|
|
|
Text: |
|
|
|
|
400d9000-400db000 r-xp 00000000 b3:04 227 /system/bin/app_process
|
|
|
|
400db000-400dc000 r--p 00001000 b3:04 227 /system/bin/app_process
|
|
|
|
|
MinidumpYAML: Add support for ModuleList stream
Summary:
This patch adds support for yaml (de)serialization of the minidump
ModuleList stream. It's a fairly straight forward-application of the
existing patterns to the ModuleList structures defined in previous
patches.
One thing, which may be interesting to call out explicitly is the
addition of "new" allocation functions to the helper BlobAllocator
class. The reason for this was, that there was an emerging pattern of a
need to allocate space for entities, which do not have a suitable
lifetime for use with the existing allocation functions. A typical
example of that was the "size" of various lists, which is only available
as a temporary returned by the .size() method of some container. For
these cases, one can use the new set of allocation functions, which
will take a temporary object, and store it in an allocator-managed
buffer until it is written to disk.
Reviewers: amccarth, jhenderson, clayborg, zturner
Subscribers: lldb-commits, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D60405
llvm-svn: 358672
2019-04-18 22:57:31 +08:00
|
|
|
- Type: ModuleList
|
2019-05-09 23:13:53 +08:00
|
|
|
Modules:
|
MinidumpYAML: Add support for ModuleList stream
Summary:
This patch adds support for yaml (de)serialization of the minidump
ModuleList stream. It's a fairly straight forward-application of the
existing patterns to the ModuleList structures defined in previous
patches.
One thing, which may be interesting to call out explicitly is the
addition of "new" allocation functions to the helper BlobAllocator
class. The reason for this was, that there was an emerging pattern of a
need to allocate space for entities, which do not have a suitable
lifetime for use with the existing allocation functions. A typical
example of that was the "size" of various lists, which is only available
as a temporary returned by the .size() method of some container. For
these cases, one can use the new set of allocation functions, which
will take a temporary object, and store it in an allocator-managed
buffer until it is written to disk.
Reviewers: amccarth, jhenderson, clayborg, zturner
Subscribers: lldb-commits, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D60405
llvm-svn: 358672
2019-04-18 22:57:31 +08:00
|
|
|
- Base of Image: 0x0001020304050607
|
|
|
|
Size of Image: 0x08090A0B
|
|
|
|
Checksum: 0x0C0D0E0F
|
|
|
|
Time Date Stamp: 47
|
|
|
|
Module Name: a.out
|
2019-05-09 23:13:53 +08:00
|
|
|
Version Info:
|
|
|
|
Signature: 0x10111213
|
|
|
|
Struct Version: 0x14151617
|
|
|
|
File Version High: 0x18191A1B
|
|
|
|
File Version Low: 0x1C1D1E1F
|
MinidumpYAML: Add support for ModuleList stream
Summary:
This patch adds support for yaml (de)serialization of the minidump
ModuleList stream. It's a fairly straight forward-application of the
existing patterns to the ModuleList structures defined in previous
patches.
One thing, which may be interesting to call out explicitly is the
addition of "new" allocation functions to the helper BlobAllocator
class. The reason for this was, that there was an emerging pattern of a
need to allocate space for entities, which do not have a suitable
lifetime for use with the existing allocation functions. A typical
example of that was the "size" of various lists, which is only available
as a temporary returned by the .size() method of some container. For
these cases, one can use the new set of allocation functions, which
will take a temporary object, and store it in an allocator-managed
buffer until it is written to disk.
Reviewers: amccarth, jhenderson, clayborg, zturner
Subscribers: lldb-commits, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D60405
llvm-svn: 358672
2019-04-18 22:57:31 +08:00
|
|
|
Product Version High: 0x20212223
|
2019-05-09 23:13:53 +08:00
|
|
|
Product Version Low: 0x24252627
|
|
|
|
File Flags Mask: 0x28292A2B
|
|
|
|
File Flags: 0x2C2D2E2F
|
|
|
|
File OS: 0x30313233
|
|
|
|
File Type: 0x34353637
|
|
|
|
File Subtype: 0x38393A3B
|
|
|
|
File Date High: 0x3C3D3E3F
|
|
|
|
File Date Low: 0x40414243
|
MinidumpYAML: Add support for ModuleList stream
Summary:
This patch adds support for yaml (de)serialization of the minidump
ModuleList stream. It's a fairly straight forward-application of the
existing patterns to the ModuleList structures defined in previous
patches.
One thing, which may be interesting to call out explicitly is the
addition of "new" allocation functions to the helper BlobAllocator
class. The reason for this was, that there was an emerging pattern of a
need to allocate space for entities, which do not have a suitable
lifetime for use with the existing allocation functions. A typical
example of that was the "size" of various lists, which is only available
as a temporary returned by the .size() method of some container. For
these cases, one can use the new set of allocation functions, which
will take a temporary object, and store it in an allocator-managed
buffer until it is written to disk.
Reviewers: amccarth, jhenderson, clayborg, zturner
Subscribers: lldb-commits, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D60405
llvm-svn: 358672
2019-04-18 22:57:31 +08:00
|
|
|
CodeView Record: '44454647'
|
2019-05-16 23:17:30 +08:00
|
|
|
Misc Record: '48494A4B'
|
MinidumpYAML: Add support for ModuleList stream
Summary:
This patch adds support for yaml (de)serialization of the minidump
ModuleList stream. It's a fairly straight forward-application of the
existing patterns to the ModuleList structures defined in previous
patches.
One thing, which may be interesting to call out explicitly is the
addition of "new" allocation functions to the helper BlobAllocator
class. The reason for this was, that there was an emerging pattern of a
need to allocate space for entities, which do not have a suitable
lifetime for use with the existing allocation functions. A typical
example of that was the "size" of various lists, which is only available
as a temporary returned by the .size() method of some container. For
these cases, one can use the new set of allocation functions, which
will take a temporary object, and store it in an allocator-managed
buffer until it is written to disk.
Reviewers: amccarth, jhenderson, clayborg, zturner
Subscribers: lldb-commits, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D60405
llvm-svn: 358672
2019-04-18 22:57:31 +08:00
|
|
|
- Base of Image: 0x4C4D4E4F50515253
|
|
|
|
Size of Image: 0x54555657
|
|
|
|
Module Name: libb.so
|
2019-05-16 23:17:30 +08:00
|
|
|
CodeView Record: '58595A5B'
|
2019-05-09 23:13:53 +08:00
|
|
|
- Type: ThreadList
|
|
|
|
Threads:
|
|
|
|
- Thread Id: 0x5C5D5E5F
|
|
|
|
Priority Class: 0x60616263
|
|
|
|
Environment Block: 0x6465666768696A6B
|
2019-05-16 23:17:30 +08:00
|
|
|
Context: '7C7D7E7F80818283'
|
2019-05-09 23:13:53 +08:00
|
|
|
Stack:
|
|
|
|
Start of Memory Range: 0x6C6D6E6F70717273
|
2019-05-16 23:17:30 +08:00
|
|
|
Content: '7475767778797A7B'
|
|
|
|
- Type: MemoryList
|
|
|
|
Memory Ranges:
|
|
|
|
- Start of Memory Range: 0x7C7D7E7F80818283
|
|
|
|
Content: '8485868788'
|
2019-04-02 19:58:37 +08:00
|
|
|
...
|
|
|
|
|
|
|
|
# CHECK: --- !minidump
|
2019-05-09 23:13:53 +08:00
|
|
|
# CHECK-NEXT: Streams:
|
2019-04-02 19:58:37 +08:00
|
|
|
# CHECK-NEXT: - Type: SystemInfo
|
|
|
|
# CHECK-NEXT: Processor Arch: ARM64
|
|
|
|
# CHECK-NEXT: Platform ID: Linux
|
Minidump: Add support for reading/writing strings
Summary:
Strings in minidump files are stored as a 32-bit length field, giving
the length of the string in *bytes*, which is followed by the
appropriate number of UTF16 code units. The string is also supposed to
be null-terminated, and the null-terminator is not a part of the length
field. This patch:
- adds support for reading these strings out of the minidump file (this
implementation does not depend on proper null-termination)
- adds support for writing them to a minidump file
- using the previous two pieces implements proper (de)serialization of
the CSDVersion field of the SystemInfo stream. Previously, this was
only read/written as hex, and no attempt was made to access the
referenced string -- now this string is read and written correctly.
The changes are tested via yaml2obj|obj2yaml round-trip as well as a
unit test which checks the corner cases of the string deserialization
logic.
Reviewers: jhenderson, zturner, clayborg
Subscribers: llvm-commits, aprantl, markmentovai, amccarth, lldb-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D59775
llvm-svn: 357749
2019-04-05 16:06:26 +08:00
|
|
|
# CHECK-NEXT: CSD Version: Linux 3.13.0-91-generic
|
2019-05-09 23:13:53 +08:00
|
|
|
# CHECK-NEXT: CPU:
|
2019-04-02 19:58:37 +08:00
|
|
|
# CHECK-NEXT: CPUID: 0x05060708
|
|
|
|
# CHECK-NEXT: - Type: LinuxAuxv
|
|
|
|
# CHECK-NEXT: Content: DEADBEEFBAADF00D
|
|
|
|
# CHECK-NEXT: - Type: LinuxMaps
|
|
|
|
# CHECK-NEXT: Text: |
|
|
|
|
# CHECK-NEXT: 400d9000-400db000 r-xp 00000000 b3:04 227 /system/bin/app_process
|
|
|
|
# CHECK-NEXT: 400db000-400dc000 r--p 00001000 b3:04 227 /system/bin/app_process
|
|
|
|
# CHECK-EMPTY:
|
MinidumpYAML: Add support for ModuleList stream
Summary:
This patch adds support for yaml (de)serialization of the minidump
ModuleList stream. It's a fairly straight forward-application of the
existing patterns to the ModuleList structures defined in previous
patches.
One thing, which may be interesting to call out explicitly is the
addition of "new" allocation functions to the helper BlobAllocator
class. The reason for this was, that there was an emerging pattern of a
need to allocate space for entities, which do not have a suitable
lifetime for use with the existing allocation functions. A typical
example of that was the "size" of various lists, which is only available
as a temporary returned by the .size() method of some container. For
these cases, one can use the new set of allocation functions, which
will take a temporary object, and store it in an allocator-managed
buffer until it is written to disk.
Reviewers: amccarth, jhenderson, clayborg, zturner
Subscribers: lldb-commits, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D60405
llvm-svn: 358672
2019-04-18 22:57:31 +08:00
|
|
|
# CHECK-NEXT: - Type: ModuleList
|
2019-05-09 23:13:53 +08:00
|
|
|
# CHECK-NEXT: Modules:
|
MinidumpYAML: Add support for ModuleList stream
Summary:
This patch adds support for yaml (de)serialization of the minidump
ModuleList stream. It's a fairly straight forward-application of the
existing patterns to the ModuleList structures defined in previous
patches.
One thing, which may be interesting to call out explicitly is the
addition of "new" allocation functions to the helper BlobAllocator
class. The reason for this was, that there was an emerging pattern of a
need to allocate space for entities, which do not have a suitable
lifetime for use with the existing allocation functions. A typical
example of that was the "size" of various lists, which is only available
as a temporary returned by the .size() method of some container. For
these cases, one can use the new set of allocation functions, which
will take a temporary object, and store it in an allocator-managed
buffer until it is written to disk.
Reviewers: amccarth, jhenderson, clayborg, zturner
Subscribers: lldb-commits, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D60405
llvm-svn: 358672
2019-04-18 22:57:31 +08:00
|
|
|
# CHECK-NEXT: - Base of Image: 0x0001020304050607
|
|
|
|
# CHECK-NEXT: Size of Image: 0x08090A0B
|
|
|
|
# CHECK-NEXT: Checksum: 0x0C0D0E0F
|
|
|
|
# CHECK-NEXT: Time Date Stamp: 47
|
|
|
|
# CHECK-NEXT: Module Name: a.out
|
2019-05-09 23:13:53 +08:00
|
|
|
# CHECK-NEXT: Version Info:
|
|
|
|
# CHECK-NEXT: Signature: 0x10111213
|
|
|
|
# CHECK-NEXT: Struct Version: 0x14151617
|
|
|
|
# CHECK-NEXT: File Version High: 0x18191A1B
|
|
|
|
# CHECK-NEXT: File Version Low: 0x1C1D1E1F
|
MinidumpYAML: Add support for ModuleList stream
Summary:
This patch adds support for yaml (de)serialization of the minidump
ModuleList stream. It's a fairly straight forward-application of the
existing patterns to the ModuleList structures defined in previous
patches.
One thing, which may be interesting to call out explicitly is the
addition of "new" allocation functions to the helper BlobAllocator
class. The reason for this was, that there was an emerging pattern of a
need to allocate space for entities, which do not have a suitable
lifetime for use with the existing allocation functions. A typical
example of that was the "size" of various lists, which is only available
as a temporary returned by the .size() method of some container. For
these cases, one can use the new set of allocation functions, which
will take a temporary object, and store it in an allocator-managed
buffer until it is written to disk.
Reviewers: amccarth, jhenderson, clayborg, zturner
Subscribers: lldb-commits, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D60405
llvm-svn: 358672
2019-04-18 22:57:31 +08:00
|
|
|
# CHECK-NEXT: Product Version High: 0x20212223
|
2019-05-09 23:13:53 +08:00
|
|
|
# CHECK-NEXT: Product Version Low: 0x24252627
|
|
|
|
# CHECK-NEXT: File Flags Mask: 0x28292A2B
|
|
|
|
# CHECK-NEXT: File Flags: 0x2C2D2E2F
|
|
|
|
# CHECK-NEXT: File OS: 0x30313233
|
|
|
|
# CHECK-NEXT: File Type: 0x34353637
|
|
|
|
# CHECK-NEXT: File Subtype: 0x38393A3B
|
|
|
|
# CHECK-NEXT: File Date High: 0x3C3D3E3F
|
|
|
|
# CHECK-NEXT: File Date Low: 0x40414243
|
MinidumpYAML: Add support for ModuleList stream
Summary:
This patch adds support for yaml (de)serialization of the minidump
ModuleList stream. It's a fairly straight forward-application of the
existing patterns to the ModuleList structures defined in previous
patches.
One thing, which may be interesting to call out explicitly is the
addition of "new" allocation functions to the helper BlobAllocator
class. The reason for this was, that there was an emerging pattern of a
need to allocate space for entities, which do not have a suitable
lifetime for use with the existing allocation functions. A typical
example of that was the "size" of various lists, which is only available
as a temporary returned by the .size() method of some container. For
these cases, one can use the new set of allocation functions, which
will take a temporary object, and store it in an allocator-managed
buffer until it is written to disk.
Reviewers: amccarth, jhenderson, clayborg, zturner
Subscribers: lldb-commits, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D60405
llvm-svn: 358672
2019-04-18 22:57:31 +08:00
|
|
|
# CHECK-NEXT: CodeView Record: '44454647'
|
|
|
|
# CHECK-NEXT: Misc Record: 48494A4B
|
|
|
|
# CHECK-NEXT: - Base of Image: 0x4C4D4E4F50515253
|
|
|
|
# CHECK-NEXT: Size of Image: 0x54555657
|
|
|
|
# CHECK-NEXT: Module Name: libb.so
|
|
|
|
# CHECK-NEXT: CodeView Record: 58595A5B
|
2019-05-09 23:13:53 +08:00
|
|
|
# CHECK-NEXT: - Type: ThreadList
|
|
|
|
# CHECK-NEXT: Threads:
|
2019-05-16 23:17:30 +08:00
|
|
|
# CHECK-NEXT: - Thread Id: 0x5C5D5E5F
|
|
|
|
# CHECK-NEXT: Priority Class: 0x60616263
|
2019-05-09 23:13:53 +08:00
|
|
|
# CHECK-NEXT: Environment Block: 0x6465666768696A6B
|
2019-05-16 23:17:30 +08:00
|
|
|
# CHECK-NEXT: Context: 7C7D7E7F80818283
|
2019-05-09 23:13:53 +08:00
|
|
|
# CHECK-NEXT: Stack:
|
|
|
|
# CHECK-NEXT: Start of Memory Range: 0x6C6D6E6F70717273
|
2019-05-16 23:17:30 +08:00
|
|
|
# CHECK-NEXT: Content: 7475767778797A7B
|
|
|
|
# CHECK-NEXT: - Type: MemoryList
|
|
|
|
# CHECK-NEXT: Memory Ranges:
|
|
|
|
# CHECK-NEXT: - Start of Memory Range: 0x7C7D7E7F80818283
|
|
|
|
# CHECK-NEXT: Content: '8485868788'
|
2019-04-02 19:58:37 +08:00
|
|
|
# CHECK-NEXT: ...
|