Skip to content

Add new tool: Callstack Analyzer - #121

Open
BenCrafterRED wants to merge 3 commits into
rarsm:masterfrom
BenCrafterRED:master
Open

Add new tool: Callstack Analyzer#121
BenCrafterRED wants to merge 3 commits into
rarsm:masterfrom
BenCrafterRED:master

Conversation

@BenCrafterRED

Copy link
Copy Markdown

I developed a tool to help analyze the call stack of a running program inside RARS at the Univerity of Applied Sciences Zwickau. The intent is that this tool may be used by others to help explain and understand the call stack.

Features

  • Choose between different strategies used to recognize different stack frames.
  • Compare the results of different strategies.
  • Live log of all events regarding call, return, and stack access.
  • Dynamic stack diagram including:
    • Visual stack pointer and frame pointer
    • Name of the called symbol corresponding to a frame.
    • Resolution of return addresses to symbol names

Screenshot

Screenshot_20260121_115455

NOTE: I have used Java 21 and the rest of the code worked just fine. If this were a problem, I could rewrite the Callstack Analyzer to use Java 11 only. However, I would prefer to use Java 21 as this would involve quite a bit additional work.

@ladyslipper-glade

ladyslipper-glade commented Jan 27, 2026

Copy link
Copy Markdown

To what extent would changing to Java 21 cause hardship for the user community, some of whom might be "stuck" on an older version of Java for reasons outside their control? I don't have an answer to this question. Personally, I think moving to Java 21 sounds fine, but I can appreciate how it might be problematic.

@BenCrafterRED

Copy link
Copy Markdown
Author

I just wanted to check if there is current interest in the inclusion of this tool. In case there are still adjustments to be done, I am happy to work on that.

@Shin-703

Copy link
Copy Markdown

Hello! Yes there is interest, the tool would be a nice addition I think. We are in discussion to update the version of Java.

For this PR, I get a lot of AddressErrorException :
address_error

Also, even when we disconnect the tool from the program after activating it once, it does not actually disconnect and continues running and slowing down everything.

@BenCrafterRED

Copy link
Copy Markdown
Author

I'm happy there is interest in this tool.

For this PR, I get a lot of AddressErrorException :

I checked this with lw t0, 0xfffffff9 on the latest commit on master (814d573) and got the same exception. This seems to be part of RARS' RISC-V implementation rather than introduced by this PR. As far as I know, RISC-V allows implementations to not support unaligned memory access.

Also, even when we disconnect the tool from the program after activating it once, it does not actually disconnect and continues running and slowing down everything.

Thank you for pointing this out. I've fixed this now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants