From: Hans-Bernhard Broeker Newsgroups: comp.os.msdos.djgpp Subject: Re: GDB problem: Date: 14 Jul 2000 17:21:31 GMT Organization: Aachen University of Technology (RWTH) Lines: 31 Message-ID: <8kni6r$mti$1@nets3.rz.RWTH-Aachen.DE> References: <8kngfn$s0d1 AT imsp212 DOT netvigator DOT com> NNTP-Posting-Host: acp3bf.physik.rwth-aachen.de X-Trace: nets3.rz.RWTH-Aachen.DE 963595291 23474 137.226.32.75 (14 Jul 2000 17:21:31 GMT) X-Complaints-To: abuse AT rwth-aachen DOT de NNTP-Posting-Date: 14 Jul 2000 17:21:31 GMT Originator: broeker@ To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com David Lee wrote: > I write a little program: You don't tell, but you compile and execute this with DJGPP, the DOS port of GNU utilities. [...] > (gdb) s > 11 _farpokeb(sel, 0, 2); > (gdb) s > _farpokeb (selector=287, offset=0, value=2) at test.cpp:89 > Line number 89 out of range; test.cpp has 17 lines. This is a well-known problem (covered by the DJGPP FAQ, indeed), caused by the inability of COFF debug information to account for code coming from more than one file (test.cpp and the header file defining _farpokeb() as an inline function, in this case). Compile with gxx -gstabs+ test.cpp or gxx -ggdb test.cpp and the problem should to away. -- Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de) Even if all the snow were burnt, ashes would remain.