Re: [xml] XML beginner's question



Hi Andrew,

Code runs fine without printf(), so I am supposing xmlNodeListGetString()
might be failing. Any suggestions?

A general suggestion for debugging segfaults: compile with -g and run under gdb, and see which line your program crashes on and what the values are at that point. Most bugs will then be obvious.

For trickier bugs, running your program under valgrind is a great way to pick up on uninitialised memory accesses or general pointer wackiness.

Cheers,

Michael

--
Print XML with Prince!
http://www.princexml.com



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]