Mail Archives: djgpp/1997/03/21/06:57:18
Regis BOSSUT <bossut AT isen DOT fr> 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
- Raw text -