[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-bugs-dist
Subject:    [Bug 304356] Adding a breakpoint during execution opens extraneous files
From:       David <daviddoria () gmail ! com>
Date:       2012-08-26 22:55:50
Message-ID: bug-304356-17878-YlNwFWCMdF () http ! bugs ! kde ! org/
[Download RAW message or body]

https://bugs.kde.org/show_bug.cgi?id=304356

--- Comment #2 from David <daviddoria@gmail.com> ---
Ok, consider this code:

#include <cmath>
#include <iostream>
#include <vector>

int main(int, char *[])
{
  std::vector<float> a;

  for(int i = 0; i < 1e8; ++i)
  {
    a.push_back(sin(i));
  }

  std::cout << a[1000] << std::endl;

  return 0;
}

I compile in debug mode and let the loop run. Then (while it is running), I add
a breakpoint to line 11 (the push_back call). The first time I tried this, 
stl_vector.h opened to line 831 (I guess - at least that is where the cursor
shows up).

I repeated the experiment and this time nothing happened (the breakpoint was
added and correctly stopped at without opening any other files. The third time
I tried, new_allocator.h was opened (with the cursor on line 1).

It seems to me like the file with the breakpoint is the only one that should be
opened when the breakpoint is hit, no? It is very disruptive to get STL and
other library files opening when breakpoints are added like this.

Can you reproduce?

-- 
You are receiving this mail because:
You are watching all bug changes.
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic