firmware-analysis-toolkit
firmware-analysis-toolkit copied to clipboard
how to use gdb in FAT
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 !
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.