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?
我有一个通用的gdb / gdbserver问题。我正在尝试使用主机上的gdb和远程目标上的gdbserver调试arm linux嵌入式应用程序。我可以在main的开头逐步执行代码行。但是，调用共享库函数后，gdb（或gdbserver）似乎会丢失。即使我在调用后设置断点并使用continue，它也永远不会遇到断点。我知道我在共享库中没有符号，并且实际上并不关心它们。即使没有符号在共享库中或至少继续到下一个断点，我是否应该能够成功跳过gdb中的库调用？或者这表明存在不同类型的问题？
Breakpoints by address, rather than by symbol, are sometimes more reliable.
(gdb) x/i my_func 0x12345678 <my_func> ... (gdb) break *0x12345678