delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2000/11/17/12:51:22

Message-Id: <5.0.1.4.0.20001117121959.03459ad0@pop5.banet.net>
X-Sender: usbanet DOT farley3 AT pop5 DOT banet DOT net
X-Mailer: QUALCOMM Windows Eudora Version 5.0.1
Date: Fri, 17 Nov 2000 12:52:17 -0500
To: djgpp-workers AT delorie DOT com
From: "Peter J. Farley III" <pjfarley AT banet DOT net>
Subject: Re: Help: Isn't libdbg the debugging version of libc?
Cc: "Eli Zaretskii" <eliz AT is DOT elta DOT co DOT il>
In-Reply-To: <3405-Fri17Nov2000102857+0200-eliz@is.elta.co.il>
References: <5 DOT 0 DOT 1 DOT 4 DOT 0 DOT 20001116230739 DOT 00a55af0 AT pop5 DOT banet DOT net>
<5 DOT 0 DOT 1 DOT 4 DOT 0 DOT 20001116230739 DOT 00a55af0 AT pop5 DOT banet DOT net>
Mime-Version: 1.0
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

--=====================_2840135==_
Content-Type: text/plain; charset="us-ascii"; format=flowed

At 10:28 AM 11/17/00 +0200, Eli Zaretskii wrote:
<Snipped>
 >I assume you mean ``step'' as in "(gdb) step", not as in "(gdb} 
stepi",
 >because stepping on the assembly level should work with libc 
functions.

Indeed, that is exactly what I meant.

<Snipped>
 >There is no debugging version of libc.a, right now.  It might be a
 >good idea to supply such a version (and also another version, 
compiled
 >with -pg), but no one bothered to make that happen yet.
 >
 >Btw, I think our specs file doesn't support these special versions,
 >either.  Normally, it should instruct GCC to link against libc_g.a
 >when given the -g switch, and against libc_p.a when given the -pg
 >switch; I don't see the necessary magic in our specs, probably 
