delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/03/31/20:24:05

Date: Fri, 31 Mar 2000 18:18:50 -0500 (EST)
Message-Id: <200003312318.SAA07169@indy.delorie.com>
From: Eli Zaretskii <eliz AT delorie DOT com>
To: djgpp AT delorie DOT com
In-reply-to: <033c53a0.7ec650b3@usw-ex0105-036.remarq.com> (message from
batchex on Wed, 29 Mar 2000 11:44:19 -0800)
Subject: Re: HELP! : Debugging a c/asm mixed programs
References: <19464ea8 DOT 15fd37ca AT usw-ex0105-036 DOT remarq DOT com> <8bsuap$j9q$1 AT nets3 DOT rz DOT RWTH-Aachen DOT DE> <033c53a0 DOT 7ec650b3 AT usw-ex0105-036 DOT remarq DOT com>
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

> BTW, I tried using RHIDE/RHGDB. The problem now is when invoking
> int 0x31 function 0x300, RHIDE/RHGDB jumps to what I suspect is
> an exception handler, then it crashed because dual/triple fault.

As I wrote in another message, stepping through Int instructions is
tricky.  If the problem happens when you step through Int NN
instructions, it probably happens because the version of RHIDE you are
using was built with an old version of GDB.

You should stil be able to set a breakpoint *after* the Int NN
instruction and "continue" the program, instead of stepping.  After it
hits the breakpoint, step as usual.

> Another problem is when I define a structure in the ASM modules,
> when I use 'p' in gdb it indicates that the structure is a
> variable that cannot taken/printed by components. If I define it
> in C module, the 'p' command runs fine

The information about the layout of complex data structures is not
something that's magically known to the debugger: it is the
responsibility of the compiler/assembler to produce it.  Since NASM
doesn't support COFF debugging info, GDB cannot know how to interpret
the variable.

> but the programs output gone hairy.

Hmm?  What do you mean by this, exactly.

- Raw text -


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