Use break 0x5 for LoongArch software breakpoint traps.
The magic number 0x5 means BRK_SSTEPBP as defined in
the kernel header asm/break.h on LoongArch.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
I think eventually the upstream Linux would gain support for hardware single-stepping, before the architecture is widely adopted (to be frank, if at all), so it's probably not necessary to mention this point in the commit message. Focus on the code changes being made right here.
Also the commit message is a bit unnatural (the English "take" feels very different than Chinese "取" in this context). Let me tweak it a little bit and please check if it's still conveying the message you intended.
lldb/source/Host/common/NativeProcessProtocol.cpp | ||
---|---|---|
510 | This is not a plain break, but rather break 0x5 or break BRK_SSTEPBP as the constant/magic 5 comes from Linux/LoongArch asm/break.h. Better reflect this in the comment. | |
lldb/source/Target/Platform.cpp | ||
1945 | Same here. |
You removed the formatting in the commit message and added an extra space in front of the patch title, all fixed for you.
The changes look good LoongArch-wise now. Thanks!
This is not a plain break, but rather break 0x5 or break BRK_SSTEPBP as the constant/magic 5 comes from Linux/LoongArch asm/break.h. Better reflect this in the comment.