Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!munnari.oz.au!brolga!uqcspe!cs.uq.oz.au!warwick From: warwick@cs.uq.oz.au (Warwick Allison) Newsgroups: comp.sys.atari.st.tech Subject: Re: GDB question Message-ID: <1080@uqcspe.cs.uq.oz.au> Date: 1 May 91 00:08:19 GMT References: <91119.163834ZVD007@DMSWWU1C.BITNET> Sender: news@cs.uq.oz.au Reply-To: warwick@cs.uq.oz.au Lines: 41 >I'm using now g++ and tried to use gdb for debugging, but there are no >symbols in the programfiles. I read in a readme-file that I haveto use >sym-ld for filling the prg-file with debugging info, but I dont know how >to use it. Can someone give me a hint? >Thanks in advance From the gnu (.dvi :-) manual: `-gg' Produce debugging information in GDB's own format. This requires the GNUassembler and linker in order to work. `sym-ld.ttp' is a special version of the linker. Its sole purpose is to create a special symbol file used by the GNUdebugger. The following example shows the usage.(`$' is the prompt of a CLI, `*' is the GDB prompt, `#' marks a comment) $ gcc -c -gg foo.c # compile `foo.c' $ gcc -o foo.prg foo.o # linkwith normal `gcc-ld.ttp' $ sym-ld -r -o foo.sym $(GNULIB)"crt0.o foo.o -lgnugdb (or -lgdb) # link with `sym-ld.ttp' to get symbol file $ gdb * exec-file foo.prg # executable (`gcc-ld.ttp' linked Atari executable) * symbol-file foo.sym # symbols file (`sym-ld.ttp' `-r -o' linked) * run * : : : * q $ # back Note the line in the example, where `sym-ld.ttp'is invoked. A library `gnugdb.olb' is used to create the symbol file. This is just like the normal library `gnu.olb' except that is was compiled. Warwick. -- _-_|\ warwick@cs.uq.oz.au / * <-- Computer Science Department, \_.-._/ University of Queensland, v Brisbane, AUSTRALIA.