c++ - Visual Studio 2010 debugger points to wrong line -


Debugger in Visual Studio 2010 recently pointed to the wrong lines and / or skipping lines, I do not know why this is it. This is a CUDA project and only occurs in CUDA files, I have noticed the following:
  • It is always in the same part of the program.
  • These rows are always the same, i.e. not random.
  • Add additional code hereafter criminals lines change that line.
  • This only occurs in .cu -files. Running the code in .cpp -file does not recreate the problem.

    Whatever I have tried:

    • Clean and reconstruct the solution.
    • Install SP1 for MSVC 10 and make all possible updates through Windows updates
    • Use No to optimize in debug mode C / C ++ and CUDA C / C ++
    • Delete all created files manually and then rebuild from the Solutions folder.
    • Folder C: \ Windows \ Microsoft.NET \ Framework \ v4.0.30319 \ Temporary ASP.NET Files
    • Solution to the use of source files only Retrieving.
    • Disabling my extensions.

      I have been able to reduce this code which can reproduce the problem. Keep in mind that this code should be inside the .cu-file and needs to be compiled for C / C ++ with the Quma compiler. Incorporating incentive is not really necessary, but this example tells me what problems are coming to me. A short example is behind.

        #include & lt; Boost / numeric / ublas / matrix.hpp & gt; Promotion :: Numeric :: ublas :: matrix; Struct foo {foo (): mat (null) {} matrix & lt; Float & gt; * Mat; }; Bool Funk (foo * data) {Boole status; // & lt; - Status of left position = false; If (status) {std :: cout & lt; & Lt; "Test \ n"; Return (status); // & lt; - The error report is given here} int size = data-> mat-> size 1 (); // Instead of changing status; } Int main (int args, char * argv []) {func (NULL); 0 error by zero error indicator return; }   

      Does anyone know how it is sorted or how can it be?


      The small example is just showing the skipping line. No external library is necessary.

        bool func () {bool status; // & lt; - Status of left position = false; Return status; } Int main (int args, char * argv []) {func (); Return 0; } 

      Since the program contains only CPU instructions and variable declarations in which no construction is constructed There is no instruction, no debugger will stop there, it executes just the instructions and then uses the debugging information that the compiler is provided to find the relevant line of the source code.

Comments

Popular posts from this blog

ios - Adding an SKSpriteNode to SKScene from a child SKSpriteNode -

Matlab transpose a table vector -

c# - Textbox not clickable but editable -