Re: File Size Limit for GDB

Michael Elizabeth Chastain <[email protected]>
Newsgroups gmane.comp.gdb.bugs.general
Message-ID <[email protected]>
Hi Raheem,

> I have a file that contains 130,000 lines of code and I'm having problems
> debugging it with GDB/DDD. I could not set breaks beyond 64000 lines.
> Is there any way to set the limit to something beyond 130,000 or another
> workaround.

Yes, gdb supports several different debugging formats.  You did not say
what your compiler is.  If your compiler is gcc, then can specify
either "-gdwarf-2" or "-gstabs+" when you compile.  (There are other
formats but these two are the best supported).

"-gstabs+" has a limit of 2^16 = 65536 lines.  Try building your program
with "-gdwarf-2" and gdb ought to handle your 130,000 line file.

Michael C
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.