[comp.sys.atari.st] GDB works!

jmccarty@euclid.ucsd.edu (Jon McCarty) (08/20/90)

In article <1990Aug17.191036.5116@doe.utoronto.ca> david@doe.utoronto.ca (David Megginson) writes:
[...]
>By the way, does gdb work with gcc 1.37? I remember seeing a message
>claiming that it did not, but it was a little confusing. Thanks.

Yes!  GDB works fine with gcc 1.37.1 (I got mine from dsrgsun.ces.cwru.edu
[129.22.16.2]).  It is a little confusing at first, though.  Basically,
you have to go through these steps...

1) Write your c source (the easy part <heh>).
2) Use the -gg switch when compiling and make sure the pre-processor
   symbol __NO_INLINE__ is defined (either in source or on command line):
	gcc -c -gg -D__NO_INLINE__ file.c
   (Hmm, maybe I/someone could put the NO_INLINE bit as default for -gg in gcc)
3) After you link, you need to make a special symbol file with sym-ld.
   Use the -r switch, and specify the modules in the same order (I think).
   For that reason, I like to link explicitly, and not trust gcc to do it:
	gnu-ld -o a.out \lib\gcrt0.o file1.o file2.o -lgnugdb
	sym-ld -r -o a.sym \lib\gcrt0.o file1.o file2.o -lgnugdb
   You can use the "gnugdb" libs if you have them, but the plain "gnu"
   works too (sometimes you can get lost in the libs, and library calls
   with invalid parms are hard to de-code).  Of course, use gnu16 if
   you're a -mshort person.  Okay, now for the fun part.
4) Invoke GDB without arguments.
5) Load the executable and symbol files:
	exec a.out
	sym a.sym
6) Start the program, setting args if appropriate
	set-a argv1 argv2
	run
7) GDB will automatically stop at the top of your program, so set yer
   break points and squish some bugs!

We should all give our deepest appreciation to the folks who made GDB
work, by all accounts it was a massive ugly hairy beast from the depths.
So THANK-YOU jrd (and John Dunning for a sweet debugger, too)!

>David Megginson
>david@doe.utoronto.ca
>meggin@vm.epas.utoronto.ca

Jon McCarty
(internet) jmccarty@ucsd.edu	(bitnet) jmccarty@ucsd

P.S.  GDBM works in 32 bit mode, anyone tried -mshort on it?  how about
      the new version (1.4?)?