Open
Conversation
… of RAM at compile time.
…f, and remove CopyRom as it's not really needed.
…moved mdebug from the custom ld as it causes recent GDB versions to outright crash, and they're only generated by IDO, which we can't debug anyways. Also, I fixed the header calculation for how much code to load.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
So I managed to get DKR to work with GDB debugging in Ares. This is actually pretty cool. I haven't fully explored it, but it does work, and allows for some pretty cool debugging capabilities with breakpoints, variable inspections, stepping through the code line by line, and more. A screenshot from VS Code is below that shows how it can work.
The main changes here that I did was changing the mod ld file to keep all debugging sections instead of discarding them, I stole this from a project from Angelo's N64 stuff, so I haven't vetted if this is overkill or not, but it does seem to work.
I also needed to make some small changes to enable a new DEBUG=1 option for the makefile where I can compile the files with -O0, and -g, which seems to help with getting line numbers in the elf file, and making it easier to do single line stepping with gdb. There were issues with a handful of files that for some reason just don't work when compiled with -O0 but do work with -Os, so I had to devise a workaround for those files until we can figure out what's wrong.