[GCC-XML] How to debug gccxml?

Daniel J. Lauk dj at djlauk.de
Tue Jan 17 06:22:32 EST 2006


Hi,

I think I found the bug. It is a copy & paste error, as so often.
I did not take enough care and copied the wrong type: "xml_document_info_p" 
instead of "xml_dump_info_p". And as C is weak typed ...

That's all! Boy, I feel stupid now ... :-|

Regards,
DJ

Am Montag, 16. Januar 2006 18:56 schrieb Daniel J. Lauk:
> Thanks for your responsiveness.
>
> It's getting weird! This actually works. Without a flaw. It just works.
> Do you understand, why it actually is this way? I mean there is just one
> level of indirection less... *puzzled*
>
> Regards,
> DJ
>
> Am Montag, 16. Januar 2006 18:48 schrieb Brad King:
> > Daniel J. Lauk wrote:
> > > Did I get something wrong about static functions? I mean it's all a
> > > visibility question, right? xml.c could not call
> > > DJL_xml_output_body(...) directly, because it's static. This is why
> > > there is a specific entry function, which is non-static. Sounded like a
> > > good idea to me...
> > >
> > > /* your entry point to this module */
> > > void do_xml_dump_body(xml_document_info_p xdi, tree t, int
> > > indent_level) { /* this is where SIGSEGV gets triggered   :-(   */
> > >     DJL_xml_output_body(xdi->file, t, indent_level);
> > > }
> > > static void DJL_xml_output_body(FILE *file, tree t, int indent_level)
> >
> > You're correct, this should have nothing to do with visibility.  If you
> > make the second function non-static and call it directly instead of
> > through the interface function what happens?
> >
> > -Brad
>
> _______________________________________________
> gccxml mailing list
> gccxml at gccxml.org
> http://www.gccxml.org/mailman/listinfo/gccxml



More information about the gccxml mailing list