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

[tools] Enable symbolic debugging with -maout-symtab compiler option #1519

Merged
merged 3 commits into from
Jan 18, 2023
Merged

[tools] Enable symbolic debugging with -maout-symtab compiler option #1519

merged 3 commits into from
Jan 18, 2023

Conversation

ghaerr
Copy link
Owner

@ghaerr ghaerr commented Jan 17, 2023

Combined with compiler enhancement in tkchia/gcc-ia16#133, allows using -maout-symtab option to include program symbol table in ELKS binary without having to run elf2elks separately. This will soon allow for automatic symbolic debugging and tracing to be used in every ELKS executable desired.

Adds weak symbol support to symbol tables.

Adds optional program tracing to basic for sample display (use basic --ftrace after modifying elkscmd/basic/Makefile).
Running symbolic kernel disassembly by running cd elkscmd/debug; make, then ./disasm -k 2d0:0 in ELKS.

Screenshot of basic showing symbolic function tracing and stack usage (timing info coming shortly):
Screen Shot 2023-01-17 at 1 24 22 PM

Symbolic disassembly of running ELKS kernel using ./disasm -k 2d0:0#512 | more:
Screen Shot 2023-01-17 at 1 23 51 PM

Function call backtrace using elkscmd/debug/testsym demonstration executable:
Screen Shot 2023-01-17 at 1 26 51 PM

Will require updated toolchain with new commit number, coming shortly.

@ghaerr ghaerr merged commit 4cc334b into ghaerr:master Jan 18, 2023
@ghaerr ghaerr deleted the inst4 branch January 18, 2023 21:10
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