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
GDB error: Reply contains invalid hex digit 84 #15
Comments
Hmm, where exactly are you getting this error? On the GDB side? Either way, could you please post the output of running GDB and gdbstub with debugging enabled? (I should probably add that blurb as an issue template haha) |
Here's the log of causing the crash:
Maybe I'm messing up somehow but it doesn't seem like you have logging setup to work outside of tests? |
Ahh, you're right about that second point... That said, if it's not too much hassle, getting the The source of the error on the GDB side is in the hex-to-binary decoder (found here). One thing that strikes me as weird is that your GDB client is sending If I had to guess, the Can you try modifying the decode_hex method to handle this edge case? match buf {
[0] => Ok(I::zero()),
_ => btou_radix(buf, 16),
} If that fixed it, I'd appreciate it if you could open a quick PR for it, and i'll merge that fix in. |
Ah, sorry, quick correction. The docs for Upon re-reading the docs for the
If your use-case doesn't support reading from low-memory addresses (such as 0x0), then you may need to adjust your memory read/write methods to early-return with Similarly, I'll probably want to update the docs for the Note to self: this TODO comment isn't correct, and should be removed / updated. |
ah gotcha, so "recoverable failed to read" should be |
yep, guess so. Let me know if that fixes it, and I'll update the docs appropriately. Now that I think about it, in my own projects, I would just return zeros if there was a read/write_memory error... |
Ok that works, PR'd #16 to try and have the documentation describe this behavior. |
If I step past a certain instruction without setting a breakpoint on it, I consistently get "invalid hex digit 84". I'm assuming that this instruction is relevant due to the register state at that moment (due to a couple of factors, one of which being that I got the same error in the past from returning an
Err
from memory reads). At minimum I'm sure this is an issue that is hard to find the cause of and could maybe use some documentation on how to avoid.Let me know if I can provide any further information to help debug this.
The text was updated successfully, but these errors were encountered: