关于gdb远程调试,单步无法跳过pthread_create的问题?
我的硬件平台是MIPS架构,调试环境为eclipse+gdb-7.5.
1.
交叉编译应用程序并下载到目标单板上,在目标单板上执行启动gdbserver
./gdbserver 192.168.1.2:10000 pthread_test
2.
PC端启动eclipse进入调试窗口,在单步执行的时候,碰到pthread_create函数后,提示以下错误信息:
No source available for "0x2ac21d38"
warning: GDB can't find the start of the function at 0x2ac21d38.
GDB is unable to find the start of the function at 0x2ac21d38
and thus can't determine the size of that function's stack frame.
This means that GDB may be unable to access that stack frame, or
the frames below it.
This problem is most likely caused by an invalid program counter or
stack pointer.
However, if you think GDB should simply search farther back
from 0x2ac21d38 for code which looks like the beginning of a
function, you can increase the range of the search using the `set
heuristic-fence-post' command.
编译应用程序的时候已经加了“-g”。各位大侠帮忙给点建议,帮忙解决问题?谢谢!
附上我的代码:
void* fun(void*para)
{
while(1)
{
printf("runing thread...\n");
usleep(1000);
}
}
int main()
{
pthread_t pid;
printf("test start...\n");
pthread_create(&pid,NULL,fun,NULL);
getchar();
return 0;
}