because
 >these libraries were never available.  If we ever produce these
 >libraries, specs will need to be changed.  (Perhaps it's a good idea
 >to make this change in the next GCC release, just in case.)
 >
 >What I usually do when I need to debug library functions is to paste
 >their source into my test program, compile and link with -g and debug
 >at will.  When I'm done debugging, I put the modified version into
 >libc.a.  This is easier than producing a debugging version of the
 >library and futzing with link command line (to force the linker to 
use
 >the debugging version, since specs doesn't do that).

Understood, I will try that method first.

 >> BTW, the current "tests\makefile.inc" expects libgcc.a to be in the 

 >> "${LIB}" directory, but it is now in "${LIB}/gcc-lib/djgpp/2.952".
 >
 >This is because djdev203 was built with GCC 2.8.1, not 2.95.2.  I
 >expect quite a few of such minor nuisances to pop up when migrating 
to
 >GCC 2.9x or 3.x.  The ones that truly scare me are the more strict
 >warnings.

I thought that might be the case.  So far, there are only a few 
warnings that I have seen in a full build of the library.  I'll paste 
them below my replies here.

 >> I had to update "tests\makefile.inc" to change that assumption.
 >
 >Please post the diffs, we should change the CVS repository
 >accordingly.

See below, it was only a one-line change.

 >It would be nice if a way could be found to work with both old and 
new
 >GCC versions.  Please see if you can make a change that works either
 >way.  I think the library build procedure does something like that.

I will try that later, if I can find the time.  I haven't had 2.8.1 
installed for a long time now, so I'd have to re-install it to 
test.  I'll report back to the list if I find the tuits for it.

Diff -u for makefile.inc (also attached as a file in case mailer 
wrapping messes up the long lines):

----------start diff file------------------------
--- tests/makefile.i00	Sun Sep  1 15:39:18 1996
+++ tests/makefile.inc	Thu Nov 16 23:03:28 2000
@@ -31,7 +31,7 @@
  EXES := $(addsuffix .exe, $(basename $(SRC)))
  ERRS := $(addsuffix .err, $(basename $(SRC)))

-LINK = ld $(LDFLAGS) $^ -o $@ ${LIB}/libgcc.a -T 
${TOP}/../../lib/djgpp.djl
+LINK = ld $(LDFLAGS) $^ -o $@ ${LIB}/gcc-lib/djgpp/2.952/libgcc.a -T 
${TOP}/../../lib/djgpp.djl
  EXE = @${TOP}/../../bin/stubify.exe $@

  .PRECIOUS: %.exe %.out %.err
----------end diff file---------------------

Collected errors/warnings during full libc build:

gcc ... -c spawnvp.c
Load error: no DOS memory
make.exe[3]: *** [spawnvp.o] Error 1
make.exe[2]: *** [all_subs] Error 2
make.exe[1]: *** [all] Error 2
make.exe: *** [subs] Error 2

Just restarting "make" gets around this.  Maybe this is a memory leak 
in makemake?

gcc ... -c exceptn.S
o:/tmp\ccKapaSw.s: Assembler messages:
o:/tmp\ccKapaSw.s:352: Warning: Indirect ljmp without `*'
o:/tmp\ccKapaSw.s:404: Warning: Indirect ljmp without `*'

gcc ... -c dbgcom.c
dbgcom.c:25: warning: `id' defined but not used
o:/tmp\ccirTSlS.s: Assembler messages:
o:/tmp\ccirTSlS.s:530: Warning: Indirect lcall without `*'
o:/tmp\ccirTSlS.s:559: Warning: Indirect ljmp without `*'
o:/tmp\ccirTSlS.s:626: Warning: Indirect lcall without `*'
o:/tmp\ccirTSlS.s:710: Warning: Indirect ljmp without `*'
o:/tmp\ccirTSlS.s:751: Warning: Indirect lcall without `*'
o:/tmp\ccirTSlS.s:772: Warning: Indirect lcall without `*'
o:/tmp\ccirTSlS.s:790: Warning: Indirect lcall without `*'
o:/tmp\ccirTSlS.s:804: Warning: Indirect lcall without `*'
o:/tmp\ccirTSlS.s:822: Warning: Indirect lcall without `*'
o:/tmp\ccirTSlS.s:832: Warning: Indirect lcall without `*'
o:/tmp\ccirTSlS.s:844: Warning: Indirect lcall without `*'
o:/tmp\ccirTSlS.s:858: Warning: Indirect lcall without `*'
o:/tmp\ccirTSlS.s:870: Warning: Indirect lcall without `*'
o:/tmp\ccirTSlS.s:884: Warning: Indirect lcall without `*'
o:/tmp\ccirTSlS.s:893: Warning: Indirect lcall without `*'
o:/tmp\ccirTSlS.s:903: Warning: Indirect ljmp without `*'
o:/tmp\ccirTSlS.s:1007: Warning: Indirect ljmp without `*'

bison expr.y -o expr.c
gcc ... -c expr.c
/dev/env/DJDIR/share/bison.simple: In function `yyparse':
/dev/env/DJDIR/share/bison.simple:361: warning: implicit declaration of 
function `free'
/dev/env/DJDIR/share/bison.simple:285: warning: `yyval' might be used 
uninitialized in this function

That's all for now.  I'll report back when I have more problems, 
questions and/or results on fcntl.

--=====================_2840135==_
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: attachment; filename="makefile.dif"

--- tests/makefile.i00	Sun Sep  1 15:39:18 1996
+++ tests/makefile.inc	Thu Nov 16 23:03:28 2000
@@ -31,7 +31,7 @@
 EXES := $(addsuffix .exe, $(basename $(SRC)))
 ERRS := $(addsuffix .err, $(basename $(SRC)))
 
-LINK = ld $(LDFLAGS) $^ -o $@ ${LIB}/libgcc.a -T ${TOP}/../../lib/djgpp.djl
+LINK = ld $(LDFLAGS) $^ -o $@ ${LIB}/GCC-LIB/DJGPP/2.952/libgcc.a -T ${TOP}/../../lib/djgpp.djl
 EXE = @${TOP}/../../bin/stubify.exe $@
 
 .PRECIOUS: %.exe %.out %.err

--=====================_2840135==_
Content-Type: text/plain; charset="us-ascii"; format=flowed

---------------------------------------------------------
Peter J. Farley III (pjfarley AT dorsai DOT org OR
                      pjfarley AT banet DOT net)
--=====================_2840135==_--

- Raw text -


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