This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: list of gcc files/purpose?


On 09 Nov 2000 at 17:46 (-0800), Gary Funck wrote:
| Is there a document describing the various files in a gcc source
| distributino, and their purpose?  I looked in the various gcc-related
| docs. and didn't find this.  thanks.
| 
| I'm looking for something as simple as:
| 
| expr.c -      semantic analysis of C expressions
| [...]
| c-parse.in - Yacc grammar describing C syntax,
| 	     preprocessed to generate c-parse.y
| c-parse.y -  YACC-based C language parser,
| 	     generated by pre-processing c-parse.y

i wish i could help you with the _purpose_ of each file used in
the compiler. the shameful hack of a shell script below will show 
you the files used to compile a given binary when called like such.

  gdb-info <prog> functions | grep '^File'

btw, if some shell scripting guru would like to suggest how to 
accomplish this w/o creating the temp command file, i'd owe you a 
cold beverage.

hth.
  brent

=================

(by example)
dust$ gdb-info gcc functions  | grep ^File
File ../../gcc/gcc/gccspec.c:
File ../../gcc/gcc/prefix.c:
File ../../gcc/libiberty/pexecute.c:
File ../../gcc/libiberty/xstrerror.c:
File ../../gcc/libiberty/mkstemps.c:
File ../../gcc/libiberty/xstrdup.c:
File ../../gcc/libiberty/xexit.c:
File ../../gcc/gcc/libgcc2.c:
File ../../gcc/libiberty/xmalloc.c:
File ../../gcc/libiberty/choose-temp.c:
File ../../gcc/gcc/gcc.c:
dust$ cat gdb-info
#!/bin/sh

#TEMP=`tempfile`  # may not be on lesser systems
TEMP="/tmp/gdb-batch-command-tempfile"  # hope this isn't there already
BASENAME=`basename $0`

if [ "x$1" = "x" ]; then
  echo "
usage:
  $BASENAME <prog> <prog args>
"
  exit 1;
else
  PROG=$1
  shift
fi

case $BASENAME in
gdb-show)
  if [ "x$*" = "x" ]; then
    CMD="help show"
    echo "                                                                         "
    echo "***************************************************************************"
    echo "                                                                         "
    echo "   specify one of the show commands for the second argument to $BASENAME  "
    echo "                                                                         "
    echo "***************************************************************************"
    echo "                                                                         "
  else
    CMD="show $*"
  fi
  echo "
  set width 0
  set height 0
  $CMD
  quit
  " > $TEMP
  ;;
gdb-info)
  if [ "x$*" = "x" ]; then
    CMD="help info"
    echo "                                                                         "
    echo "***************************************************************************"
    echo "                                                                         "
    echo "   specify one of the info commands for the second argument to $BASENAME  "
    echo "                                                                         "
    echo "***************************************************************************"
    echo "                                                                         "
  else
    CMD="info $*"
  fi
  echo "
  set width 0
  set height 0
  $CMD
  quit
  " > $TEMP
  ;;
gdb-while-step)
  echo "
  set width 0
  set height 0
  break main
  run $*
  while 1
    step
  end
  quit
  " > $TEMP
  ;;
*)
  echo "doh! you lose. read the source."
  exit 0;
  ;;
esac 

gdb --batch --quiet --command=$TEMP $PROG
rm $TEMP

exit 0;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]