Jim
Jim

Reputation: 235

Stepping over library calls with gdb/gdbserver

I have a general gdb/gdbserver question. I'm trying to debug an arm linux embedded application using gdb on the host and gdbserver on the remote target. I can step through lines of code at the beginning of main. However, gdb (or gdbserver) seems to get lost after calls to shared library functions. Even when I set a breakpoint after the call and use continue, it never hits the breakpoint. I know I don't have symbols in the shared libraries and really don't care to step into them. Shouldn't I be able to step over the library calls in gdb successfully even without the symbols being in the shared libraries or at least continue to the next breakpoint? Or does this indicate a different type of problem?

Upvotes: 9

Views: 715

Answers (1)

ugoren
ugoren

Reputation: 16441

Breakpoints by address, rather than by symbol, are sometimes more reliable.

Try this:

(gdb) x/i my_func
0x12345678 <my_func> ...
(gdb) break *0x12345678

Upvotes: 1

Related Questions