firmware-analysis-toolkit icon indicating copy to clipboard operation
firmware-analysis-toolkit copied to clipboard

how to use gdb in FAT

Open sssyyynnngithub opened this issue 5 years ago • 1 comments

Sir, May I ask you that how can I use gdb in FAT? I don not know how to use gdbserver and gdb-multiarch to debug in FAT. There are something wrong with the debug communication that I can not debug the firmware program like HTTPD. Could you please share your way to figure it out ? Thank you very much !

sssyyynnngithub avatar Nov 23 '19 22:11 sssyyynnngithub

You need to get hold of a statically compiled gdbserver and somehow push it to the firmware image. Like you can do this by repacking the firmware or transfer it over scp if a ssh daemon is running. After you run the program in gdbserver you should be able to connect from your host using gdb-multiarch. If this doesn't work ensure that the network is properly setup.

Another way you can debug is to use qemu user mode emulation and use the qemu gdb stub. This is a much better way than the earlier.

extremecoders-re avatar Nov 24 '19 18:11 extremecoders-re