Thread with 30 posts

jump to expanded post

here’s my review of the GDB Remote Serial Protocol, having implemented a small subset of it:

it’s… fine. the docs lack a few details, but you can figure them out from reading the GDB source code and from seeing how GDB responds to your packets. I’m glad it’s all ASCII.

I’m also glad it gracefully degrades. it assumes only the absolute minimum feature set. every single modern fancy feature is optional, because it’ll query or probe for support before trying to use those.

well… GDB will, at least. LLDB is another story ^^;;;;

Open thread at this post

using a real debugger is amazing, I can effectively insert debug prints into a binary:

(gdb) b *0x29a88
Breakpoint 1 at 0x29a88
(gdb) commands
Type commands for breakpoint(s) 1, one per line.
End with a line saying just "end".
>p *(char**)$r0
>continue
>end
(gdb) c
Open thread at this post

the return on investment from implementing a GDB server in your emulator is incredible. my implementation is like 300 lines and does the bare minimum (memory and register read/write, step and continue), and now I have breakpoints, arbitrary C expression prints, disassembly view…

Open thread at this post

i completely lost track of how many levels deep in the stack i got in this app, it was at least a dozen…

and then i discover that it can’t possibly be a problem with that bit of the code. in fact, it’s probably something very simple:

a missing slash in an absolute path

😅😅😅

Open thread at this post

sometimes an app breaks your resolve. this app has finally done this to me. i haven’t the faintest idea why it’s making such strange assumptions about paths. everything i can gather tells me it must be wrong.

i’ll just… add the app-specific hack. just this once. it’s okay.

Open thread at this post
gcn_x86 , @_C@mastodon.gamedev.place
(open profile)

@hikari Ah. Damn, that's even worse. I don't understand how whoever worked on the asm layout didn't realize looking at what came before the current instruction is actually useful to diagnose problems. I lost count of how many times I had to rerun things just so I could set a breakpoint a few instructions before a crash. At least it seems it'll get fixed, so yay :)

Open remote post (opens in a new window)