Is there a way to keep gdb from stepping into libgcc code?

Doug Evans
Mon Feb 17 07:54:00 GMT 2014

On Sun, Feb 16, 2014 at 10:59 AM, Alan Lehotsky <> wrote:
> In a port to a pretty low end processor (no multiply instruction), I've got a pretty functional tool chain; passing all but about 300 of the gdb tests
> One of the things that I've noticed is that gdb wants to stop inside the runtime.  Is there some way to annotate the assembly language implementation of _mulsi3 (for example) to keep gdb from stopping inside it?
> The only special annotations I currently have in the source are
>         .global _mulsi3
>         .func    _mulsi3
> _mulsi3:
>         .....
>         .endfunc
> wrapping the body of the implementation.  Or do I need to special case the code in my <target>-tdep.c file to disallow stopping inside runtime support routines?

Is it that you don't want gdb to stop inside the functions while stepping?
There's no way that I know of to annotate the assembly to prevent gdb
from stopping there.
If there is no debug information then gdb will not stop, but that's
not necessarily an ideal solution.

There is the "skip" command that can be used for this, though I've
never tried it with libgcc assembler functions.

(gdb) skip file my-libgcc.S
[or however the source file is spelled]

More information about the Gdb mailing list