MantisBT - Ecere SDK
View Issue Details
0000968Ecere SDKidepublic2013-07-16 19:432013-09-28 23:58
redj 
redj 
immediatemajoralways
closedfixed 
0.44.08 
0.44.10 640.44.10 64 
0000968: toggle breakpoint in file with same name with two projects in workspace will set bp in wrong project/file half the time
as summarized
No tags attached.
related to 0000103closed jerome Trying to set a breakpoint in a library (List.ec) while file with same name exists in Main Project does not work 
zip sameFileName.zip (23,783) 2013-08-24 11:39
http://ecere.com/mantis/file_download.php?file_id=79&type=bug
Issue History
2013-07-16 19:43redjNew Issue
2013-07-16 19:44redjNote Added: 0000930
2013-08-07 01:04jeromeTarget Version0.44.10 64 => 0.44.08
2013-08-07 01:04jeromeStatusnew => assigned
2013-08-07 01:04jeromeAssigned To => redj
2013-08-09 10:54jeromeTarget Version0.44.08 => 0.44.10 64
2013-08-16 18:48jeromeTarget Version0.44.10 64 => 0.44.09
2013-08-22 20:17redjStatusassigned => resolved
2013-08-22 20:17redjResolutionopen => fixed
2013-08-24 07:18jeromeNote Added: 0000999
2013-08-24 07:18jeromeStatusresolved => assigned
2013-08-24 07:19jeromeNote Edited: 0000999
2013-08-24 07:24jeromeNote Edited: 0000999
2013-08-24 11:34redjNote Added: 0001001
2013-08-24 11:39redjFile Added: sameFileName.zip
2013-08-24 11:43redjNote Edited: 0001001
2013-08-24 11:50redjStatusassigned => resolved
2013-08-24 11:51redjFixed in Version => 0.44.09
2013-08-24 16:56jeromeNote Edited: 0001001
2013-08-28 17:32jeromeNote Added: 0001020
2013-08-28 17:32jeromeStatusresolved => assigned
2013-08-28 18:06jeromeNote Edited: 0001020
2013-08-29 00:08redjStatusassigned => resolved
2013-08-29 00:08redjNote Added: 0001028
2013-08-29 08:59jeromeNote Added: 0001033
2013-08-29 08:59jeromeStatusresolved => assigned
2013-08-29 08:59jeromeNote Edited: 0001033
2013-08-30 03:05jeromeResolutionfixed => reopened
2013-08-30 03:05jeromeProduct Version0.44.07 => 0.44.08
2013-08-30 03:05jeromeFixed in Version0.44.09 64 =>
2013-08-30 03:05jeromeTarget Version0.44.09 64 => 0.44.10 Tablet Edition
2013-09-08 18:25jeromeTarget Version0.44.11 Tablet Edition/Docs => 0.44.10 64
2013-09-10 18:40jeromeStatusassigned => resolved
2013-09-10 18:40jeromeFixed in Version => 0.44.10 64
2013-09-10 18:40jeromeResolutionreopened => fixed
2013-09-10 18:40jeromeNote Added: 0001058
2013-09-28 23:58jeromeStatusresolved => closed
2014-05-01 10:45jeromeRelationship addedrelated to 0000103

Notes
(0000930)
redj   
2013-07-16 19:44   
from notes in [0000666]
----------------------------------------------
However, I noticed that having 2 different instances of harfbuzz-shaper.c (Could probably be any file named the same) in 2 added projects (both shared libraries), setting a breakpoint in one of them will still go to the wrong project.
----------------------------------------------
looked into this same file business a bit... not sure how we will fix this!
it depends a lot on gdb...
(0000999)
jerome   
2013-08-24 07:18   
(edited on: 2013-08-24 07:24)
Please document how this was fixed and link to a commit, as well as your test case in 'Steps to reproduce' so I can verify this was fixed.

(0001001)
redj   
2013-08-24 11:34   
(edited on: 2013-08-24 16:56)
fixed by https://github.com/ecere/ecere-sdk/commit/715705e741123c0e2f20f937ae64016506b79802 [^]

SetBreakpoint handles multiple address breakpoints
   if(bpItem.multipleBPs && bpItem.multipleBPs.count)
and it will disable all breakpoints set in the wrong file
   if(!fstrcmp(n.fullname, bp.absoluteFilePath))
   ...
   else
   GdbCommand(false, "-break-disable %s", n.number);


See attached file for test case.

(0001020)
jerome   
2013-08-28 17:32   
(edited on: 2013-08-28 18:06)
I tested in my own test case, and this is still a problem.

I have the same file in different paths for each shared library additional projects, and toggling the breakpoint puts it with the wrong path.

(0001028)
redj   
2013-08-29 00:08   
https://github.com/redj/ecere-sdk/commit/a5f5f25ab798abb9df852a7d40aa86723618f180 [^]
(0001033)
jerome   
2013-08-29 08:59   
It's nice to see the right breakpoint in the BreakpointView when toggling it in the code editor. I will push 77c4082ec497ef535b2c74d8b1b4b6730489866f to master regardless, as it seems to be a step in the right direction and not break anything that was previously working.

However the breakpoint functionality still needs some work, if GDB can allow.

- After setting both breakpoints, and reloading the project, the 2 different paths are kept, but they both show up as if they were in the same project (always the same project, regardless of the order)

- There seems to be a problem related to setting up the breakpoint before the other dynamic library is loaded.

- If after the first breakpoint in ecere is hit, I toggle off/on the other library breakpoint, all hits will happen a the right place (7 in Ecere, 1 in the other) with the proper call stacks and everything. Otherwise the other library will never hit.

- If I set a breakpoint in the other lib, it will pretend to be hitting in ecere, with the ecere location and call stack, but the breakpoint icon and breakpoints view thinks it set a breakpoint in the other lib

- Many GDB warnings show up in the Debug log:

GDB: No source file named src/gfx/drivers/harfbuzz/harfbuzz-shaper.c.
GDB: No source file named harfbuzz-shaper.c.
GDB: No source file named src/Platforms/TextEngine/harfbuzz/harfbuzz-shaper.c.
GDB: No source file named harfbuzz-shaper.c.
GDB: No source file named src/Platforms/TextEngine/harfbuzz/harfbuzz-shaper.c.

 Temporarily disabling breakpoints for unloaded shared library ...

(0001058)
jerome   
2013-09-10 18:40   
Fixed by https://github.com/ecere/ecere-sdk/commit/0de8ceef742f54e87f1c2f43158548efbef0ce72 [^]