Thanks to all those who pointed out the LF / CRLF issue.  That was the
problem.  I should have thought of that, but instead just assumed
something was wrong with the linker / compiler.

I am not a huge fan of emacs (since I haven't used it for about 6 years
and didn't want to relearn all the shortcuts) but I just started using
that under Windows and everything works great.

Dave,
  You may want to do the same and use emacs - it will then work fine or
get the utility someone mentioned called todos32.  It will strip off
the CR for you if you want to use a different editor.  I have tried
that as well and it works fine.  I do like how gdb has been integrated
with emacs though - so I'd recommend you give that a shot - really
makes debugging easy as the editor will track source line execution for
you.  Feel free to e-mail me if you need any help.

Regards, 
  Jason

--- Dave Smith <[EMAIL PROTECTED]> wrote:
> I had the same problem with GDB as Jason Bomers,
> where GDB displays the
> current line horribly incorrectly.  Chris Antos
> suggested that GDB is
> expecting lines to be terminated with <LF> only, not
> <CR/LF>.  I'm
> developing on a Windows platform and don't have a
> practical choice in the
> matter.  (Regardless of other strong preferences or
> religious wars, I do
> have to use the Windows platform for so much of my
> other activities, that
> Linux is not practical!)
> 
> Does anyone else have experience with Windows-based
> development that is
> using GDB successfully?
> 
> Dave.
> 
> --
> David A. Smith
> Colorado Springs, CO  USA
> 
> > -----Original Message-----
> > From: Chris Antos [mailto:[EMAIL PROTECTED]]
> > Sent: Sunday, June 13, 1999 8:23 PM
> > To: [EMAIL PROTECTED]
> > Subject: Re: GDB line numbers incorrect
> >
> >
> > GDB expects each line to be terminated with LF --
> if it's
> > terminated with CR
> > or CRLF, then GDB will get confused.  perhaps this
> is causing
> > your problem?
> >
> >
> > ----- Original Message -----
> > From: Jason Bomers <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Sunday, June 13, 1999 7:57 PM
> > Subject: GDB line numbers incorrect
> >
> >
> > > I am using GCC and have been having problems
> with the
> > debugger (gdb).
> > > It seems to work except that the source line
> number and the
> > lines being
> > > executed are not in sync with each other
> (executes one
> > command, but the
> > > line it shows you is a comment or some other
> line).  You
> > can even see
> > > the lines change as in the following example:
> > >
> > > (gdb) list 100, 103
> > > 100     --------------------
> > > 101     static Word StartApplication(void)
> > > 102     {
> > > 103     Word error = false;
> > > (gdb) list 101, 102
> > > 101     --------------------
> > > 102     static Word StartApplication(void)
> > >
> > > Also, when you step through the execution you
> can not see the first
> > > several characters of the source line:
> > >
> > > (gdb) step
> > > 107     AppID, dmModeReadWrite);
> > > (gdb)
> > >
> > >
> > > I believe I am using current versions (gdb 4.16,
> POSE 2.1d26) and am
> > > not doing any compile optimization.  I've gone
> through all
> > the docs and
> > > can't find any clues.
> > >
> > > Any help would be greatly appreciated as I have
> a few bugs
> > I am trying
> > > to work out, but it is a little difficult when
> you have to manually
> > > track what line you are executing.
> > >
> > >   - Jason
> > >
> > >
> _________________________________________________________
> > > Do You Yahoo!?
> > > Get your free @yahoo.com address at
> http://mail.yahoo.com
> > >
> > >
> >
> >
> 
> 
> 

===
Jason Bomers
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com

Reply via email to