[all-commits] [llvm/llvm-project] a4d427: [lldb] [scripting bridge] 167388 chore: add api to...
n2h9 via All-commits
all-commits at lists.llvm.org
Wed Nov 26 11:36:42 PST 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: a4d42775b9af0d961f71934e38342a9384534022
https://github.com/llvm/llvm-project/commit/a4d42775b9af0d961f71934e38342a9384534022
Author: n2h9 <13541181+n2h9 at users.noreply.github.com>
Date: 2025-11-26 (Wed, 26 Nov 2025)
Changed paths:
M lldb/bindings/interface/SBTargetExtensions.i
M lldb/examples/python/templates/scripted_process.py
M lldb/include/lldb/API/SBTarget.h
M lldb/source/API/SBTarget.cpp
M lldb/test/API/python_api/target/TestTargetAPI.py
Log Message:
-----------
[lldb] [scripting bridge] 167388 chore: add api to return arch name for target (#168273)
This pr fixes #167388 .
## Description
This pr adds new method `GetArchName` to `SBTarget` so that no need to
parse triple to get arch name in client code.
## Testing
### All from `TestTargetAPI.py`
run test with
```
./build/bin/lldb-dotest -v -p TestTargetAPI.py
```
<details>
<summary>existing tests (without newly added)</summary>
<img width="1425" height="804" alt="image"
src="https://github.com/user-attachments/assets/617e4c69-5c6b-44c4-9aeb-b751a47e253c"
/>
</details>
<details>
<summary>existing tests (with newly added)</summary>
<img width="1422" height="778" alt="image"
src="https://github.com/user-attachments/assets/746990a1-df88-4348-a090-224963d3c640"
/>
</details>
### Only `test_get_arch_name`
run test with
```
./build/bin/lldb-dotest -v -p TestTargetAPI.py -f test_get_arch_name_dwarf -f test_get_arch_name_dwo -f test_get_arch_name_dsym lldb/test/API/python_api/target
```
<details>
<summary>only newly added</summary>
<img width="1422" height="778" alt="image"
src="https://github.com/user-attachments/assets/fcaafa5d-2622-4171-acee-e104ecee0652"
/>
</details>
---------
Signed-off-by: Nikita B <n2h9z4 at gmail.com>
Co-authored-by: Jonas Devlieghere <jonas at devlieghere.com>
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list