gcc中__builtin_return_address和__VA_ARGS__
This function returns the return address of the current function, or of one of its callers. The level argument is number of frames to scan up the call stack. A value of
0yields the return address of the current function, a value of1yields the return address of the caller of the current function, and so forth. When inlining the expected behavior is that the function returns the address of the function that is returned to. To work around this behavior use thenoinlinefunction attribute.The level argument must be a constant integer.
On some machines it may be impossible to determine the return address of any function other than the current one; in such cases, or when the top of the stack has been reached, this function returns
0or a random value. In addition,__builtin_frame_addressmay be used to determine if the top of the stack has been reached.Additional post-processing of the returned value may be needed, see
__builtin_extract_return_addr.Calling this function with a nonzero argument can have unpredictable effects, including crashing the calling program. As a result, calls that are considered unsafe are diagnosed when the-Wframe-address option is in effect. Such calls should only be made in debugging situations.
gcc中__builtin_return_address和__VA_ARGS__的更多相关文章
- GCC 中零长数组与变长数组
前两天看程序,发现在某个函数中有下面这段程序: int n; //define a variable n int array[n]; //define an array with length n 在 ...
- gcc中动态库和静态库的链接顺序
so文件:动态库a文件: 静态库exe文件:可执行程序(linux下以文件属性来标示是否是可执行文件,与后缀名无关) 经过自己写的一些测试程序,大致了解了下gcc中链接顺序问题,总结出以下几点:1,动 ...
- GNU C/C++ __attributes__ GCC中的弱符号与强符号
最近在看一些源代码,遇到了一些使用__attribute__修饰函数和变量的属性方面的代码,不是太了解,很是汗颜,再此做个总结: GCC使用__attribute__关键字来描述函数,变量和数据类 ...
- [转] GCC 中的编译器堆栈保护技术
以堆栈溢出为代表的缓冲区溢出已成为最为普遍的安全漏洞.由此引发的安全问题比比皆是.早在 1988 年,美国康奈尔大学的计算机科学系研究生莫里斯 (Morris) 利用 UNIX fingered 程序 ...
- GCC 中的编译器堆栈保护技术
GCC 中的编译器堆栈保护技术 前几天看到的觉得不错得博客于是转发了,但这里我补充一下一些点. GCC通过栈保护选项-fstack-protector-all编译时额外添加两个符号,__stack_c ...
- GCC中的内嵌汇编语言
原文可参考:GCC中的内嵌汇编语言 一.声明 虽然Linux的核心代码大部分是用C语言编写的,但是不可避免的其中还是有一部分是用汇编语言写成的.有些汇编语言代码是直接写在汇编源程序中的,特别是Li ...
- gcc中关于静态库和动态库使用(转)
转自:http://blog.chinaunix.net/uid-25871104-id-3069931.html 1,如何生成静态库 静态库只是一堆object对象的集合,使用ar命令可以将.o文件 ...
- gcc中的内嵌汇编语言(Intel i386平台)
[转]http://bbs.chinaunix.net/thread-2149855-1-1.html 一.声明 虽然Linux的核心代码大部分是用C语言编写的,但是不可避免的其中还是有一部分是用汇 ...
- GCC 中 -L、-rpath和-rpath-link的区别
GCC 中 -L.-rpath和-rpath-link的区别 来源 http://blog.csdn.net/q1302182594/article/details/42102961 关于这3个参数的 ...
随机推荐
- 【转】浅谈MVC与三层架构
首先给大家引入下MVC的概念: MVC(Model View Controller)模型.视图以及控制器,它是一种较为广泛应用的结构设计模式. 模型:就是在MVC设计模式中需要被显示的数据.在通常情况 ...
- ASP.NET多种不同页面间数据传递的方法
1. Get(即使用QueryString显式传递) 方式:在url后面跟参数. 特点:简单.方便. 缺点:字符串长度最长为255个字符:数据泄漏在url中. 适用数据 ...
- httpRuntime与ASP.NET 运行时及IIS处理模型
配置 ASP.NET HTTP 运行时设置,以确定如何处理对 ASP.NET 应用程序的请求,配置节及其描述如下所示. <httpRuntime executionTimeout="1 ...
- Redis修改数据多线程并发—Redis并发锁
本文版权归博客园和作者本人吴双共同所有 .转载爬虫请注明地址,博客园蜗牛 http://www.cnblogs.com/tdws/p/5712835.html 蜗牛Redis系列文章目录http:// ...
- Win10 IoT C#开发 4 - UART 串口通信
Windows 10 IoT Core 是微软针对物联网市场的一个重要产品,既可以开发设备UI与用户交互式操作,又可以控制GPIO等接口,使得原来嵌入式繁琐的开发变得简单.通过Remote Debug ...
- 背水一战 Windows 10 (18) - 绑定: 与 Element 绑定, 与 Indexer 绑定, TargetNullValue, FallbackValue
[源码下载] 背水一战 Windows 10 (18) - 绑定: 与 Element 绑定, 与 Indexer 绑定, TargetNullValue, FallbackValue 作者:weba ...
- PHP正则表达式
1.PHP中两个常用的正则函数 a.preg_match 正则函数,以perl语言为基础 语法:preg_match( mode,string subject,array matches) 说明:mo ...
- oracle函数大全(转载)
F.1字符函数--返回字符值 这些函数全都接收的是字符族类型的参数(CHR除外)并且返回字符值.除了特别说明的之外,这些函数大部分返回VARCHAR2类型的数值.字符函数的返回类型所受的限制和基本数据 ...
- [转载] php用csv文件导出大量数据
header ( "Content-type:application/vnd.ms-excel" ); header ( "Content-Disposition:fil ...
- 编译android 4.4.2
1.获取Android源码 (1)下载repo 在用户目录下创建一个bin文件夹来存放repo,并把该路径设置到环境变量中 mkdir ~/bin PATH=~/bin:$PATH 下载repo脚本 ...