C++ 试图理解GCC-XML输出变量的含义

C++ 试图理解GCC-XML输出变量的含义,c++,python,xml,gcc,wrapper,C++,Python,Xml,Gcc,Wrapper,在GCC_XML上运行头文件时,我得到以下输出: <GCC_XML cvs_revision="1.135"><Namespace id="_1" name="::" members="_3 _4 _5 _6 _7 _8 _9 _10 _11 _12 _13 _14 _16 _17 _18 _19 _20 _21 _22 _23 _24 _25 _26 _27 _29 _31 _32 _33 _35 _36 _37 _38 _39 _40 _41 _42 _43 _44 _46

在GCC_XML上运行头文件时,我得到以下输出:

<GCC_XML cvs_revision="1.135"><Namespace id="_1" name="::" members="_3 _4 _5 _6 _7 _8 _9 _10 _11 _12 _13 _14 _16 _17 _18 _19 _20 _21 _22 _23 _24 _25 _26 _27 _29 _31 _32 _33 _35 _36 _37 _38 _39 _40 _41 _42 _43 _44 _46 _47 _48 _49 _50 _52 _53 _54 _55 _56 _57 _58 _59 _60 _61 _62 _63 _64 _66 _67 _68 _69 _70 _71 _72 _73 _74 _75 _76 _77 _78 _79 _80 _81 _82 _83 _84 _85 _86 _87 _88 _89 _90 _91 _93 _94 _95 _96 _97 _98 _99 _100 _101 _103 _104 _105 _106 _107 _108 _109 _110 _111 _112 _113 _114 _115 _116 _117 _118 _119 _120 _121 _122 _123 _124 _125 _126 _127 _128 _129 _130 _131 _132 _133 _134 _135 _136 _137 _138 _139 _140 _141 _142 _143 _144 _145 _146 _147 _148 _149 _150 _151 _152 _153 _154 _155 _156 _157 _2 _158 _159 _160 _161 _162 _163 _164 _165 _166 _167 _168 _169 _170 _171 _173 _174 _175 _176 _177 _178 _179 _181 _182 _183 _184 _185 _186 _187 _188 _189 _190 _191 _192 _193 _194 _195 _196 _197 _198 _200 _201 _202 _203 _204 _205 _206 _207 _208 _209 _210 _211 _212 _213 _214 _216 _217 _218 _219 _220 _221 _222 _223 _224 _225 _226 _227 _228 _229 _230 _231 _232 _233 _234 _235 _236 _237 _238 _239 _240 _241 _242 _243 _244 _245 _246 _247 _248 _249 _250 _252 " mangled="_Z2::" demangled="::"/>
<Namespace id="_2" name="std" context="_1" members="" mangled="_Z3std" demangled="std"/>
<Function id="_3" name="__builtin_nans" returns="_253" context="_1" location="f0:21" file="f0" line="21" extern="1" attributes="nothrow const nonnull">
<Argument name="str" type="_254" location="f0:21" file="f0" line="21"/>
</Function><Function id="_4" name="__builtin_acosf" returns="_255" context="_1" mangled="acosf" location="f0:25" file="f0" line="25" extern="1" attributes="nothrow"><Argument type="_255" location="f0:25" file="f0" line="25"/></Function>
<Function id="_5" name="__builtin_acosl" returns="_256" context="_1" mangled="acosl" location="f0:26" file="f0" line="26" extern="1" attributes="nothrow"><Argument type="_256" location="f0:26" file="f0" line="26"/></Function><Function id="_6" name="__builtin_va_arg_pack" returns="_257" context="_1" location="f0:147" file="f0" line="147" extern="1"><Ellipsis/></Function>
<Function id="_7" name="__builtin_log10" returns="_253" context="_1" mangled="log10" location="f0:63" file="f0" line="63" extern="1" attributes="nothrow">
<Argument type="_253" location="f0:63" file="f0" line="63"/>


现在我的主要问题是这些值代表什么,例如我得到
参数类型=“\u 253”
什么是(\u 253)代表什么?我找不到任何有用的文档或对输出的解释,因此任何提示都非常感谢。

这些数字是文件中其他内容的标识符。为了了解_253,您必须找到一个具有
id=“_253”
的XML元素。它很可能是一个类型定义或内置类型

示例

这:

汇编成:

它的返回类型是
returns=“\u 5”
,因此您必须在XML中找到一个具有
id=“\u 5”
的元素。请注意,它可能在您当前正在查看的文件之前或之后。还请注意,编译器的不同运行可能会为相同类型生成不同的标识符。在这种情况下:

<FundamentalType id="_5" name="int"/>
这是对type
id=“4c”
的引用,但没有这样的类型。类型为
id=“\u 4”
const
版本(即
c
)很简单:


因此,type
id=“_9”
是对名为“EmptyClass”的常量结构的引用,即
常量EmptyClass&


我希望这现在更有意义。

这些数字是文件中其他内容的标识符。为了了解_253,您必须找到一个具有
id=“_253”
的XML元素。它很可能是一个类型定义或内置类型

示例

这:

汇编成:

它的返回类型是
returns=“\u 5”
,因此您必须在XML中找到一个具有
id=“\u 5”
的元素。请注意,它可能在您当前正在查看的文件之前或之后。还请注意,编译器的不同运行可能会为相同类型生成不同的标识符。在这种情况下:

<FundamentalType id="_5" name="int"/>
这是对type
id=“4c”
的引用,但没有这样的类型。类型为
id=“\u 4”
const
版本(即
c
)很简单:


因此,type
id=“_9”
是对名为“EmptyClass”的常量结构的引用,即
常量EmptyClass&


我希望这现在更有意义。

这是GCCXML的完整输出吗?不,这只是试图解释我的问题的一部分吗?这是GCCXML的完整输出吗?不,这只是试图解释我的问题的一部分您的猜测肯定是对的,这_255可能代表(int或float..等),但查找id为=“\u 253”的XML元素意味着什么,你能解释一下吗?我需要说ok,比如说int和float。我需要一个常量规则来解码follow@MicHans:请看我的答案中添加的完整示例。非常感谢。明天我会检查它,因为我现在无法访问该文件,我会让你知道。但是非常感谢这个例子,事情开始变得有意义了,我真的很感谢你的帮助。你的猜测肯定是对的,这个_255可能代表(int或float..etc),但是你找到id为=“_253”的XML元素是什么意思,你能解释一下吗?我需要说ok,比如说int和float。我需要一个常量规则来解码follow@MicHans:请看我的答案中添加的完整示例。非常感谢。明天我会检查它,因为我现在无法访问该文件,我会让你知道。但是非常感谢这个例子,事情开始变得有意义了,我真的很感谢你的帮助。
  <Function id="_2" name="main" returns="_5" context="_1" location="f0:8"/>
<FundamentalType id="_5" name="int"/>
<ReferenceType id="_9" type="_4c"/>
<Struct id="_4" name="EmptyClass" context="_1" location="f0:1" members="_7 _8 " bases=""/>