How knows the gdb debugger the assembly code in ROM without ROM elf file
Posted: Mon Jun 29, 2020 12:31 pm
I am debugging the ESP with the OpenOCD like described in the documentation. One part of my source code is a call to the function gpio_pad_select_gpio. As far as I know this function resides in the ROM. I have checked as well the esp32_rom.elf and there the function is inside. But for debugging with the gdb I did not publish this elf file for the gdb. I have just configured the elf file of my build. But during debugging I see all instructions of the function gpio_pad_select_gpio in the disassembly. Thus first I was wondering how gdb knows that. But then it come to my mind, that gdb does not need the elf file for doing that. Because it just reads the memory, the ROM in this case, and it knows the instruction set, so it can show the Disassembly. I guess my assumption is correct, right?
Furthermore, why is the source code of the ROM functions not published, because of company secrets?
And I can't even find the gpio_pad_select_gpio inside the API documentation.
Thanks in advance!
Furthermore, why is the source code of the ROM functions not published, because of company secrets?
And I can't even find the gpio_pad_select_gpio inside the API documentation.
Thanks in advance!