Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gdbinit file and helpers v2 #486

Merged
merged 4 commits into from
May 11, 2023
Merged

Conversation

guillep
Copy link
Member

@guillep guillep commented Oct 10, 2022

Redo of #475

This pull request adds a .gdbinit file that can be copied at ~/.gdbinit to get common debugging functions and shortcuts for the Pharo VM. The list of all user-defined functions can be accessed in gdb with help user-defined and documentation for a specific function with help function_name.

Printing:

Command Arguments Description
ptt - Print trampoline table
pf frame address Print frame info
pcog cog method address Print cog method info
pcogs - Print all cogged methods
pct cog method type Print all cog methods of a given type
pcp primitive index Print all cog methods using a given primitive
pcm compiled method address Print all cog methods of a given method
pcs selector address Print all cog methods for a given selector

Locating and Disassembling

Command Arguments Description
whereis address Locates the enclosing cog method or trampoline
dt trampoline address Disassemble the given trampoline
dc cog method address (optional length) Disassemble the cog method (splits metadata/checks/method body) up to a given length if provided (all method otherwise)
dnc cog method address (optional length) Disassemble the cog method (starting at the method body) up to a given length if provided (all method otherwise)

The original merge failed because it was making the build fail (not compile) due the missing printStringOf.

@tesonep tesonep changed the base branch from pharoX to pharo-10 December 16, 2022 09:28
Copy link
Collaborator

@PalumboN PalumboN left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤩

@guillep
Copy link
Member Author

guillep commented May 11, 2023

Tests are green!
Thanks @QDucasse !

@guillep guillep merged commit 5ba290a into pharo-10 May 11, 2023
@guillep guillep deleted the revert-485-revert-475-feature/gdbinit branch May 11, 2023 13:20
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.

2 participants