GDB不能踏入的printf [英] gdb cannot step into printf

查看:361
本文介绍了GDB不能踏入的printf的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我的示例程序:

#include<stdio.h>

int main()
{

printf("hello good morning \n");
return 0;
}


gcc -Wall -g temp.c


/opt/langtools/bin/gdb a.out
HP gdb 3.3 for PA-RISC 1.1 or 2.0 (narrow), HP-UX 11.00.
Copyright 1986 - 2001 Free Software Foundation, Inc.
Hewlett-Packard Wildebeest 3.3 (based on GDB) is covered by the
GNU General Public License. Type "show copying" to see the conditions to
change it and/or distribute copies. Type "show warranty" for warranty/support.
..
(gdb) b 6
Breakpoint 1 at 0x2b14: file temp.c, line 6.
(gdb) run
Starting program: /oo_dgfqausr/test/dfqwrk4/temp/a.out

Breakpoint 1, main () at temp.c:6
6       printf("hello good morning \n");
(gdb) step
hello good morning
7       return 0;
(gdb)

当我尝试步入退出并返回到主的printf的function.its。
这是否意味着在printf函数定义不提供与调试符号?还是一丝一毫库我做错了什么?

as soon as i try to step into the printf function.its exiting and returning to main. does this mean that the shred library in which the printf function is defined is not provided with the debug symbols?Or am i doing something wrong?

推荐答案

这意味着有像printf没有可用的源/调试符号。您可以使用 STEPI 步入的printf ,无论如何,你只有用拆装(使用 disas 命令)。

This means there's no available source/debug symbols for printf. You can use stepi to step into printf anyway, you'll only have disassembly available (use the disas command).

这篇关于GDB不能踏入的printf的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