Revision tags: llvmorg-21-init, llvmorg-19.1.7, llvmorg-19.1.6, llvmorg-19.1.5, llvmorg-19.1.4, llvmorg-19.1.3, llvmorg-19.1.2 |
|
#
8789c966 |
| 02-Oct-2024 |
Adrian Prantl <aprantl@apple.com> |
[lldb] Unify implementation of CommandReturnObject::SetError(NFC) (#110707)
This is a cleanup that moves the API towards value semantics.
|
Revision tags: llvmorg-19.1.1, llvmorg-19.1.0 |
|
#
a0dd90eb |
| 05-Sep-2024 |
Adrian Prantl <aprantl@apple.com> |
[lldb] Make conversions from llvm::Error explicit with Status::FromEr… (#107163)
…ror() [NFC]
|
Revision tags: llvmorg-19.1.0-rc4, llvmorg-19.1.0-rc3, llvmorg-19.1.0-rc2, llvmorg-19.1.0-rc1, llvmorg-20-init, 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 |
|
#
92d8a28c |
| 30-Oct-2023 |
Pete Lawrence <plawrence@apple.com> |
[lldb] Part 2 of 2 - Refactor `CommandObject::DoExecute(...)` return `void` (not `bool`) (#69991)
[lldb] Part 2 of 2 - Refactor `CommandObject::DoExecute(...)` to return
`void` instead of ~~`bool`~
[lldb] Part 2 of 2 - Refactor `CommandObject::DoExecute(...)` return `void` (not `bool`) (#69991)
[lldb] Part 2 of 2 - Refactor `CommandObject::DoExecute(...)` to return
`void` instead of ~~`bool`~~
Justifications:
- The code doesn't ultimately apply the `true`/`false` return values.
- The methods already pass around a `CommandReturnObject`, typically
with a `result` parameter.
- Each command return object already contains:
- A more precise status
- The error code(s) that apply to that status
Part 1 refactors the `CommandObject::Execute(...)` method.
- See
[https://github.com/llvm/llvm-project/pull/69989](https://github.com/llvm/llvm-project/pull/69989)
rdar://117378957
show more ...
|
Revision tags: 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, 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, llvmorg-16.0.0-rc3, llvmorg-16.0.0-rc2, llvmorg-16.0.0-rc1, llvmorg-17-init, llvmorg-15.0.7, llvmorg-15.0.6, llvmorg-15.0.5, llvmorg-15.0.4 |
|
#
e6ec76c6 |
| 28-Oct-2022 |
David Spickett <david.spickett@linaro.org> |
[LLDB] Apply FixCodeAddress to all forms of address arguments
This is a follow up to https://reviews.llvm.org/D141629 and applies the change it made to all paths through ToAddress (now DoToAddress).
[LLDB] Apply FixCodeAddress to all forms of address arguments
This is a follow up to https://reviews.llvm.org/D141629 and applies the change it made to all paths through ToAddress (now DoToAddress).
I have included the test from my previous attempt https://reviews.llvm.org/D136938.
The initial change only applied fixing to addresses that would parse as integers, so my test case failed. Since ToAddress has multiple exit points, I've wrapped it into a new method DoToAddress.
Now you can call ToAddress, it will call DoToAddress and no matter what path you take, the address will be fixed.
For the memory tagging commands we actually want the full address (to work out mismatches). So I added ToRawAddress for that.
I have tested this on a QEMU AArch64 Linux system with Memory Tagging, Pointer Authentication and Top Byte Ignore enabled. By running the new test and all other tests in API/linux/aarch64.
Some commands have had calls to the ABI plugin removed as ToAddress now does this for them.
The "memory region" command still needs to use the ABI plugin to detect the end of memory when there are non-address bits.
Reviewed By: jasonmolenda
Differential Revision: https://reviews.llvm.org/D142715
show more ...
|
#
984b800a |
| 09-Jan-2023 |
serge-sans-paille <sguelton@mozilla.com> |
Move from llvm::makeArrayRef to ArrayRef deduction guides - last part
This is a follow-up to https://reviews.llvm.org/D140896, split into several parts as it touches a lot of files.
Differential Re
Move from llvm::makeArrayRef to ArrayRef deduction guides - last part
This is a follow-up to https://reviews.llvm.org/D140896, split into several parts as it touches a lot of files.
Differential Revision: https://reviews.llvm.org/D141298
show more ...
|
Revision tags: llvmorg-15.0.3, working, llvmorg-15.0.2, llvmorg-15.0.1, llvmorg-15.0.0, llvmorg-15.0.0-rc3, llvmorg-15.0.0-rc2, llvmorg-15.0.0-rc1, llvmorg-16-init |
|
#
7ced9fff |
| 14-Jul-2022 |
Jonas Devlieghere <jonas@devlieghere.com> |
[lldb] Refactor command option enum values (NFC)
Refactor the command option enum values and the command argument table to connect the two. This has two benefits:
- We guarantee that two options t
[lldb] Refactor command option enum values (NFC)
Refactor the command option enum values and the command argument table to connect the two. This has two benefits:
- We guarantee that two options that use the same argument type have the same accepted values. - We can print the enum values and their description in the help output. (D129707)
Differential revision: https://reviews.llvm.org/D129703
show more ...
|
Revision tags: llvmorg-14.0.6, llvmorg-14.0.5, llvmorg-14.0.4, llvmorg-14.0.3, llvmorg-14.0.2, llvmorg-14.0.1 |
|
#
24f9a2f5 |
| 31-Mar-2022 |
Shafik Yaghmour <syaghmour@apple.com> |
[LLDB] Applying clang-tidy modernize-use-equals-default over LLDB
Applied modernize-use-equals-default clang-tidy check over LLDB.
This check is already present in the lldb/.clang-tidy config.
Dif
[LLDB] Applying clang-tidy modernize-use-equals-default over LLDB
Applied modernize-use-equals-default clang-tidy check over LLDB.
This check is already present in the lldb/.clang-tidy config.
Differential Revision: https://reviews.llvm.org/D121844
show more ...
|
#
28c878ae |
| 14-Mar-2022 |
Shafik Yaghmour <syaghmour@apple.com> |
[LLDB] Applying clang-tidy modernize-use-default-member-init over LLDB
Applied modernize-use-default-member-init clang-tidy check over LLDB. It appears in many files we had already switched to in cl
[LLDB] Applying clang-tidy modernize-use-default-member-init over LLDB
Applied modernize-use-default-member-init clang-tidy check over LLDB. It appears in many files we had already switched to in class member init but never updated the constructors to reflect that. This check is already present in the lldb/.clang-tidy config.
Differential Revision: https://reviews.llvm.org/D121481
show more ...
|
Revision tags: llvmorg-14.0.0, llvmorg-14.0.0-rc4, llvmorg-14.0.0-rc3, llvmorg-14.0.0-rc2, llvmorg-14.0.0-rc1, llvmorg-15-init |
|
#
abb0ed44 |
| 23-Jan-2022 |
Kazu Hirata <kazu@google.com> |
[Commands] Remove redundant member initialization (NFC)
Identified with readability-redundant-member-init.
|
Revision tags: llvmorg-13.0.1, llvmorg-13.0.1-rc3, llvmorg-13.0.1-rc2 |
|
#
787f91b0 |
| 12-Jan-2022 |
David Spickett <david.spickett@linaro.org> |
[lldb] Remove non-address bits from addresses given to memory tag commands
Although the memory tag commands use a memory tag manager to handle addresses, that only removes the top byte.
That top by
[lldb] Remove non-address bits from addresses given to memory tag commands
Although the memory tag commands use a memory tag manager to handle addresses, that only removes the top byte.
That top byte is 4 bits of memory tag and 4 free bits, which is more than it should strictly remove but that's how it is for now.
There are other non-address bit uses like pointer authentication. To ensure the memory tag manager only has to deal with memory tags, use the ABI plugin to remove the rest.
The tag access test has been updated to sign all the relevant pointers and require that we're running on a system with pointer authentication in addition to memory tagging.
The pointers will look like: <4 bit user tag><4 bit memory tag><signature><bit virtual address>
Note that there is currently no API for reading memory tags. It will also have to consider this when it arrives.
Reviewed By: omjavaid
Differential Revision: https://reviews.llvm.org/D117672
show more ...
|
Revision tags: llvmorg-13.0.1-rc1, llvmorg-13.0.0, llvmorg-13.0.0-rc4, llvmorg-13.0.0-rc3, llvmorg-13.0.0-rc2, llvmorg-13.0.0-rc1, llvmorg-14-init, llvmorg-12.0.1, llvmorg-12.0.1-rc4, llvmorg-12.0.1-rc3, llvmorg-12.0.1-rc2, llvmorg-12.0.1-rc1 |
|
#
98b5659b |
| 12-Apr-2021 |
David Spickett <david.spickett@linaro.org> |
[lldb][AArch64] Mark mismatched tags in tag read output
The "memory tag read" command will now tell you when the allocation tag read does not match the logical tag.
(lldb) memory tag read mte_buf+(
[lldb][AArch64] Mark mismatched tags in tag read output
The "memory tag read" command will now tell you when the allocation tag read does not match the logical tag.
(lldb) memory tag read mte_buf+(8*16) mte_buf+(8*16)+48 Logical tag: 0x9 Allocation tags: [0xfffff7ff7080, 0xfffff7ff7090): 0x8 (mismatch) [0xfffff7ff7090, 0xfffff7ff70a0): 0x9 [0xfffff7ff70a0, 0xfffff7ff70b0): 0xa (mismatch)
The logical tag will be taken from the start address so the end could have a different tag. You could for example read from ptr_to_array_1 to ptr_to_array_2. Where the latter is tagged differently to prevent buffer overflow.
The existing command will read 1 granule if you leave off the end address. So you can also use it as a quick way to check a single location.
(lldb) memory tag read mte_buf Logical tag: 0x9 Allocation tags: [0xfffff7ff7000, 0xfffff7ff7010): 0x0 (mismatch)
This avoids the need for a seperate "memory tag check" command.
Reviewed By: omjavaid
Differential Revision: https://reviews.llvm.org/D106880
show more ...
|
Revision tags: llvmorg-12.0.0, llvmorg-12.0.0-rc5, llvmorg-12.0.0-rc4 |
|
#
6eded00e |
| 30-Mar-2021 |
David Spickett <david.spickett@linaro.org> |
[lldb] Add "memory tag write" --end-addr option
The default mode of "memory tag write" is to calculate the range from the start address and the number of tags given. (just like "memory write" does)
[lldb] Add "memory tag write" --end-addr option
The default mode of "memory tag write" is to calculate the range from the start address and the number of tags given. (just like "memory write" does)
(lldb) memory tag write mte_buf 1 2 (lldb) memory tag read mte_buf mte_buf+48 Logical tag: 0x0 Allocation tags: [0xfffff7ff9000, 0xfffff7ff9010): 0x1 [0xfffff7ff9010, 0xfffff7ff9020): 0x2 [0xfffff7ff9020, 0xfffff7ff9030): 0x0
This new option allows you to set an end address and have the tags repeat until that point.
(lldb) memory tag write mte_buf 1 2 --end-addr mte_buf+64 (lldb) memory tag read mte_buf mte_buf+80 Logical tag: 0x0 Allocation tags: [0xfffff7ff9000, 0xfffff7ff9010): 0x1 [0xfffff7ff9010, 0xfffff7ff9020): 0x2 [0xfffff7ff9020, 0xfffff7ff9030): 0x1 [0xfffff7ff9030, 0xfffff7ff9040): 0x2 [0xfffff7ff9040, 0xfffff7ff9050): 0x0
This is implemented using the QMemTags packet previously added. We skip validating the number of tags in lldb and send them on to lldb-server, which repeats them as needed.
Apart from the number of tags, all the other client side checks remain. Tag values, memory range must be tagged, etc.
Reviewed By: omjavaid
Differential Revision: https://reviews.llvm.org/D105183
show more ...
|
#
6a7a2ee8 |
| 31-Mar-2021 |
David Spickett <david.spickett@linaro.org> |
[lldb] Add "memory tag write" command
This adds a new command for writing memory tags. It is based on the existing "memory write" command.
Syntax: memory tag write <address-expression> <value> [<va
[lldb] Add "memory tag write" command
This adds a new command for writing memory tags. It is based on the existing "memory write" command.
Syntax: memory tag write <address-expression> <value> [<value> [...]] (where "value" is a tag value)
(lldb) memory tag write mte_buf 1 2 (lldb) memory tag read mte_buf mte_buf+32 Logical tag: 0x0 Allocation tags: [0xfffff7ff9000, 0xfffff7ff9010): 0x1 [0xfffff7ff9010, 0xfffff7ff9020): 0x2
The range you are writing to will be calculated by aligning the address down to a granule boundary then adding as many granules as there are tags.
(a repeating mode with an end address will be in a follow up patch)
This is why "memory tag write" uses MakeTaggedRange but has some extra steps to get this specific behaviour.
The command does all the usual argument validation: * Address must evaluate * You must supply at least one tag value (though lldb-server would just treat that as a nop anyway) * Those tag values must be valid for your tagging scheme (e.g. for MTE the value must be > 0 and < 0xf) * The calculated range must be memory tagged
That last error will show you the final range, not just the start address you gave the command.
(lldb) memory tag write mte_buf_2+page_size-16 6 (lldb) memory tag write mte_buf_2+page_size-16 6 7 error: Address range 0xfffff7ffaff0:0xfffff7ffb010 is not in a memory tagged region
(note that we do not check if the region is writeable since lldb can write to it anyway)
The read and write tag tests have been merged into a single set of "tag access" tests as their test programs would have been almost identical. (also I have renamed some of the buffers to better show what each one is used for)
Reviewed By: omjavaid
Differential Revision: https://reviews.llvm.org/D105182
show more ...
|
#
d046fb62 |
| 08-Jul-2021 |
David Spickett <david.spickett@linaro.org> |
[lldb][AArch64] Refactor memory tag range handling
Previously GetMemoryTagManager checked many things in one: * architecture supports memory tagging * process supports memory tagging * memory range
[lldb][AArch64] Refactor memory tag range handling
Previously GetMemoryTagManager checked many things in one: * architecture supports memory tagging * process supports memory tagging * memory range isn't inverted * memory range is all tagged
Since writing follow up patches for tag writing (in review at the moment) it has become clear that this gets unwieldy once we add the features needed for that.
It also implies that the memory tag manager is tied to the range you used to request it with but it is not. It's a per process object.
Instead: * GetMemoryTagManager just checks architecture and process. * Then the MemoryTagManager can later be asked to check a memory range.
This is better because: * We don't imply that range and manager are tied together. * A slightly diferent range calculation for tag writing doesn't add more code to Process. * Range checking code can now be unit tested.
Reviewed By: omjavaid
Differential Revision: https://reviews.llvm.org/D105630
show more ...
|
Revision tags: llvmorg-12.0.0-rc3, llvmorg-12.0.0-rc2 |
|
#
31f9960c |
| 19-Feb-2021 |
David Spickett <david.spickett@linaro.org> |
[lldb][AArch64] Add "memory tag read" command
This new command looks much like "memory read" and mirrors its basic behaviour.
(lldb) memory tag read new_buf_ptr new_buf_ptr+32 Logical tag: 0x9 Allo
[lldb][AArch64] Add "memory tag read" command
This new command looks much like "memory read" and mirrors its basic behaviour.
(lldb) memory tag read new_buf_ptr new_buf_ptr+32 Logical tag: 0x9 Allocation tags: [0x900fffff7ffa000, 0x900fffff7ffa010): 0x9 [0x900fffff7ffa010, 0x900fffff7ffa020): 0x0
Important proprties: * The end address is optional and defaults to reading 1 tag if ommitted * It is an error to try to read tags if the architecture or process doesn't support it, or if the range asked for is not tagged. * It is an error to read an inverted range (end < begin) (logical tags are removed for this check so you can pass tagged addresses here) * The range will be expanded to fit the tagging granule, so you can get more tags than simply (end-begin)/granule size. Whatever you get back will always cover the original range.
Reviewed By: omjavaid
Differential Revision: https://reviews.llvm.org/D97285
show more ...
|