delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/08/14/08:00:11

From: "Mario Deilmann" <rio_41 AT hotmail DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: unwind programs stack !
Date: Tue, 14 Aug 2001 13:22:04 +0200
Lines: 37
Message-ID: <9lb3p7$8h7vn$1@ID-75293.news.dfncis.de>
NNTP-Posting-Host: pcmd.pallas.de (194.45.33.52)
X-Trace: fu-berlin.de 997790311 8953847 194.45.33.52 (16 [75293])
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Hi,

in Linux I can unwind a programs stack using setjmp.h __jmpbuf.

this is not possible with djgpp's setjmp.h cause there is no __jmpbuf

djgpp:
typedef struct __jmp_buf {
  unsigned long __eax, __ebx, __ecx, __edx, __esi;
  unsigned long __edi, __ebp, __esp, __eip, __eflags;
  unsigned short __cs, __ds, __es, __fs, __gs, __ss;
  unsigned long __sigmask; /* for POSIX signals only */
  unsigned long __signum; /* for expansion */
  unsigned long __exception_ptr; /* pointer to previous exception */
  unsigned char __fpu_state[108]; /* for future use */
} jmp_buf[1];

linux:
/* Calling environment, plus possibly a saved signal mask.  */
typedef struct __jmp_buf_tag    /* C++ doesn't like tagless structs.  */
  {
    /* NOTE: The machine-dependent definitions of `__sigsetjmp'
       assume that a `jmp_buf' begins with a `__jmp_buf'.
       Do not move this member or add others before it.  */
    __jmp_buf __jmpbuf;         /* Calling environment.  */
    int __mask_was_saved;       /* Saved the signal mask?  */
    __sigset_t __saved_mask;    /* Saved signal mask.  */
  } jmp_buf[1];


How can I do this with djgpp ?

Thanx

-- De


- Raw text -


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