On Thu, 15 Oct 2026 14:49:45 GMT, Dingli Zhang <[email protected]> wrote:
>> Thanks, pushed. > > Thanks! The helper's own return address is correct now, but the walk still > stops at the helper's caller, whether or not the helper has executed `sd ra`. > The caller frame is created with `ra == null`, and at PC-1 (the `call t0, > __riscv_save_N` at its entry) its CFI has no rule for x1 yet, so > `getSenderPC()` returns null. The caller's return address is in the helper's > x1 slot (CFA - 8) once `sd ra` has executed, and only in the live x1 before > that. > > For reference, in #33025 I handled this in > [`sender()`](https://github.com/openjdk/jdk/blob/9afa204c5b0f6c06a50bc5ead60ca091a30b1c9b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/debugger/linux/riscv64/LinuxRISCV64CFrame.java#L244-L261): > when the current frame's return column differs from the sender's and the > sender's return address has no rule, the current frame's CFI is used to find > the sender's return column, falling back to the live x1 captured in > [`getFrameFromReg()`](https://github.com/openjdk/jdk/blob/9afa204c5b0f6c06a50bc5ead60ca091a30b1c9b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/debugger/linux/riscv64/LinuxRISCV64CFrame.java#L91). Your point is absolutely correct; it took me some time to fully grasp it. I have now re-pushed. Since I’ve gone through your code, I was wondering if I could add you as a co-author? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/33374#discussion_r4293097189
