关于gdb远程调试,单步无法跳过pthread_create的问题?

lweilin1983 2013-11-06 11:20:28
我的硬件平台是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;
}
...全文
241 回复 打赏 收藏 转发到动态 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

23,120

社区成员

发帖
与我相关
我的任务
社区描述
Linux/Unix社区 应用程序开发区
社区管理员
  • 应用程序开发区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