#
208a08c3 |
| 01-Jul-2024 |
David Spickett <david.spickett@linaro.org> |
Reland "[lldb] Parse and display register field enums" (#97258)" (#97270)
This reverts commit d9e659c538516036e40330b6a98160cbda4ff100.
I could not reproduce the Mac OS ASAN failure locally but I
Reland "[lldb] Parse and display register field enums" (#97258)" (#97270)
This reverts commit d9e659c538516036e40330b6a98160cbda4ff100.
I could not reproduce the Mac OS ASAN failure locally but I narrowed it
down to the test `test_many_fields_same_enum`. This test shares an enum
between x0, which is 64 bit, and cpsr, which is 32 bit.
My theory is that when it does `register read x0`, an enum type is
created where the undlerying enumerators are 64 bit, matching the
register size.
Then it does `register read cpsr` which used the cached enum type, but
this register is 32 bit. This caused lldb to try to read an 8 byte value
out of a 4 byte allocation:
READ of size 8 at 0x60200014b874 thread T0
<...>
=>0x60200014b800: fa fa fd fa fa fa fd fa fa fa fd fa fa fa[04]fa
To fix this I've added the register's size in bytes to the constructed
enum type's name. This means that x0 uses:
__lldb_register_fields_enum_some_enum_8
And cpsr uses:
__lldb_register_fields_enum_some_enum_4
If any other registers use this enum and are read, they will use the
cached type as long as their size matches, otherwise we make a new type.
show more ...
|
#
d9e659c5 |
| 01-Jul-2024 |
David Spickett <david.spickett@linaro.org> |
Revert "[lldb] Parse and display register field enums" (#97258)
Reverts llvm/llvm-project#95768 due to a test failure on macOS with
ASAN:
https://green.lab.llvm.org/job/llvm.org/view/LLDB/job/ll
Revert "[lldb] Parse and display register field enums" (#97258)
Reverts llvm/llvm-project#95768 due to a test failure on macOS with
ASAN:
https://green.lab.llvm.org/job/llvm.org/view/LLDB/job/lldb-cmake-sanitized/425/console
show more ...
|
#
ba60d8a1 |
| 27-Jun-2024 |
David Spickett <david.spickett@linaro.org> |
[lldb] Parse and display register field enums (#95768)
This teaches lldb to parse the enum XML elements sent by lldb-server,
and make use of the information in `register read` and `register info`.
[lldb] Parse and display register field enums (#95768)
This teaches lldb to parse the enum XML elements sent by lldb-server,
and make use of the information in `register read` and `register info`.
The format is described in
https://sourceware.org/gdb/current/onlinedocs/gdb.html/Enum-Target-Types.html.
The target XML parser will drop any invalid enum or evalue. If we find
multiple evalue for the same value, we will use the last one we find.
The order of evalues from the XML is preserved as there may be good
reason they are not in numerical order.
show more ...
|
Revision tags: llvmorg-18.1.8, llvmorg-18.1.7, llvmorg-18.1.6, llvmorg-18.1.5, llvmorg-18.1.4, llvmorg-18.1.3, llvmorg-18.1.2, llvmorg-18.1.1, llvmorg-18.1.0, llvmorg-18.1.0-rc4, llvmorg-18.1.0-rc3, llvmorg-18.1.0-rc2, llvmorg-18.1.0-rc1, llvmorg-19-init, llvmorg-17.0.6, llvmorg-17.0.5, llvmorg-17.0.4, llvmorg-17.0.3, llvmorg-17.0.2, llvmorg-17.0.1, llvmorg-17.0.0, llvmorg-17.0.0-rc4, llvmorg-17.0.0-rc3, llvmorg-17.0.0-rc2, llvmorg-17.0.0-rc1, llvmorg-18-init, llvmorg-16.0.6 |
|
#
bcfe5a52 |
| 05-Jun-2023 |
David Spickett <david.spickett@linaro.org> |
[lldb] Add register field tables to the "register info" command
This teaches DumpRegisterInfo to generate a table from the register flags type. It just calls a method on RegisterFlags.
As such, the
[lldb] Add register field tables to the "register info" command
This teaches DumpRegisterInfo to generate a table from the register flags type. It just calls a method on RegisterFlags.
As such, the extra tests are minimal and only show that the intergration works. Exhaustive formatting tests are done with RegisterFlags itself.
Example: ``` (lldb) register info cpsr Name: cpsr Size: 4 bytes (32 bits) In sets: general (index 0)
| 31 | 30 | 29 | 28 | 27-26 | 25 | 24 | 23 | 22 | 21 | 20 | 19-13 | 12 | 11-10 | 9 | 8 | 7 | 6 | 5 | 4 | 3-2 | 1 | 0 | |----|----|----|----|-------|-----|-----|-----|-----|----|----|-------|------|-------|---|---|---|---|---|-----|-----|---|----| | N | Z | C | V | | TCO | DIT | UAO | PAN | SS | IL | | SSBS | | D | A | I | F | | nRW | EL | | SP | ```
LLDB limits the max terminal width to 80 chars by default. So to get that full width output you will need to change the "term-width" setting to something higher.
Reviewed By: jasonmolenda
Differential Revision: https://reviews.llvm.org/D152918
show more ...
|
Revision tags: llvmorg-16.0.5, llvmorg-16.0.4, llvmorg-16.0.3, llvmorg-16.0.2, llvmorg-16.0.1, llvmorg-16.0.0, llvmorg-16.0.0-rc4 |
|
#
ba85f206 |
| 01-Mar-2023 |
David Spickett <david.spickett@linaro.org> |
[lldb] Add "register info" command
This adds a new command that will show all the information lldb knows about a register. ``` (lldb) register info s0 Name: s0 Size: 4 bytes (32 bits)
[lldb] Add "register info" command
This adds a new command that will show all the information lldb knows about a register. ``` (lldb) register info s0 Name: s0 Size: 4 bytes (32 bits) Invalidates: v0, d0 Read from: v0 In sets: Floating Point Registers (index 1) ```
Currently it only allows a single register, and we get the information from the RegisterInfo structure.
For those of us who know the architecture well, this information is all pretty obvious. For those who don't, it's nice to have it at a glance without leaving the debugger.
I hope to have more in depth information to show here in the future, which will be of wider use.
Reviewed By: jasonmolenda
Differential Revision: https://reviews.llvm.org/D152916
show more ...
|