delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1998/12/24/06:59:28

Message-ID: <B0000057886@stargate.astr.lu.lv>
From: "Andris Pavenis" <pavenis AT lanet DOT lv>
To: Pierre Muller <muller AT cerbere DOT u-strasbg DOT fr>, djgpp-workers AT delorie DOT com
Date: Thu, 24 Dec 1998 13:58:34 +0200
MIME-Version: 1.0
Subject: Re: debug GDB with itself
In-reply-to: <3.0.5.32.19981223172811.00aa0bc0@ics.u-strasbg.fr>
X-mailer: Pegasus Mail for Win32 (v3.01d)
Reply-To: djgpp-workers AT delorie DOT com

On 23 Dec 98, at 17:28, Pierre Muller wrote:

> 
>    Following Eli Zaretskii proposals I send you
> I context diff for 
> 
>    include/debug/dbgcom.h
>   and
> 
>    src/debug/common/dbgcom.c
> 
>  After a question from Hans-Bernhard Broeker ,

I haven't tried patching gdb-4.16 as I'm not specially interested in it (I simply
built with egcs-1.1.1 and DJGPP-2.02 from sources  gdb416s.zip but had to
patch libiberty/strsignal.c due to conflicting definitions of sys_siglist with 
signal.h).

After that finally  SIGINT works: I can stop program execution with Ctrl-C without 
killing it and see where it is stopped  (earlier it worked with binaries from 
gdb416b.zip but not when I built gdb using gdb416s.zip)

I'm more interested in gdb-4.17  but Robert's patches for gdb-4.17 still has to be 
fixed (program is killed even on SIGSEGV and I'm not able to see even stack trace,
the same is about SIGINT). Perhaps other week.

>   I quicky wrote something to enable FPU inspection
> 
>   this is in two commands :
>   "info all-registers" will show the current FPU stack if not empty
>   and 
>   "info float" will print out FPU control and status information !
> 
>   You can normally change the value of a fpu register, but you can not yet
> change the stack ( no push nor pop !)
>  
>   These fixes explain why also the dbgcom.h is changed !!
> 
>  (NOTE these are relative to version 2.02 !!)
> 

1) there is problem building dbgcom.c after patching with both egcs-1.1.1 and gcc-
2.7.2.1 if optimizations are requested (works without -O):

Reading specs from c:/djgpp/lib/gcc-lib/djgpp/egcs-291.60/specs
gcc version egcs-2.91.60 19981201 (egcs-1.1.1 release)
 c:/djgpp/lib/gcc-lib/djgpp/egcs-291.60/cpp.exe -lang-c -v -isystem 
c:/djgpp/bin/include -undef -D__GNUC__=2 -D__GNUC_MINOR__=91 -Dunix -
Di386 -DGO32 -DMSDOS -DDJGPP=2 -D__unix__ -D__i386__ -D__GO32__ -
D__MSDOS__ -D__DJGPP__=2 -D__unix -D__i386 -D__GO32 -D__MSDOS -
D__DJGPP=2 -Asystem(unix) -Asystem(msdos) -Acpu(i386) -Amachine(i386) -
D__OPTIMIZE__ -Wall dbgcom.c E:/ccAA54x3.i
GNU CPP version egcs-2.91.60 19981201 (egcs-1.1.1 release) (80386, BSD syntax)
#include "..." search starts here:
#include <...> search starts here:
 c:/djgpp/contrib/grx23/include
 c:/djgpp/lib/gcc-lib/djgpp/egcs-291.60/include
 c:/djgpp/include
End of search list.
 c:/djgpp/lib/gcc-lib/djgpp/egcs-291.60/cc1.exe E:/ccAA54x3.i -quiet -dumpbase 
dbgcom.c -O2 -Wall -version -o E:/ccBjdYx4.s
GNU C version egcs-2.91.60 19981201 (egcs-1.1.1 release) (djgpp) compiled by 
GNU C version egcs-2.91.60 19981201 (egcs-1.1.1 release).
dbgcom.c: In function `store_fpu_env':
dbgcom.c:102: warning: unused variable `valid_nb'
dbgcom.c: In function `restore_fpu_env':
dbgcom.c:146: cannot reload integer constant operand in `asm'
dbgcom.c:146: cannot reload integer constant operand in `asm'

putting 'asm (fldenv _fput)' there fixes problem.

>    I don't garanty you that all works correctly 
> and I several times froze Windows95 during debugging of gdbpas !!
> (One funny thin was that sometimes the was apparently a hardware breakpoint
> leftover
> from an interrupted gdb session :
>   this created Trap exceptions in other programs (like GNU ld)
> even after closing the Dos window and opening it again !!
> Only a restart could remove this trap !!
> 
>   If anybody uses GPC I would be very interested to know if 
> debugging works also with this pascal compiler 
> (I am codevelopper of FPC and I never really had time to try seriously GPC !)

I don't so I cannot tell more
> 
>   Any comments on my modifications are very welcome, but
> please note that I am leaving for chrismas holidays in one hour
> and I will touch no computer before january 4th !!
> 
>   I wish you all a mery chrismas and a happy new year !
>   
The same wishes to all on this list

Andris


- Raw text -


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