www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/03/21/06:57:18

Message-Id: <m0w7x7K-000S25C@natacha.inti.edu.ar>
Comments: Authenticated sender is <salvador AT natacha DOT inti DOT edu DOT ar>
From: "Salvador Eduardo Tropea (SET)" <salvador AT natacha DOT inti DOT edu DOT ar>
Organization: INTI
To: Regis BOSSUT <bossut AT isen DOT fr>, djgpp AT delorie DOT com
Date: Fri, 21 Mar 1997 08:58:07 +0000
MIME-Version: 1.0
Subject: Re: A simple program that works except under GDB...

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019