Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* GDB-JIT: why would my 'unwind' not be invoked on crash?
@ 2025-11-11 21:43 K via Gdb
  2025-11-11 21:26 ` Tom Tromey
  0 siblings, 1 reply; 5+ messages in thread
From: K via Gdb @ 2025-11-11 21:43 UTC (permalink / raw)
  To: gdb

I implemented this for the x86-64 build of my ocaml program and it works
fine.
I'm now working on a aarch64 version - the symtable/line and serde code is
the same, and I'm looking to complete the unwind functionality by
disovering how to obtain the PC (not in a general register). However, after
arranging for a segfault
the unwind function is not being invoked at first and I get 2 backtrace
listings
with appropriate function name and line numbers, and only then does gdb
decide to call my unwind function and it does so with garbage data.
This is understandable to the extent gdb doesn't know the ocaml stack usage.
But if that's true, why would it proceed to generate 2 lines of backtrace
before
consulting my unwinder to gather the correct data?
My expectation is it would consult my unwinder immediately.

By the way, there is no frame pointing register used in the ocaml compiler
I'm using.

Any insights appreciated!

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2025-11-14  4:35 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-11-11 21:43 GDB-JIT: why would my 'unwind' not be invoked on crash? K via Gdb
2025-11-11 21:26 ` Tom Tromey
2025-11-12  2:00   ` K via Gdb
2025-11-12 15:50     ` Simon Marchi via Gdb
2025-11-14  6:33       ` K via Gdb

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox