home *** CD-ROM | disk | FTP | other *** search
/ Dream 52 / Amiga_Dream_52.iso / Atari / Gnu / gdb36p4s.zoo / README.ST < prev    next >
Text File  |  1993-10-04  |  3KB  |  94 lines

  1. This is PatchLevel 4 of GDB 3.6 for AtariST/MiNT. It has all features
  2. included except core files and remote debugging. MiNT 0.98 or later is
  3. required.
  4.  
  5. This version of GDB has better C++ support than GDB 3.5. Function
  6. names are output demangled, and printing of classes with `ptype' also
  7. displays the methods attached. I have upgraded the symbol table
  8. handling to support the extensions introduced in GCC 2. But on the
  9. input side there is still no mangling support, i.e. function names
  10. have to be specified mangled (the completion feature of readline helps
  11. much).
  12.  
  13. Check the Makefile to match your setup. If you have a working shell in
  14. /bin/sh, you can comment out the marked line. The debugged program is
  15. then spawned through /bin/sh, allowing full redirection support and
  16. file name globbing on arguments. Otherwise the program is spawned
  17. directly, with simple redirection (which is usually sufficient,
  18. though). Changing the definition of NO_SHELL requires recompilation of
  19. dep.o, inflow.o and infrun.o (via START_INFERIOR_TRAPS_EXPECTED in
  20. m-atari.h).
  21.  
  22. The original sources of GDB 3.6 can be found in
  23. labrea.stanford.edu:pub/gnu/gdb.xtar.Z (thanks to J.Bammi for pointing
  24. this out)
  25.  
  26. How to use GDB:
  27.  
  28.       - Compile your program with "-g".
  29.       - Make an executable as usual.
  30.       - Make a symbol file using sym-ld
  31.  
  32.       - Example:
  33.     Suppose you want to debug a program named foo consisting of
  34.     foo.c and bar.c. The following steps are needed:
  35.  
  36.     gcc -g foo.c
  37.     gcc -g bar.c
  38.     gcc -o foo.ttp foo.o bar.o
  39.     gcc -o foo.sym foo.o bar.o -B/gnu/bin/sym-
  40.  
  41.     In the last line change the path to match your installation
  42.     of sym-ld. You can also add "-O" to the compilation flags, but
  43.     not "-fomit-frame-pointer". Be sure to use the *same* order
  44.     of object files in both linking steps. It's easiest to use a
  45.     makefile for compilation, e.g.:
  46.  
  47.     CFLAGS = -O -g
  48.     obj = foo.o bar.o
  49.  
  50.     all: foo.ttp foo.sym
  51.     foo.ttp: $(obj)
  52.         $(CC) $(LDFLAGS) $(obj) $(LDLIBS) -o $@
  53.     foo.sym: $(obj)
  54.         $(CC) $(LDFLAGS) -B/gnu/bin/sym- $(obj) $(LDLIBS) -o $@
  55.  
  56.       - run GDB:
  57.  
  58.     gdb foo.ttp foo.sym
  59.  
  60.     This tells GDB to use `foo.ttp' as executable and `foo.sym' as
  61.     symbol file. (This is different from the original GDB where
  62.     the second argument is interpreted as a core file. But core
  63.     files don't exists on the ST, so it's pretty useless :-)
  64.  
  65.     You can now use GDB as usual: set breakpoints, run the
  66.     program, examine the program's state after a stop, continue or
  67.     restart the program, etc. Since GDB and the debugged program
  68.     are running in separate processes you don't have to leave GDB
  69.     to restart the program.
  70.     See gdb.texinfo for details.
  71.  
  72.       - GDB and -mshort:
  73.     This should be detected automagically. However, GDB always
  74.     assumes that `int' has 32 bits, and uses `short' for 16 bit
  75.     int's.
  76.  
  77.       - GDB and -mbaserel:
  78.     There is no support for -mbaserel yet. That is, you can
  79.     compile with -mbaserel, but you must reset the shared text
  80.     flag after compilation in order to be able to debug the
  81.     program.
  82.  
  83.       - Memory requirements:
  84.     Since the symbol table is loaded incrementally, even large
  85.     programs can be debugged without running out of memory. If you
  86.     are low on memory, you can try to compile only the some
  87.     modules with debugging symbols, so that they are not
  88.     accidentally loaded.
  89.  
  90. Enjoy,
  91. --
  92. Andreas Schwab
  93. schwab@ls5.informatik.uni-dortmund.de
  94.