变量参数用C传递 [英] Passing of variable arguments in C

查看:152
本文介绍了变量参数用C传递的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有谁知道如何参数变量,经典的C传递?我今天做了一些调试和多数普通参数通过堆栈传递。但似乎这并不适用于可变参数。存储这些参数在其他地方一样不断的琴弦?

Does anybody know how variable arguments are passed in classic C? I did some debugging today and most regular arguments are passed via stack. However it seems that this does not apply for variable arguments. Are those parameters stored somewhere else like constant strings?

在此先感谢!

推荐答案

他们经常在栈中传递。你所寻找的是你所使用的平台ABI规范。

They are very often passed on the stack. What you are looking for is ABI specifications for the platform you are using.

有关AMD64平台,看看例如一>

For the AMD64 platform, have a look for example here.

这篇关于变量参数用C传递的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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