Debugger Enhancements v2#313
Conversation
Add a whole bunch of command Add Debugger in a window. Add INI file.
Load a font only once
|
Here is an example of the x16emu.ini file |
|
Ooh, I think I like this. I'm hoping it's accepted. |
Slighty enhanced disasm to fall on right line ... still not perfect
…wasn't finding the symbol) Fix the symbol eval to return not found instead of addr 0 when not found
Fix mouse coord display
Fix user symbol file loader to handle empty lines and lines commented out ";"
|
Are you looking for feedback on this? I decided to play around with it a bit (it's really cool), and I'm seeing some strange behavior that I'm not sure if it's just because I'm configuring something wrong. For one, there is no "x16emu.ini" supplied by default and the emulator seems to freeze if you try to open the debugger without it. So I had to copy your example one from above to even get to try it. I'm sure the plan is to add a default one to the repo at some point, but I just thought I'd point it out. Another strange behavior, the background color of the main debug window seems to always be black no matter what I set the bg_color under [dbg] to. The console background color seems to work though (set under [dbg_console]). From a little bit of poking and experimenting, it looks like if I disable drawing the console in DEBUGRenderDisplay, it uses the right color. Lastly, the highlighted row in the code area seems to stay statically in the middle when I use the mouse wheel to scroll in it, causing it to not highlight the actual PC row anymore. |
Fix in DebugInit to handle no ini file
|
@gaekwad ; window background colour
bg_color = 0xFF0000for a red background (RGB) [dbg]
enabled = yes
; font filepath used by the debugger
font = consolas10.bmp
; window background colour
bg_color = 0x404040-3- highlight pc fixed. |
Add command "load file addr" Fix symbol lookup to search either a symbol or an address Fix the disasm Bank to follow the current one depending of RAM or ROM Fix disasm to display symbol depending on the current bank (ROM/RAM) Disams: Change the label pos for a full line
Fix the load command
Add debugger settings var (romdebug flag to allow ROM modif, bp_on_brk to have BRK viewed as breakpoint)
Remove the keyboard shortcuts as they are replaced by buttons Allow to redefine keyboard bindings for the DBG
Fix the key bindings to handle the mods
Allow command "load" to load in main RAM, banked RAM and banked ROM Add key bindings for bank up/down on memory dump
|
Oh man, I just realized, because you moved literally every source file, you've made reconciling this PR with any other changelist completely impossible. |
|
@indigodarkwolf Not exactly ;) Upon closer look, you may see that nothing was moved but the debugger source. |
|
You misunderstand. Yes, the files were technically "moved". Git sees it as "the files were deleted", plus "a bunch of new files were added." Any attempt to reconcile changes from any other pull request will fail, and they must be re-done by hand. |
|
That’s why I told you the other PRs can be merged before. Then I’ll do a rebase and then the PR could be merge. |
|
hmmm .. don't take this the wrong way (I work on large scale projects with 10s of developers): PRs that mix functional with structural changes are effectively a maintainer's nightmare ... it is always easier on everyone when the 2 happen separately... same for the 'ini setup' ... a super great idea.. but should it not be its own separate PR? or even the enabling multi letter commands on the debugger? ... I know it is a pain ... (I am dealing with the same thing via all my memory management changes .. painful to keep them all as separate layered branched) I you allow me a small thought?! ... I would eliminate ini and replace it with JSON. this would allow hierarchical definitions.... for eg: the point being that someone can grab an entire section with having to wonder if they have it all or not |
I don't as you're absolutely right.
I went for INI files as there are pretty easy to deal with, with not to much code to add to deal with them. |
|
yes .. yaml is ok too ... but then TOML is also another alternative (if you want to stick with .ini style syntax). the point for me is the hierarchical nature of the info .. and the keymap crap .. I basically took inspiration in the VSCode way of doing it ... I think they have it really done well |
|
no, I don't wanna stick to INI. And TOML is too hybrid I think. YAML is a better solution. Wide spread so big chances to find libs dealing with it keymap. ok. |
|
This is HUGE. And I love it. Sorry,
Config file comments:
|
|
Superceded by #338. |


Changes
Commands
display CPU memory [at the given address]. If not specified the current bank will be used.
display VIDEO memory [at the given address].
set memory at address with values
fill CPU/VIDEO memory
search CPU/VIDEO memory in range (addr,len or start:end) for bytes
disasm from address
set RAM or ROM bank
set register value
set carry
clear carry
set zero
clear zero
set interrupts disabled
clear interrupts disabled
set Decimal mode
clear Decimal mode
set break
clear break
set reserved/not used
clear reserved/not used
set overflow
clear overflow
set negative
clear negative
list breakpoints
add a breakpoint at the specified address
clear a specific breakpoint or all
display help
look-up for the address or symbol and display it
clear the "symbol" or "*" all from the symbol table for specified bank
load the symbol table [for the specified bank]
dump in a file the symbol dictionary
Toggle the display in full page of code/disasm
Toggle the display in full page of data
Display loaded fonts or Set the debugger font or Load and Set the debugger font
toggle ROM debug mode to allow editing
display X16 emulator & debugger info