Date: Sun, 02 Sep 2001 19:20:27 +0300 From: "Eli Zaretskii" Sender: halo1 AT zahav DOT net DOT il To: sandmann AT clio DOT rice DOT edu (Charles Sandmann) Message-Id: <7458-Sun02Sep2001192026+0300-eliz@is.elta.co.il> X-Mailer: Emacs 20.6 (via feedmail 8.3.emacs20_6 I) and Blat ver 1.8.9 CC: djgpp-workers AT delorie DOT com In-reply-to: <10109021524.AA16476@clio.rice.edu> (sandmann@clio.rice.edu) Subject: Re: edebug + gcc 3.0.1 References: <10109021524 DOT AA16476 AT clio DOT rice DOT edu> Reply-To: djgpp-workers AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp-workers AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk > From: sandmann AT clio DOT rice DOT edu (Charles Sandmann) > Date: Sun, 2 Sep 2001 10:24:21 -0500 (CDT) > > If I build EDEBUG32 with GCC3.01 the ansi detect does not work. Doing > gcc -O2 -S shows that the asm sections are not included in the output. > (this is file src/debug/edebug/ed.c). There is probably some new > asm syntax or attribute that needs to be added? No, it's the original sin which finally got us; see the patch below. > If so, this means that all the inline asm could be broken unless reviewed? No, a simple grep will do ;-) (I am already doing it.) Thanks for catching this. Index: src/debug/edebug/ed.c =================================================================== RCS file: /cvs/djgpp/djgpp/src/debug/edebug/ed.c,v retrieving revision 1.3 diff -u -p -r1.3 ed.c --- src/debug/edebug/ed.c 2001/05/11 17:52:27 1.3 +++ src/debug/edebug/ed.c 2001/09/02 16:20:03 @@ -27,12 +27,14 @@ void ansi(int fg) void ansidetect(void) /* Idea from DJ's install program */ { word16 oldp, newp; - asm("movb $3,%%ah;movb $0,%%bh;int $0x10;movw %%dx,%0" : "=g" (oldp) : - : "ax", "bx", "cx", "dx"); + __asm__ __volatile__ ("movb $3,%%ah;movb $0,%%bh;int $0x10;movw %%dx,%0" + : "=g" (oldp) : + : "ax", "bx", "cx", "dx"); printf("\033[0m"); fflush(stdout); - asm("movb $3,%%ah;movb $0,%%bh;int $0x10;movw %%dx,%0" : "=g" (newp) : - : "ax", "bx", "cx", "dx"); + __asm__ __volatile__ ("movb $3,%%ah;movb $0,%%bh;int $0x10;movw %%dx,%0" + : "=g" (newp) : + : "ax", "bx", "cx", "dx"); if (newp == oldp) ansi_mode = 1; else {