Skip to content

Conversation

@procdump
Copy link

@procdump procdump commented Oct 14, 2025

This PR introduces a mechanism (popped up as necessary here - anza-xyz/agave#8407 (comment)) to identify which Solana program is being debugged by:

  • Printing the SHA256 hash of the pre-load executable before the debugger starts listening on the debug port.
  • Adding a custom LLDB monitor command to query this hash directly:
    solana-lldb> process plugin packet monitor executable_pre_load_sha256
  • If VM_DEBUG_EXEC_INFO_FILE is set the hash is saved in the supplied file - this is particularly useful if willing to automate the debugging process from IDEs.

These changes make it easier for users to verify which Solana program is about to be debugged and perform any necessary target setup in solana-lldb prior to invoking gdb-remote (target must be known before connecting to the remote end). With this PR it is now possible since the hash is displayed early in the debugging session via a message printed to stderr. The hash can also be retrieved at any time through the custom monitor command.

- prints the sha256 of the pre-load executable prior to starting the debugger
- adds a custom monitor command to get sha256 of the pre-load executable.
solana-lldb> process plugin packet monitor executable_pre_load_sha256
@procdump procdump marked this pull request as ready for review October 14, 2025 14:53
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.

1 participant