Looking for hints on DC import debugging

Jef Driesen jefdriesen at telenet.be
Mon Dec 30 04:13:44 UTC 2013

On 30-12-13 11:57, Lutz Vieweg wrote:
> since "just trying to find external conditions that trigger the import failure"
> did not get me anywhere, I intend to attach with gdb next time and find the
> place in the code where the decision is made to not use the data coming from the DC.
> Can you hint me at which function I should start setting a break point?
> Does subsurface process dive data while importing, one-dive-at-a-time, or
> is there more like a place in the code where the whole of one DC import
> (multiple dives) is passed back from libdivecomputer to the application?

Libdivecomputer does hands over the dives on at a time. This happens in the 
dive_cb() function, so that is probably the best place to start from.

If you are going to debug dive computer downloading, I would advise to invest 
some time setting up the simulator. It's faster and more convenient than using 
the real thing, and you don't have to worry about disconnect timeouts (if you 
wait too long in gdb, that might be a problem). And of course you can repeat the 
same download over and over again.


I have plenty of test data available.


More information about the subsurface mailing list