Skip to main content



      Home
Home » Language IDEs » C / C++ IDE (CDT) » Cygwin, GDB: Can't find source and won't stop at breakpoint
Cygwin, GDB: Can't find source and won't stop at breakpoint [message #86351] Thu, 20 November 2003 14:30 Go to next message
Eclipse UserFriend
Originally posted by: howard.tsoi.conformative.com

Hi,

I'm trying to get Eclipse with CDT going but am having some problems with
the debugger.
The setup is WIN XP, cygwin, Eclipse 2.1.2, CDT 1.2.0, Sun JRE 1.4. GDB is
version/dated 20030919-1. I just download this and tried it on 2 machines
with the same problems.

I've created a simple "hello world" project. The makefile was generated for
me. I launch eclipse from the bash shell.

A) When I go into debug mode, it says: "Source not found. The file
'..\hello.cpp' not found.
I had to go uncheck the Generic Source Location, and added an
explicit path to the debug folder (c:\eclipse\workspace\hello\Debug). Then,
it finds the source. Is this a known problem and the correct workaround?

B) When I set a breakpoint in my file, it seems fine and shows up in my
Breakpoints list. However, when I hit "resume", the execution does not stop
at the breakpoint. Strangely, if I use the "Run To Line" function, the
debugger will stop at that line. Anyone else seen this?

I have checked that it is indeed a debug build. with -g3 -gstabs.
The same executable can be debugged in the insight debugger that came with
gdb, and I can set breakpoints there.
Inside Eclipse, I could also step, view variables, etc.

Any suggestions of what to try would be appreciated.

