I am trying for a while now to find out how to include newlib functions in my gdb debug session but in vain.
when i step into printf function for instance, i only get the file name and the line number like "../../../newlib/libc/stdio/puts.c " : line 15
Anyone know how to step into newlib function trough gdb ?
newlib functions
Re: newlib functions
Hi,kima2001 wrote: ↑Fri Apr 26, 2019 4:47 pmI am trying for a while now to find out how to include newlib functions in my gdb debug session but in vain.
when i step into printf function for instance, i only get the file name and the line number like "../../../newlib/libc/stdio/puts.c " : line 15
Anyone know how to step into newlib function trough gdb ?
Would you please describe your issue into details with steps which you are performing and what issue you are facing?
So that we can help you in terms of GDB debugging as per your requirement.
Regards,
Ritesh Prajapati
Ritesh Prajapati
Re: newlib functions
The newlib libraries for ESP32 are either compiled into ROM, or pre-built in the "newlib/lib/libc.a" and related files. The source code is available, but because the library was pre-built there is no matching source code available locally for gdb to step into (the source file paths in the library's debug info don't match anything on your local computer, because the library was built on a different computer).kima2001 wrote: ↑Fri Apr 26, 2019 4:47 pmI am trying for a while now to find out how to include newlib functions in my gdb debug session but in vain.
when i step into printf function for instance, i only get the file name and the line number like "../../../newlib/libc/stdio/puts.c " : line 15
Anyone know how to step into newlib function trough gdb ?
For newlib functions with debug info available (like the one in your post), it is possible to tell gdb to substitute the path in the debug info for the correct path on your local computer, by using the gdb substitute path feature. FWIW, I've always found this to be reasonably fiddly and I mostly end up looking up the source code manually. But it is possible.
For newlib code which resides in ROM, there isn't full debug info available so unfortunately there isn't any easy way to have gdb show the matching source.
Re: newlib functions
Hi ESP_Angus,
i will check your solution later when i m back to my project. And i hope it will work well for me.
Nonetheless, Thank you .
i will check your solution later when i m back to my project. And i hope it will work well for me.
Nonetheless, Thank you .
Who is online
Users browsing this forum: brushlow18, Google [Bot], NoTan2 and 107 guests