[xsd-users] gdb macros for generated classes
boris at codesynthesis.com
Wed Oct 14 11:03:10 EDT 2009
In the future please keep your replies CC'ed to the xsd-users mailing
list as discussed in the posting guidelines:
Adam Chase <adam.chase1 at gmail.com> writes:
> > I am not aware of anything like this. Printing of the content of any
> > generated class would require a specific macro for each class. I don't
> > think this would scale. On the other hand, I can see how macros for
> > printing the container templates (one, optional, sequence) that are
> > used by the generated code could be useful. This could be similar to
> > the macros used to print STL containers.
> I think this would be great. If I'm looking at a core dump I can't
> call any of the method accessors to see what kind of data I'm looking
If someone is willing to come up with something like this, I will gladly
include it into the XSD distribution.
> > One other thing that you may find useful is the option to generate
> > ostream insertion operators (--generate-ostream). These can be used
> > to quickly dump the content of the object model (or a fragment thereof)
> > from the application.
> This is a good idea as well. Can I use ostream for dumping objs when
> examining a core file?
Hm, I don't think you can execute any code at this stage. Though there
are rumors of support for reverse execution in gdb 7, so who knows.
If that is not possible, I guess the next best thing would be to see
where the program crashes and try to dump the object model as close to
this place as possible.
More information about the xsd-users