GDB debugging #210
Replies: 3 comments
-
Hi @Daannnnnnnn, Just to ensure your goal is really debugging the kernel. The kernel used by EMBA is a pre-compiled from here. So, usually there is no reason to debug it as it would not load the original modules from the firmware image. If you really want to debug the kernel you should be able to modify the generated run.sh script which is usually somewhere in the module log folder from the L10 module (e.g. EMBA-logs/L10_something/archive-something/run.sh). There you can find the qemu command and you just need to add the -S parameter and run the run.sh script and you should be ready to go. |
Beta Was this translation helpful? Give feedback.
-
I should have been clearer in my previous message. I have a non standard .ko file that I want to debug with GDB within the Emba emulation environment, this .ko file is within the firmware image that I want to analyse with Emba. |
Beta Was this translation helpful? Give feedback.
-
I don't think the EMBA kernel will load the kernel module. Usually the kernel needs to match multiple criterias to load kernel modules:
As the EMBA kernel is not optimized for the kernel modules from the original firmware it will not load them. To check you can try loading it on the emulated system via something like "insmod /path/to/your/module.ko". To load a module you need to build your own kernel which fullfills the EMBA criterias and the criterias of the firmware. For this probably the modules S24-S26 and F02 could help you. Additionally, the project FirmSolo could also help. |
Beta Was this translation helpful? Give feedback.
-
Interested in how I can debug kernel files via GDB within the Emba emulation environment. Can someone provide a few tips to get me started? Thank you
Beta Was this translation helpful? Give feedback.
All reactions