* [musl] [RFC PATCH 1/1] arm: Add CFA annotations to __syscall_cp_asm.
@ 2025-03-12 15:41 Ignacy Gawędzki
0 siblings, 0 replies; only message in thread
From: Ignacy Gawędzki @ 2025-03-12 15:41 UTC (permalink / raw)
To: musl
When debugging a process that is currently in __syscall_cp_asm, GDB
loses track of the current frame once it passes __cp_begin. At that
moment, the frame is at $sp + 16, and it seems GDB is unable to infer
that without proper support.
A remedy is to add CFI annotations to that part of code, to tell that
the frame starts at $ip, right after $sp has been saved to $ip.
Signed-off-by: Ignacy Gawędzki <ignacy.gawedzki@green-communications.fr>
---
src/thread/arm/syscall_cp.s | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/thread/arm/syscall_cp.s b/src/thread/arm/syscall_cp.s
index e607dd42..f5b9521e 100644
--- a/src/thread/arm/syscall_cp.s
+++ b/src/thread/arm/syscall_cp.s
@@ -10,7 +10,9 @@
.hidden __syscall_cp_asm
.type __syscall_cp_asm,%function
__syscall_cp_asm:
+ .cfi_startproc
mov ip,sp
+ .cfi_def_cfa_register ip
stmfd sp!,{r4,r5,r6,r7}
__cp_begin:
ldr r0,[r0]
@@ -27,3 +29,4 @@ __cp_end:
__cp_cancel:
ldmfd sp!,{r4,r5,r6,r7}
b __cancel
+ .cfi_endproc
--
2.45.2
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2025-03-12 15:54 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-03-12 15:41 [musl] [RFC PATCH 1/1] arm: Add CFA annotations to __syscall_cp_asm Ignacy Gawędzki
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/musl/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).