Message-Id: Comments: Authenticated sender is From: "Salvador Eduardo Tropea (SET)" Organization: INTI To: Regis BOSSUT , djgpp AT delorie DOT com Date: Fri, 21 Mar 1997 08:58:07 +0000 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Subject: Re: A simple program that works except under GDB... Regis BOSSUT wrote: > I wrote a small program to find out my LAN card MAC address, based on > the example provided by Microsoft, using Netbios, adapted with help of > intwin.hlp (interrupt 0x5c). > > It works fine when run as is, but gives incorrect results when run > under GDB. Seems that memory is used differently, but I don't see why. > > Can some guru explain it ? > [sniped code that uses the transfer buffer when calling to a real mode soft interrupt] I guess you are steping over the lines that uses the transfer buffer with GDB. The problem is very well explained by Eli in the FAQ, GDB and your program are using the same transfer buffer and it's used when printing to the screen so you must avoid a GDB print in these lines, just put a breakpoint after the point where you copied the contents of the TB and run to the breakpoint. SET --------------- 0 -------------------------------- Salvador Eduardo Tropea (SET). Address: Curapaligue 2124, Caseros, 3 de Febrero Buenos Aires, (1678), ARGENTINA TE: +(541) 759 0013