epasveer / seer

Seer - a gui frontend to gdb
GNU General Public License v3.0
2.11k stars 67 forks source link

Cannot remotely debug process running on MIPS #128

Closed nick-george closed 1 year ago

nick-george commented 1 year ago

Hi there,

I'm keen to try out "seer". When I try to connect to gdbserver running remotely, I get a popup with the following text:

Invalid hex digit 59

It could be because of the old gdbserver I'm using, see below.

./gdbserver --version
GNU gdbserver 6.8
Copyright (C) 2007 Free Software Foundation, Inc.
gdbserver is free software, covered by the GNU General Public License.
This gdbserver was configured as "mips-linux"

Do you have any suggestions? I think recompiling a newer version of gdbserver would be a challenge, as it is a bit of an arcane architecture (cut down MIPS chip) and required proprietary build tools. The latest GDB from Ubuntu package repos is able to remotely debug this process without issue.

Cheers, Nick

epasveer commented 1 year ago

Hmmm. It may be related to the old gdbserver version.

This link suggests the gdb program should be the "multiarch" version. Are you using that?

https://stackoverflow.com/questions/47943428/gdbserver-reply-contains-invalid-character

nick-george commented 1 year ago

Thanks for that, it appears to have mostly fixed the issue.

Please tell me, how do I get the assembly view working for a remote debug session working? I've tried various combinations of opening files etc, but none of them seem to work.

epasveer commented 1 year ago

Is the Assembly tab blank? Does the remote program have debug info?

Try this setting in the config tab for Assembly. Settings -> Configuration -> Assembly.

For some disassembly, gdb tries to ask the debug information for the start and end address of the function. If there's no debug info, or the program is pure assembly, you need to put Seer in a different mode.

There's still things I need to do for Assembly debugging. Please feel free to comment on improvements. Task #127 is related.

image

nick-george commented 1 year ago

Hi @epasveer

Thanks for the quick responses! And sorry for the delayed reply.

Is the Assembly tab blank? Does the remote program have debug info?

Yes and no. The assembly tab is blank and the program has no debug info.

I tried making your suggested changes to Settings -> Configuration -> Assembly but it didn't seem to make any difference. When I connect, I get nothing in the assembly view window. I'm still not sure what you mean exactly when you say that Seer need to be put into a different "mode".

I'll try having a read of #127

Cheers, Nick

epasveer commented 1 year ago

Okay. Let me know.

When you changed the mode to "Length 256", did you save the confiuration and restart Seer? Just a guess.