|
Boost Users : |
From: Robert Ramey (ramey_at_[hidden])
Date: 2006-05-03 12:03:03
Heres what I do.
I run the debugger.
I set a trap anywhere. or I can wait until it traps on its own.
The GDB lets me view the last x number of calls in the stack. I might
look at the last 100 (I forget the exact command BT 500 ?).
I can inspect this and see if where its repeating. eg
a
b
c
d
...
a ==> uh oh, recursive call - investicate this.
Note that the following case isn't a problem
a
b
c
d
...
a
k
l
...
If your structure has cyclic pointers you should get "some" recursion
(e.g) if you have 20 pointers which form a cycle, you'll get repeat
of the stack after 20 pointers have been serialized.
The library tracks pointer serialization and detects cycles so that
there should be no stack overflow. Unless of course if your serialization
a cycle of pointers to types marked "untracked" - which is pretty hard to do
without
explicitly disabling a compile time trap to make it hard todo this.
Good Luck
Robert Ramey
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net