From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,48ea231ae0a9e215 X-Google-Attributes: gidfee84,public From: Amy Kirschner /Peter Thompson Subject: Re: Debugging problem Date: 2000/04/07 Message-ID: <38EE0F32.6C16DB0A@ma.ultranet.com>#1/1 X-Deja-AN: 608051627 Content-Transfer-Encoding: 7bit References: X-Accept-Language: en Content-Type: text/plain; charset=us-ascii X-Complaints-To: abuse@rcn.com X-Trace: 5L3xqjLFUbqbiWHaVEL0qQE3csf60vnmFVnWC2QdV9s= Mime-Version: 1.0 Reply-To: amypeter@ma.ultranet.com NNTP-Posting-Date: 7 Apr 2000 16:41:08 GMT Newsgroups: comp.unix.osf.osf1 Robert Kerr wrote: > I'm trying to debug my program, but when I use dbx, or ddd on top of dbx > and try to enter a breakpoint, I get this: > > stop at "SurfMeshTool.cpp":4460 > > beyond end of file at line "SurfMeshTool.cpp":4460 > > any ideas what's wrong? > > thanks > > -- > -bob > > Mouse movement detected, Reboot Windows to activate changes > ********************************************************************** > * Robert Kerr, The morphing guy. * MS 0847 Sandia National Labs * > * rakerr@sandia.gov * Albuquerque NM 87185-0847 * > * Robert_Kerr@byu.edu * Phone: (505) 844-8606 * > * http://www.et.byu.edu/~kerrr * Fax: (505) 844-9297 * > ********************************************************************** Howdy Bob, I support dbx for Compaq, and I've got a few ideas. The first thing that occurs to me is that SurfMeshTool.cpp is possibly a C file that's been run through the preprocessor. Or maybe fortran. Dbx has no special knowledge of preprocessed files (which are normally hugely expanded from the original C code) and would not necessarily be able to match the line number in the cpp file with the line in the original file. So you would need to check the original source to see where to put your breakpoint. If the spot you want to place the break point is in a section of code #included from another file, well, we have some stuff in the upcoming release to help take care of that, but that particular portion isn't in dbx just yet (you might be able to set the breakpoint, but the source won't display yet for the included portion.) Bottom line, dbx does not think there are any source lines to set a breakpoint at that particular location. If you dump out the executable with "odump -Pv" or with stdump, you will see a number of fields associated with each procedure (grouped under each file). Two of these will show what dbx inspects to determine which lines are in a file. These are lnLow and lnHigh, which are the low and high line numbers for each procedure. If the line you are trying to set a breakpoint is not contained in the enclosed set formed by this pair, then dbx will report, "beyond end of file". It could be before lnLow also, as the error message is a bit generic. If you must set a breakpoint where dbx does not think there are any lines, you can always use a "stopi at 0x..." giving an absolute address, if you have a good idea where you want to stop. Hope that helps, PeterT (petert@zk3.dec.com . Do NOT reply to return address...)