gpt4 book ai didi

c - glibc 中 printf() 的跟踪代码

转载 作者:行者123 更新时间:2023-12-04 06:00:03 24 4
gpt4 key购买 nike

我已经下载了glibc的源代码(GNU c 库),版本 - 2.15.90。我正在追踪printf()的代码功能。我正在使用工具 cscopectags浏览代码。以下是我遍历理解的路径printf()功能。 (在这里,我只是提到函数调用):-

1. Opening file "glibc/stdio-common/printf.c"
2. int __printf (const char *format, ...)
3. __extern_always_inline int vfprintf (FILE *__restrict __stream, const char *__restrict __fmt, _G_va_list __ap)
4. int attribute_hidden __vfprintf_chk (FILE *s, int flag, const char *fmt, va_list ap)
5. int attribute_compat_text_section __nldbl___vfprintf_chk (FILE *s, int flag, const char *fmt, va_list ap)

一旦我达到功能 \__nldbl___vfprintf_chk() ,有一个电话是 __vfprintf_chk()因此最后两个函数(在第 4 点和第 5 点中提到)相互调用。我哪里做错了?

最佳答案

我在电话中看不到这样的内容,printf快速跳转到 vfprintf 它做了真正的工作,我想说你的源代码浏览器正在运行,glibc 是非常密集的宏。

关于c - glibc 中 printf() 的跟踪代码,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9020072/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com