https://github.com/DavidSpickett commented:

I should have said this before you wrote out all these tests, so apologies for 
this up front, but - 

There's no reason these tests need to be native, host only, tests. Cross 
compiling them is not a problem. So I'd like to see these as API tests instead, 
using Python. The nice thing about that is you can merge a lot of it into one 
file.

I think it makes sense to add a LoongArch folder next to the AArch64 one in 
test/API/linux, and write a test like: 
https://github.com/llvm/llvm-project/tree/main/lldb/test/API/linux/aarch64/tls_registers

You can then have one program file with functions to write in each of the ways 
you need. You will have to pass some argument to the program to tell it what to 
do, as calling these functions via expressions will not change anything because 
lldb will ("helpfully" :) ) restore these registers afterwards.

You can also set breakpoints wherever you want, without having to manually skip 
breakpoints already in the code.

You can add something like `isAArch64SME` to look for the CPU features you need 
in /proc/cpuinfo, same thing for skipping if it's not LoongArch.

The program code and the values you check for are fine as is, the setup just 
needs to be a bit more flexible.

https://github.com/llvm/llvm-project/pull/120664
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to