I'm attempting to debug the following function which converts GPS position 
strings into floating point values. When I set a breakpoint within the 
function, as soon as the first sscanf_s() call is made, the debugger pane is 
completely cleared out and I'm no longer able to debug this function.

Debugging sequence:
1. I set a breakpoint on line 7 below, and run the program.
2. Debugger breaks on line 7, and I can see the values of all the variables in 
the debugger, although most of them are optimized out at this point.
3. I step over lines 7 & 8, and still see all the variables in the debugger
4. I step over line 9 and the debugger pane goes blank, and remains blank over 
through line 18. At this point, I expect that now I should be able to debug the 
values read into degrees, minutes, and seconds, but instead the debugger pane 
is completely blank.
5. If I continue to step past the end of this function, and return to the 
calling function, the debugger pane fills back in with the variables present in 
the calling scope

01. LLA convertLLA(const std::string &latitudeStr, const std::string 
&longitudeStr, const std::string &altitudeStr) const
02. {
03.    // strings have the following formats:
04.    //   latitude:   +/-DD MM SS.zzzzz
05.    //   longitude: +/-DDD MM SS.zzzzz
06.    //   H-Ell: floating point number to 3 decimal places
07.    int degrees, minutes;
08.    double seconds, latitude, longitude, altitude;
09.    sscanf_s(latitudeStr.data(), "%d %d %lf", &degrees, &minutes, &seconds);
10.    latitude = degrees + (minutes + seconds / 60.) / 60.;
11.    sscanf_s(longitudeStr.data(), "%d %d %lf", &degrees, &minutes, &seconds);
12.    longitude = degrees + (minutes + seconds / 60.) / 60.;
13.    sscanf_s(altitudeStr.data(), "%lf", &altitude);
14.
15.     iaiUtils::LLA lla(latitude * M_PI / 180.,
16.                      longitude * M_PI / 180.,
17.                      altitude);
18.    return lla;
19. }


Sean Murphy
Senior Software Engineer
Defense & Intel - National Security Technologies Group
900 Victors Way, Suite 220
Ann Arbor, MI 48108
Office: +1 734.997.7436  |  Mobile: +1 734.223.8975
sean.m.mur...@us.kbr.com






This e-mail, including any attached files, may contain confidential 
information, privileged information and/or trade secrets for the sole use of 
the intended recipient. Any review, use, distribution, or disclosure by others 
is strictly prohibited. If you are not the intended recipient (or authorized to 
receive information for the intended recipient), please contact the sender by 
reply e-mail and delete all copies of this message.
_______________________________________________
Qt-creator mailing list
Qt-creator@qt-project.org
https://lists.qt-project.org/listinfo/qt-creator

Reply via email to