Message-Id: Comments: Authenticated sender is From: "Salvador Eduardo Tropea (SET)" Organization: INTI To: Dino Miniutti Date: Mon, 14 Jul 1997 17:28:38 +0000 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Subject: Re: Newbie needs help with GDB CC: djgpp AT delorie DOT com Precedence: bulk Dino Miniutti wrote: > I'm currently having trouble getting to grips with GDB. > > I start GDB and use the "file" command to load my executable (mass.exe - > short for masscombat). > > I then try to debug the program by stepping through it, but the problem > is that when I reach a function that is #included from another of my > files (masscom.c) I get the message: > > line number 62 is out of range; mass.c has 31 lines. > > So, I was wondering how you actually get GDB to step into functions > included from other files. > > Thanks in advance Dino Miniutti. > > PS. Sorry if this was off-topic for this newsgroup, but I didn't know > where else to ask. Isn't of topic if you are using the DJGPP package, if not don't read my answer. That's a limitation of the COFF debug info. DJGPP is configured to generate this kind of debug information. You can configure the compiler to produce stabs debug info, but for this you'll need to recompile the compiler. As you say you are a newbie perhaps is better if you simply avoid code in your includes. If you can't do it read the next. If you have the time for it go to my home page and get the patchs for gcc (Robert Hoehne wrotte the patch), apply it to the files from gcc2721s.zip and recompile it. There are a readme to compile the compiler READ IT. One important thing is editing the makefile to configure the compiler flags used to compile the compiler. Put out the -g and add -O2 or any other optimization switch. Good luck, SET ------------------------------------ 0 -------------------------------- Visit my home page: http://www.geocities.com/SiliconValley/Vista/6552/ Salvador Eduardo Tropea (SET). (Electronics Engineer) Address: Curapaligue 2124, Caseros, 3 de Febrero Buenos Aires, (1678), ARGENTINA TE: +(541) 759 0013