This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: text file formats


> Date: Thu, 6 Apr 2006 09:38:29 -0400
> From: Bob Rossi <bob_rossi@cox.net>
> Cc: gdb@sources.redhat.com
> 
> The first is when I have a source file displayed, I need to make sure
> that what the user see's as line N is what GDB/GCC think is line N. For
> instance, 'b foo.c:N' must be the same line N that GDB/GCC think is line N.

Then you must do _exactly_ what GDB does: support only native EOL
formats.

> The second case is when the user types 'b main'.
> GDB will find the symbol and determine the line number.
>     (gdb) b main
>     Breakpoint 1 at 0x8048320: file main.c, line 4.
> I need to make sure that line 4, is the same in GDB, as it is in CGDB.

This only works in GDB if the source has native EOLs.  You must do the
same in CGDB, or else change GDB to support non-native formats, and
make CGDB do the same.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]