[gedit-list] Line-numbering inconsistancies between gedit and gdb...



I had imported some fragments of code from the Windows environment
(these were old programming problems I could reuse).  These were
copied/pasted into the new code being developed on my Ubunto system. 
When I tried to debug using gdb, I found an incompatability - the
line-numbers as shown by gdb are sometimes different than those
displayed by gedit.

I tracked the problem down to the following:

Lines in windows are terminated with "\r\n"; those in Ubunto are
(normally) terminated with "\n".  gedit neither displayed the imported
"\r" nor removed it.  gdb apparently counted BOTH characters as a "\n",
forcing the subsequent line numbers to diverge.  This is unfortunate,
since gdb sets breakpoints based on it's view of line numbers.

I don't think that this is an inherent gedit problem (except for NOT
identifying the presence of the "\r" - gdb DOES display these as "^M" -
perhaps an option to cause the "\r" to be displayed in gedit is
warranted?)

However, I - and I'm sure others - debug using a gedit window or
listing, and having the breakpoints at inconsistant lines is a nuisance.

Please try and work with the gdb group to come up with a consistant way
of managing lines terminated with "\r\n".

John Kopf



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]