how to debug newlib using gdb?

Asked by Emeric POUPON

Hello,

I can successfully use gdb to remotely debug my program running on STM32F103, using openocd-0.6.0 and a stlinkV2 debugger.
I am using the precompiled package gcc-arm-none-eabi-4_7-2012q4-20121208-linux.tar.bz2.
However, I don't manage to debug newlib system calls. The program is linked to the libc using the armv7-m/libc.a, which I guess contains all the necessary symbols.
I told gdb the place to search for files ("--directory=" command line option, using the unpacked source package gcc-arm-none-eabi-4_7-2012q4-20121208-src.tar.bz2), but it does not work. All I have is the disassembled code.

Am I missing something? I am afraid I have to build the toolchain myself in order to debug it... ?

Best Regards,

Question information

Language:
English Edit question
Status:
Answered
For:
GNU Arm Embedded Toolchain Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Joey Ye (jinyun-ye) said :
#1

I afraid you have to build your own copy, or debug the asm as I usually do.
The release version you downloaded was stripped symbols and debug info.
On Jan 12, 2013 3:01 AM, "Emeric POUPON" <
<email address hidden>> wrote:

> New question #218974 on GCC ARM Embedded:
> https://answers.launchpad.net/gcc-arm-embedded/+question/218974
>
> Hello,
>
> I can successfully use gdb to remotely debug my program running on
> STM32F103, using openocd-0.6.0 and a stlinkV2 debugger.
> I am using the precompiled package
> gcc-arm-none-eabi-4_7-2012q4-20121208-linux.tar.bz2.
> However, I don't manage to debug newlib system calls. The program is
> linked to the libc using the armv7-m/libc.a, which I guess contains all the
> necessary symbols.
> I told gdb the place to search for files ("--directory=" command line
> option, using the unpacked source package
> gcc-arm-none-eabi-4_7-2012q4-20121208-src.tar.bz2), but it does not work.
> All I have is the disassembled code.
>
> Am I missing something? I am afraid I have to build the toolchain myself
> in order to debug it... ?
>
> Best Regards,
>
> --
> You received this question notification because you are an answer
> contact for GCC ARM Embedded.
>

Can you help with this problem?

Provide an answer of your own, or ask Emeric POUPON for more information if necessary.

To post a message you must log in.