Line breakpoints are not hit in Eclipse 4.6.3 CDT 9.2.1 with Cygwin gdb 8.2.1-1

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Line breakpoints are not hit in Eclipse 4.6.3 CDT 9.2.1 with Cygwin gdb 8.2.1-1

Gidi Gal1
Hello,

I am trying to run a debug session with Eclipse 4.6.3 CDT 9.2.1 with Cygwin gdb 8.2.1-1.
I run eclipse from within Cygwin terminal.
When I manually place line breakpoints in the source code they are not hit.
When I create a function breakpoint by code, using org.eclipse.cdt.debug.core.CDIDebugModel.createFunctionBreakpoint - it is hit correctly.
Reviewing some related threads, I wonder if this is related to the gdb version I am using. Is there any link with data about recommended gdb version for each CDT version ?

I'll be grateful for any ideas how to solve this issue.

Thanks,
Gidi

_______________________________________________
cdt-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/cdt-dev
Reply | Threaded
Open this post in threaded view
|

Re: Line breakpoints are not hit in Eclipse 4.6.3 CDT 9.2.1 with Cygwin gdb 8.2.1-1

Jonah Graham
Hi Gidi,

I think the problem here is Cygwin and how it has always been under supported in Eclipse. 

The issue is about Eclipse and GDB seeing different file systems. i.e. Eclipse sees c:\dir\file.c but Cygwin sees /cygrdive/c/dir/file.c. 

The way I recommend you resolve this problem is to add a "Path Mapping" of /cygdrive/c to c:\. You can do that for all launch configurations in Preferences -> C/C++ -> Debug -> Source Lookup Path and press Add button, choose "Path Mapping" and give it a name that suite you. Then enter /cygdrive/c in Compilation path and C: in Local file system path.

I think in the past there was effort to handle this automatically, and perhaps it has degraded over time. I know most vendors who ship products based on CDT use Mingw compiled toolchains that "just work" as both CDT and GDB then understand the same paths.

As for which GDB goes with CDT there should be something about that somewhere, but generally Eclipse CDT works with GDB 6.8 and above for all basic debugging features. GDB 7.5 and above according to what CDT tests against - but the automated tests run only on Linux at the moment.

I hope that helps a little.

Jonah


~~~
Jonah Graham
Kichwa Coders
www.kichwacoders.com


On Thu, 30 Jan 2020 at 09:30, Gidi Gal1 <[hidden email]> wrote:
Hello,

I am trying to run a debug session with Eclipse 4.6.3 CDT 9.2.1 with Cygwin gdb 8.2.1-1.
I run eclipse from within Cygwin terminal.
When I manually place line breakpoints in the source code they are not hit.
When I create a function breakpoint by code, using org.eclipse.cdt.debug.core.CDIDebugModel.createFunctionBreakpoint - it is hit correctly.
Reviewing some related threads, I wonder if this is related to the gdb version I am using. Is there any link with data about recommended gdb version for each CDT version ?

I'll be grateful for any ideas how to solve this issue.

Thanks,
Gidi
_______________________________________________
cdt-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/cdt-dev

_______________________________________________
cdt-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/cdt-dev
Reply | Threaded
Open this post in threaded view
|

Re: Line breakpoints are not hit in Eclipse 4.6.3 CDT 9.2.1 with Cygwin gdb 8.2.1-1

Gidi Gal1
Hi Jonah,

Thanks for your reply. I tried adding path mapping, it did not help. I tried adding path mapping /cygdrive/c and tried also /cygdrive/C. Both did not help.

Thanks,
Gidi



From:        Jonah Graham <[hidden email]>
To:        "CDT General developers list." <[hidden email]>
Date:        01/30/2020 05:11 PM
Subject:        [EXTERNAL] Re: [cdt-dev] Line breakpoints are not hit in Eclipse 4.6.3 CDT 9.2.1 with Cygwin gdb 8.2.1-1
Sent by:        [hidden email]




Hi Gidi,

I think the problem here is Cygwin and how it has always been under supported in Eclipse. 

