delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/03/21/05:54:52

From: Regis BOSSUT <bossut AT isen DOT fr>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: A simple program that works except under GDB...
Date: Fri, 21 Mar 1997 10:16:39 +0100
Organization: IEMN - Dépt ISEN - Acoustique
Lines: 32
Message-ID: <333251F7.6AEA@isen.fr>
References: <33317551 DOT 4DE2 AT isen DOT fr> <333181C6 DOT 7692 AT cornell DOT edu>
NNTP-Posting-Host: hpac1.isen.fr
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

A. Sinan Unur wrote:
 
> i don't know what you mean "memory is used differently". however, when
> you are dealing with 16-bit interfaces that expect certain data at
> certain offsets (into the struct), you need to pack your structs to
> override the default 32 bit alignment of struct members.
> here is how i did it:

<snipped>

> basically, the sizeof your ncb struct has to be 64. check yours. BTW, why
> is there a #define in the midle of the struct? 
> further, you cannot pass djgpp pointers (32-bit protected mode) to 16 bit
> interfaces, you need to allocate dos memory (or use the transfer buffer;
> see the FAQ) and communicate with netbios via that memory block.
>...
> -- sinan.

1) The packed attribute is not of any help, since the items of ncb are
   already correctly aligned.

2) Looking into the code shows that I did use dos allocated memory via
   the transfer buffer.

3) I can put the define for NCBASTAT anywhere before it's actually used.
   I just put it near where it is used in the structure.

As the code works fine when run as is, I think it's a sufficient proof.
My doubts were about the debugger itself. Anyway, thanks for your
suggestion and your time.

/Régis

- Raw text -


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