www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/02/05/04:51:43

Date: Thu, 5 Feb 1998 11:50:16 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Noam Rotem <nrotem AT johnbryce DOT co DOT il>
cc: Hans-Bernhard Broeker <broeker AT physik DOT rwth-aachen DOT de>, djgpp AT delorie DOT com,
Ian Chapman <Ian DOT Chapman DOT ichapman AT nt DOT com>
Subject: Re: Finding my way through the sources...
In-Reply-To: <Chameleon.980204220046.nrotem@netvision.netvision>
Message-ID: <Pine.SUN.3.91.980205114956.28596E-100000@is>
MIME-Version: 1.0

On Wed, 4 Feb 1998, Noam Rotem wrote:

> Sorry if I sounded like a newbie, but my question was misunderstood
> by some of you.

There's no shame in being a newbie or asking newbie questions.  You
don't have to apologize.

> What made me think there is one, were the two files: faq210b.zip and
> faq210s.zip.

faq210s is the sources of the FAQ, not a FAQ about the sources.

> BUT, and here comes my question again: I can't find 
> my hands and legs in the sources, for I lack the understanding of
> the main structure of it. Let's say I want to follow one topic, for
> example: dynamic allocations. Under what directories and in what
> files (of assembler? of c?) would I find the implementation of
> malloc, free, and other functions (including, of course, all the
> functions involved behind the curtains)?

You have several options:

    1) Look at the contents of djlsr201.zip for files with telltale
       names like malloc.c etc.  If you need to know the directory,
       you can make an educated guess based upon the header file where
       the function's prototype is declared, and a standard which
       defines that function.  For example, `malloc' is in
       src/libc/ansi/stdlib, `stat' is in src/libc/posix/sys/stat,
       etc.

    2) Read section 8.8 of the DJGPP FAQ list which explains that a
       command like "nm -s c:/djgpp/lib/libc.a | fgrep '_free in '"
       should print "_free in malloc.o", meaning that you should look
       for the sources of `free' in malloc.c somwhere in djlsr201.zip.

    3) Download the DJGPP port of GNU ID-utils and use it to create a
       database of tokens in the sources, and then use it for
       lightning-fast queries.  You will need to unzip djlsr
       distribution at least once and run the `mkid' utility which
       creates the database.  After that, you can delete the
       decompressed sources and use the database for queries about
       source files which reference certain tokens.  (The tokenizer is
       source language aware, so it knows that e.g. `_' is part of a C
       token, but `-' is not.)

- Raw text -


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