The issue is about Eclipse and GDB seeing different file systems. i.e. Eclipse sees c:\dir\file.c but Cygwin sees /cygrdive/c/dir/file.c. 

The way I recommend you resolve this problem is to add a "Path Mapping" of /cygdrive/c to c:\. You can do that for all launch configurations in Preferences -> C/C++ -> Debug -> Source Lookup Path and press Add button, choose "Path Mapping" and give it a name that suite you. Then enter /cygdrive/c in Compilation path and C: in Local file system path.

I think in the past there was effort to handle this automatically, and perhaps it has degraded over time. I know most vendors who ship products based on CDT use Mingw compiled toolchains that "just work" as both CDT and GDB then understand the same paths.

As for which GDB goes with CDT there should be something about that somewhere, but generally Eclipse CDT works with GDB 6.8 and above for all basic debugging features. GDB 7.5 and above according to what CDT tests against - but the automated tests run only on Linux at the moment.

I hope that helps a little.

Jonah


~~~
Jonah Graham
Kichwa Coders

www.kichwacoders.com


On Thu, 30 Jan 2020 at 09:30, Gidi Gal1 <[hidden email]> wrote:
Hello,

I am trying to run a debug session with Eclipse 4.6.3 CDT 9.2.1 with Cygwin gdb 8.2.1-1.
I run eclipse from within Cygwin terminal.
When I manually place line breakpoints in the source code they are not hit.
When I create a function breakpoint by code, using org.eclipse.cdt.debug.core.CDIDebugModel.createFunctionBreakpoint - it is hit correctly.
Reviewing some related threads, I wonder if this is related to the gdb version I am using. Is there any link with data about recommended gdb version for each CDT version ?


I'll be grateful for any ideas how to solve this issue.


Thanks,
Gidi

_______________________________________________
cdt-dev mailing list