Howard.
Re: Cygwin, GDB: Can't find source and won't stop at breakpoint [message #86379 is a reply to message #86351] Thu, 20 November 2003 15:40 Go to previous messageGo to next message
Eclipse UserFriend
Did you select the Cygwin Debugger in the Launch-Configuration?

Howard Tsoi schrieb:
> Hi,
>
> I'm trying to get Eclipse with CDT going but am having some problems with
> the debugger.
> The setup is WIN XP, cygwin, Eclipse 2.1.2, CDT 1.2.0, Sun JRE 1.4. GDB is
> version/dated 20030919-1. I just download this and tried it on 2 machines
> with the same problems.
>
> I've created a simple "hello world" project. The makefile was generated for
> me. I launch eclipse from the bash shell.
>
> A) When I go into debug mode, it says: "Source not found. The file
> '..\hello.cpp' not found.
> I had to go uncheck the Generic Source Location, and added an
> explicit path to the debug folder (c:\eclipse\workspace\hello\Debug). Then,
> it finds the source. Is this a known problem and the correct workaround?
>
> B) When I set a breakpoint in my file, it seems fine and shows up in my
> Breakpoints list. However, when I hit "resume", the execution does not stop
> at the breakpoint. Strangely, if I use the "Run To Line" function, the
> debugger will stop at that line. Anyone else seen this?
>
> I have checked that it is indeed a debug build. with -g3 -gstabs.
> The same executable can be debugged in the insight debugger that came with
> gdb, and I can set breakpoints there.
> Inside Eclipse, I could also step, view variables, etc.
>
> Any suggestions of what to try would be appreciated.
>
> Howard.
>
>
Re: Cygwin, GDB: Can't find source and won't stop at breakpoint [message #86406 is a reply to message #86379] Thu, 20 November 2003 14:53 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: howard.tsoi.conformative.com

I have Debugger as "Cygwin GDB Debugger", "Run program in debugger" checked,
"Stop at main() on startup" checked, and "Enable variable bookkeeping"
checked.
I've also tried just "GDB Debugger" which behaves the same with the output
going to the Console sub-window.
Is this what you are referring to? Thanks, Howard.

"Henning Riedel" <kesselhaus@gmx.net> wrote in message
news:bpj50t$u9a$1@eclipse.org...
> Did you select the Cygwin Debugger in the Launch-Configuration?
>
> Howard Tsoi schrieb:
> > Hi,
> >
> > I'm trying to get Eclipse with CDT going but am having some problems
with
> > the debugger.
> > The setup is WIN XP, cygwin, Eclipse 2.1.2, CDT 1.2.0, Sun JRE 1.4. GDB
is
> > version/dated 20030919-1. I just download this and tried it on 2
machines
> > with the same problems.
> >
> > I've created a simple "hello world" project. The makefile was generated
for
> > me. I launch eclipse from the bash shell.
> >
> > A) When I go into debug mode, it says: "Source not found. The file
> > '..\hello.cpp' not found.
> > I had to go uncheck the Generic Source Location, and added an
> > explicit path to the debug folder (c:\eclipse\workspace\hello\Debug).
Then,
> > it finds the source. Is this a known problem and the correct
workaround?
> >
> > B) When I set a breakpoint in my file, it seems fine and shows up in my
> > Breakpoints list. However, when I hit "resume", the execution does not
stop
> > at the breakpoint. Strangely, if I use the "Run To Line" function, the
> > debugger will stop at that line. Anyone else seen this?
> >
> > I have checked that it is indeed a debug build. with -g3 -gstabs.
> > The same executable can be debugged in the insight debugger that came
with
> > gdb, and I can set breakpoints there.
> > Inside Eclipse, I could also step, view variables, etc.
> >
> > Any suggestions of what to try would be appreciated.
> >
> > Howard.
> >
> >
>
Re: Cygwin, GDB: Can't find source and won't stop at breakpoint [message #86436 is a reply to message #86351] Thu, 20 November 2003 18:05 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: mikhailk.qnx.com

Why did you launch Eclipse from the bash shell?

"Howard Tsoi" <howard.tsoi@conformative.com> wrote in message
news:bpj4am$teg$1@eclipse.org...
> Hi,
>
> I'm trying to get Eclipse with CDT going but am having some problems with
> the debugger.
> The setup is WIN XP, cygwin, Eclipse 2.1.2, CDT 1.2.0, Sun JRE 1.4. GDB is
> version/dated 20030919-1. I just download this and tried it on 2 machines
> with the same problems.
>
> I've created a simple "hello world" project. The makefile was generated
for
> me. I launch eclipse from the bash shell.
>
> A) When I go into debug mode, it says: "Source not found. The file
> '..\hello.cpp' not found.
> I had to go uncheck the Generic Source Location, and added an
> explicit path to the debug folder (c:\eclipse\workspace\hello\Debug).
Then,
> it finds the source. Is this a known problem and the correct workaround?
>
> B) When I set a breakpoint in my file, it seems fine and shows up in my
> Breakpoints list. However, when I hit "resume", the execution does not
stop
> at the breakpoint. Strangely, if I use the "Run To Line" function, the
> debugger will stop at that line. Anyone else seen this?
>
> I have checked that it is indeed a debug build. with -g3 -gstabs.
> The same executable can be debugged in the insight debugger that came with
> gdb, and I can set breakpoints there.
> Inside Eclipse, I could also step, view variables, etc.
>
> Any suggestions of what to try would be appreciated.
>
> Howard.
>
>
Re: Cygwin, GDB: Can't find source and won't stop at breakpoint - bash shell [message #86451 is a reply to message #86436] Thu, 20 November 2003 18:48 Go to previous message
Eclipse UserFriend
Originally posted by: howard.tsoi.conformative.com

That was it!

I did it because running the shell adds the Cygwin directories to my path.
I just added c:\cygwin\bin to my path and launched it from a DOS prompt and
both problems are gone.
I typically don't use Cygwin tools outside of the bash shell. I guess other
people, especially CDT people, do this all the time without any problems.

Thanks for pointing this out.
Howard.


"Mikhail Khodjaiants" <mikhailk@qnx.com> wrote in message
news:bpjhst$d9k$1@eclipse.org...
> Why did you launch Eclipse from the bash shell?
>
> "Howard Tsoi" <howard.tsoi@conformative.com> wrote in message
> news:bpj4am$teg$1@eclipse.org...
> > Hi,
> >
> > I'm trying to get Eclipse with CDT going but am having some problems
with
> > the debugger.
> > The setup is WIN XP, cygwin, Eclipse 2.1.2, CDT 1.2.0, Sun JRE 1.4. GDB
is
> > version/dated 20030919-1. I just download this and tried it on 2
machines
> > with the same problems.
> >
> > I've created a simple "hello world" project. The makefile was generated
> for
> > me. I launch eclipse from the bash shell.
> >
> > A) When I go into debug mode, it says: "Source not found. The file
> > '..\hello.cpp' not found.
> > I had to go uncheck the Generic Source Location, and added an
> > explicit path to the debug folder (c:\eclipse\workspace\hello\Debug).
> Then,
> > it finds the source. Is this a known problem and the correct
workaround?
> >
> > B) When I set a breakpoint in my file, it seems fine and shows up in my
> > Breakpoints list. However, when I hit "resume", the execution does not
> stop
> > at the breakpoint. Strangely, if I use the "Run To Line" function, the
> > debugger will stop at that line. Anyone else seen this?
> >
> > I have checked that it is indeed a debug build. with -g3 -gstabs.
> > The same executable can be debugged in the insight debugger that came
with
> > gdb, and I can set breakpoints there.
> > Inside Eclipse, I could also step, view variables, etc.
> >
> > Any suggestions of what to try would be appreciated.
> >
> > Howard.
> >
> >
>
>
Previous Topic:autools and eclipse-cdt
Next Topic:Can we Make CDT Editor more comfortable?
Goto Forum:
  


Current Time: Tue May 13 00:50:01 EDT 2025

Powered by FUDForum. Page generated in 0.04374 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top