[GCC-XML] string in gccxml

Kedar Joshi kpjoshi at gmail.com
Fri Nov 12 17:58:04 EST 2004

Ok. I'll take care of the extra stuff with the parser, thanks.

The fxml-start option takes a comma separated list. If I have 10 (or
maybe more) functions in my input file as below, do i have to speficy
all the names with the -fxml-start option? Or is there any option
where i can say "All" or something like that?

int foo1(int);
double foo2(double);
string foo6(string);
float foo10(float);


On Fri, 12 Nov 2004 17:44:38 -0500, Brad King <brad.king at kitware.com> wrote:
> Kedar Joshi wrote:
> > I am still getting a lot of extra structs, methods,
> > constructors/destructors, typedefs in the XML output file. Is there
> > any way to get rid of these easily or not to produce them at all and
> > still use the string class? (The generated output is not as big when i
> > only use the Fundamental types like int, float, double, etc.)
> The dump with -fxml-start dumps the declaration specified, everything it
> references, everything referenced by things it references, etc.  In
> practice this is usually needed to get anything useful out of the file
> anyway.  If you really do not want the extra declarations, it is easy to
> ignore them with a proper XML parser.
> > Also, why does the struct show the name as below? instead of just
> > something simple, like "basic_string"?
> >
> > <Struct id="_2"
> > name="basic_string<char,std::char_traits<char>,std::allocator<char>
> > >" context="_5"...>
> basic_string is a template.  Only instantiations of templates are
> dumped.  The full name of the instantiation that is referenced by the
> std::string typedef is the long basic_string<....> name because it has
> all the template arguments.  This is a consequence of the C++ standard
> library and has nothing to do with GCC-XML.
> > I just want to get the method signatures of all the functions in my
> > input file by parsing the XML output produced by gccxml.
> You can use the file="fXX" attribute on each declaration to identify it
> as being in your source file.  That attribute references the File
> elements at the bottom of the dump.
> -Brad

More information about the gccxml mailing list