cs01 / gdbgui

Browser-based frontend to gdb (gnu debugger). Add breakpoints, view the stack, visualize data structures, and more in C, C++, Go, Rust, and Fortran. Run gdbgui from the terminal and a new tab will open in your browser.
https://gdbgui.com
GNU General Public License v3.0
9.86k stars 498 forks source link

Do not crash on UTF-8 decode errors #423

Closed kubouch closed 11 months ago

kubouch commented 2 years ago

Summary of changes

This PR implements a fix suggested in https://github.com/cs01/gdbgui/issues/407.

There are also other UTF-8 issues that might be related to this: https://github.com/cs01/gdbgui/issues/130 https://github.com/cs01/gdbgui/issues/347 https://github.com/cs01/gdbgui/issues/292

Test plan

Tested by running

# command(s) to exercise these changes
kubouch commented 2 years ago

I haven't actually tested the changes yet but I can try later when I have more time.

cs01 commented 2 years ago

This looks good, will merge if it's tested

AuroransSolis commented 1 year ago

Tested it out here on a program that had been causing gdbgui to crash for me and it seems to be working well. Can provide source if necessary, but I'm unsure if the same error will crop up on other machines.

kubouch commented 1 year ago

Sorry, I moved to other projects and haven't used gdbgui or even gdb since, I don't have a reproduction example anymore.

AuroransSolis commented 1 year ago

I meant that I can provide the source to reproduce the issue. Your patch did work very well on my machine, at least, so it has that going for it.

kubouch commented 1 year ago

You can paste the source here.

cs01 commented 11 months ago

Thank you!