Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] Line breakpoints are not hit in Eclipse 4.6.3 CDT 9.2.1 with Cygwin gdb 8.2.1-1

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 <GGal1@xxxxxxxxxx> 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
cdt-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/cdt-dev

Back to the top