[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit

https://www.eclipse.org/mailman/listinfo/cdt-dev_______________________________________________
cdt-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/cdt-dev



_______________________________________________
cdt-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/cdt-dev
Reply | Threaded
Open this post in threaded view
|

Re: Line breakpoints are not hit in Eclipse 4.6.3 CDT 9.2.1 with Cygwin gdb 8.2.1-1

Jonah Graham
Hi Gidi,

Can you please raise a bug and include the MI traces so that I can see what is going on. Here is a link to get you started:

https://bugs.eclipse.org/bugs/enter_bug.cgi?assigned_to=cdt-debug-dsf-gdb-inbox%40eclipse.org&bug_file_loc=http%3A%2F%2F&bug_severity=normal&bug_status=NEW&comment=When%20I%20try%20to%20insert%20a%20line%20breakpoint%20in%20the%20editor%20with%20Cygwin%20and%20GDB%208.2%20then%20GDB%20is%20not%20stopping%20at%20the%20breakpoints.%20Function%20breakpoints%20appear%20to%20be%20working%20fine.%0D%0A%0D%0AI%20have%20attached%20the%20MI%20traces%20so%20that%20you%20can%20hopefully%20see%20where%20the%20breakpoint%20insertion%20is%20going%20wrong.%0D%0A%0D%0A&component=cdt-debug-dsf-gdb&contenttypemethod=autodetect&contenttypeselection=text%2Fplain&defined_groups=1&flag_type-1=X&flag_type-11=X&flag_type-12=X&flag_type-13=X&flag_type-14=X&flag_type-15=X&flag_type-16=X&flag_type-17=X&flag_type-2=X&flag_type-4=X&flag_type-6=X&flag_type-7=X&flag_type-8=X&form_name=enter_bug&maketemplate=Remember%20values%20as%20bookmarkable%20template&product=CDT&qa_contact=jonah%40kichwacoders.com&rep_platform=PC&short_desc=Problem%20inserting%20line%20breakpoints%20in%20Cygwin%20with%20GDB%208.2&version=9.2.0

Thanks,
Jonah
~~~
Jonah Graham
Kichwa Coders
www.kichwacoders.com


On Thu, 30 Jan 2020 at 11:38, Gidi Gal1 <[hidden email]> wrote:
Hi Jonah,

Thanks for your reply. I tried adding path mapping, it did not help. I tried adding path mapping /cygdrive/c and tried also /cygdrive/C. Both did not help.

Thanks,
Gidi



From:        Jonah Graham <[hidden email]>
To:        "CDT General developers list." <[hidden email]>
Date:        01/30/2020 05:11 PM
Subject:        [EXTERNAL] Re: [cdt-dev] Line breakpoints are not hit in Eclipse 4.6.3 CDT 9.2.1 with Cygwin gdb 8.2.1-1
Sent by:        [hidden email]




Hi Gidi,

I think the problem here is Cygwin and how it has always been under supported in Eclipse. 

The issue is about Eclipse and GDB seeing different file systems. i.e. Eclipse sees c:\dir\file.c but Cygwin sees /cygrdive/c/dir/file.c. 

The way I recommend you resolve this problem is to add a "Path Mapping" of /cygdrive/c to c:\. You can do that for all launch configurations in Preferences -> C/C++ -> Debug -> Source Lookup Path and press Add button, choose "Path Mapping" and give it a name that suite you. Then enter /cygdrive/c in Compilation path and C: in Local file system path.

I think in the past there was effort to handle this automatically, and perhaps it has degraded over time. I know most vendors who ship products based on CDT use Mingw compiled toolchains that "just work" as both CDT and GDB then understand the same paths.

As for which GDB goes with CDT there should be something about that somewhere, but generally Eclipse CDT works with GDB 6.8 and above for all basic debugging features. GDB 7.5 and above according to what CDT tests against - but the automated tests run only on Linux at the moment.

I hope that helps a little.

Jonah


~~~
Jonah Graham
Kichwa Coders

www.kichwacoders.com


On Thu, 30 Jan 2020 at 09:30, Gidi Gal1 <[hidden email]> wrote:
Hello,

I am trying to run a debug session with Eclipse 4.6.3 CDT 9.2.1 with Cygwin gdb 8.2.1-1.
I run eclipse from within Cygwin terminal.
When I manually place line breakpoints in the source code they are not hit.
When I create a function breakpoint by code, using org.eclipse.cdt.debug.core.CDIDebugModel.createFunctionBreakpoint - it is hit correctly.
Reviewing some related threads, I wonder if this is related to the gdb version I am using. Is there any link with data about recommended gdb version for each CDT version ?


I'll be grateful for any ideas how to solve this issue.


Thanks,
Gidi

_______________________________________________
cdt-dev mailing list

[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit

https://www.eclipse.org/mailman/listinfo/cdt-dev_______________________________________________
cdt-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/cdt-dev


_______________________________________________
cdt-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/cdt-dev

_______________________________________________
cdt-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/cdt-dev
Reply | Threaded
Open this post in threaded view
|

Re: Line breakpoints are not hit in Eclipse 4.6.3 CDT 9.2.1 with Cygwin gdb 8.2.1-1

Gidi Gal1
Hi Jonah,

I attached the workspace and the out from GDB traces console. I hope this is the correct requested output.

Thanks,
Gidi



From:        Jonah Graham <[hidden email]>
To:        "CDT General developers list." <[hidden email]>
Date:        01/30/2020 06:47 PM
Subject:        [EXTERNAL] Re: [cdt-dev] Line breakpoints are not hit in Eclipse 4.6.3 CDT 9.2.1 with Cygwin gdb 8.2.1-1
Sent by:        [hidden email]




Hi Gidi,

Can you please raise a bug and include the MI traces so that I can see what is going on. Here is a linkto get you started:

https://bugs.eclipse.org/bugs/enter_bug.cgi?assigned_to=cdt-debug-dsf-gdb-inbox%40eclipse.org&bug_file_loc=http%3A%2F%2F&bug_severity=normal&bug_status=NEW&comment=When%20I%20try%20to%20insert%20a%20line%20breakpoint%20in%20the%20editor%20with%20Cygwin%20and%20GDB%208.2%20then%20GDB%20is%20not%20stopping%20at%20the%20breakpoints.%20Function%20breakpoints%20appear%20to%20be%20working%20fine.%0D%0A%0D%0AI%20have%20attached%20the%20MI%20traces%20so%20that%20you%20can%20hopefully%20see%20where%20the%20breakpoint%20insertion%20is%20going%20wrong.%0D%0A%0D%0A&component=cdt-debug-dsf-gdb&contenttypemethod=autodetect&contenttypeselection=text%2Fplain&defined_groups=1&flag_type-1=X&flag_type-11=X&flag_type-12=X&flag_type-13=X&flag_type-14=X&flag_type-15=X&flag_type-16=X&flag_type-17=X&flag_type-2=X&flag_type-4=X&flag_type-6=X&flag_type-7=X&flag_type-8=X&form_name=enter_bug&maketemplate=Remember%20values%20as%20bookmarkable%20template&product=CDT&qa_contact=jonah%40kichwacoders.com&rep_platform=PC&short_desc=Problem%20inserting%20line%20breakpoints%20in%20Cygwin%20with%20GDB%208.2&version=9.2.0

Thanks,
Jonah
~~~
Jonah Graham
Kichwa Coders

www.kichwacoders.com


On Thu, 30 Jan 2020 at 11:38, Gidi Gal1 <[hidden email]> wrote:
Hi Jonah,

Thanks for your reply. I tried adding path mapping, it did not help. I tried adding path mapping /cygdrive/c and tried also /cygdrive/C. Both did not help.


Thanks,
Gidi




From:        
Jonah Graham <[hidden email]>
To:        
"CDT General developers list." <[hidden email]>
Date:        
01/30/2020 05:11 PM
Subject:        
[EXTERNAL] Re: [cdt-dev] Line breakpoints are not hit in Eclipse 4.6.3 CDT 9.2.1 with Cygwin gdb 8.2.1-1
Sent by:        
[hidden email]




Hi Gidi,

I think the problem here is Cygwin and how it has always been under supported in Eclipse. 

The issue is about Eclipse and GDB seeing different file systems. i.e. Eclipse sees c:\dir\file.c but Cygwin sees /cygrdive/c/dir/file.c. 

The way I recommend you resolve this problem is to add a "Path Mapping" of /cygdrive/c to c:\. You can do that for all launch configurations in Preferences -> C/C++ -> Debug -> Source Lookup Path and press Add button, choose "Path Mapping" and give it a name that suite you. Then enter /cygdrive/c in Compilation path and C: in Local file system path.

I think in the past there was effort to handle this automatically, and perhaps it has degraded over time. I know most vendors who ship products based on CDT use Mingw compiled toolchains that "just work" as both CDT and GDB then understand the same paths.

As for which GDB goes with CDT there should be something about that somewhere, but generally Eclipse CDT works with GDB 6.8 and above for all basic debugging features. GDB 7.5 and above according to what CDT tests against - but the automated tests run only on Linux at the moment.

I hope that helps a little.

Jonah


~~~
Jonah Graham
Kichwa Coders

www.kichwacoders.com


On Thu, 30 Jan 2020 at 09:30, Gidi Gal1 <
[hidden email]> wrote:
Hello,

I am trying to run a debug session with Eclipse 4.6.3 CDT 9.2.1 with Cygwin gdb 8.2.1-1.
I run eclipse from within Cygwin terminal.
When I manually place line breakpoints in the source code they are not hit.
When I create a function breakpoint by code, using org.eclipse.cdt.debug.core.CDIDebugModel.createFunctionBreakpoint - it is hit correctly.
Reviewing some related threads, I wonder if this is related to the gdb version I am using. Is there any link with data about recommended gdb version for each CDT version ?

I'll be grateful for any ideas how to solve this issue.

Thanks,
Gidi

_______________________________________________
cdt-dev mailing list

[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit

https://www.eclipse.org/mailman/listinfo/cdt-dev_______________________________________________
cdt-dev mailing list

[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit

https://www.eclipse.org/mailman/listinfo/cdt-dev


_______________________________________________
cdt-dev mailing list

[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit

https://www.eclipse.org/mailman/listinfo/cdt-dev_______________________________________________
cdt-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/cdt-dev



_______________________________________________
cdt-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/cdt-dev