Developer forums (C::B DEVELOPMENT STRICTLY!) > Plugins development

Debugger sometimes doesn't delete breakpoints

<< < (3/5) > >>

theven:
There are no errors. The problem is always reproduced.

Add breakpoint:
64. [debug]Breakpoint 1 ("/main/rain/dev/src/include/RainCore/Containers/DynamicArray.hpp:93") pending.
Stop:
82. At /main/rain/dev/src/include/RainCore/Containers/DynamicArray.hpp:139

Gist in number of line: 139.


Jenna:
Can you provide the code that leads to this problem ?
Or other (sample) code, that has the same issue ?

theven:
The code does not matter. I can insert any code, and there will be a stop. The point is that once set the breakpoint and after removed, it appears again, and again. Maybe it's a gdb bug. We need to determine where the bug, as long as there are reproducible behavior.
A similar case was six months - a year ago. I can not remember what it was.

theven:
But phantom breakpoint follows the code. I cut and pasted destructor to another location of the same file (inside class), the point has moved along with the code (moved from 139 to line 120 with "if(mBuffer)").

--- Code: ---136.
137. ~DynamicArrayImplStack()
138. {
139. if(mBuffer) { // <---- There (line 139)
140. for(size_t pos = 0; pos < mSize; ++pos) mBuffer[pos].destroy();
141. Core::Free(mBuffer, mBuffSize*sizeof(T));
142. }
143. }
144.
--- End code ---


--- Code: ---117.
118. ~DynamicArrayImplStack()
119. {
120. if(mBuffer) { // <---- There (line 120)!
121. for(size_t pos = 0; pos < mSize; ++pos) mBuffer[pos].destroy();
122. Core::Free(mBuffer, mBuffSize*sizeof(T));
123. }
124. }
125.
--- End code ---

The next thing I did, remove the destructor from the class

--- Code: ---117.
118. ~DynamicArrayImplStack();
119.
120. IteratorType begin() { return IteratorType( mBuffer[0].getElementPtr() ); } // <---- There!!! (line 120 again)
121.

743.
744. template <typename T, typename BufferStrategy>
745. DynamicArrayImplStack<T, BufferStrategy>::~DynamicArrayImplStack()
746. {
747. if(mBuffer) {
748. for(size_t pos = 0; pos < mSize; ++pos) mBuffer[pos].destroy();
749. Core::Free(mBuffer, mBuffSize*sizeof(T));
750. }
751. }
752.

--- End code ---
and the phantom breakpoint remained on line 120! (With method "begin").

oBFusCATed:

--- Quote from: theven on December 11, 2012, 05:29:46 pm ---The code does not matter. I can insert any code, and there will be a stop. The point is that once set the breakpoint and after removed, it appears again, and again. Maybe it's a gdb bug. We need to determine where the bug, as long as there are reproducible behavior.
A similar case was six months - a year ago. I can not remember what it was.

--- End quote ---
Probably the code is inlined in many translation units and the breakpoint is inserted many times.
But I've not seen any commands to delete the breakpoint from your log.
Please do a session reproducing the exact bug you see. And when the breakpoint is hit for the second time execute the gdb command "info breakpoints".

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version