From: K via Gdb <gdb@sourceware.org>
To: gdb <gdb@sourceware.org>
Subject: GDB-JIT: why would my 'unwind' not be invoked on crash?
Date: Tue, 11 Nov 2025 22:43:45 +0100 [thread overview]
Message-ID: <CACTzTFCC64w0HdOxgExRuqN+372N2dRAEe_nG4ri11hJiT-2rA@mail.gmail.com> (raw)
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!
next reply other threads:[~2025-11-11 19:46 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-11 21:43 K via Gdb [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CACTzTFCC64w0HdOxgExRuqN+372N2dRAEe_nG4ri11hJiT-2rA@mail.gmail.com \
--to=gdb@sourceware.org \
--cc=cq.personal@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox