delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/06/30/02:01:38

Date: Mon, 30 Jun 1997 08:59:38 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Michael Krause <mkrause AT mail DOT tds DOT net>
cc: djgpp AT delorie DOT com
Subject: Re: Debugging version of C library
In-Reply-To: <01bc828a$a7338340$c94c89d0@default>
Message-ID: <Pine.SUN.3.91.970630085908.21945B-100000@is>
MIME-Version: 1.0

On 26 Jun 1997, Michael Krause wrote:

> How do I make a debugging version of the standard C library?

A straightforward way is to recompile the library with -g.  However,
since rebuilding the library is not easy, I suggest to extract from
djlsr201.zip only the functions that you need to debug, compile them
with -g, put them into the library and relink your program:

	unzip djlsr201.zip src/libc/foo/bar.c
	gcc -O3 -g src/libc/foo/bar.c
	ar rvs lib/libc.a src/libc/foo/bar.o
	make yourprog
	gdb yourprog

After you have finished debugging, recompile the functions without -g
and put them into the library again (or make a backup copy of libc.a
before you begin debugging).

- Raw text -


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