From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: How to do basic debugging with Ada? Date: Mon, 05 Jan 2015 08:06:27 +0000 Organization: A noiseless patient Spider Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx02.eternal-september.org; posting-host="da19c0dc8eec016b1dd8c302a793eb7c"; logging-data="15191"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX186GPB2C0+TRgMfqndeJcyRa1JsIP4Ex7U=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (darwin) Cancel-Lock: sha1:EfH676y7f6h6jOqYNilp6fn12J0= sha1:KOTE1CYVySChgFN/7qz+nVRtKTA= Xref: news.eternal-september.org comp.lang.ada:24357 Date: 2015-01-05T08:06:27+00:00 List-Id: John Smith writes: > All the way in the bottom is a simple hello world application. I > compile it using gnatmake hello_world. However, when I load it in gdb > and try to set a breakpoint on the first output line, I get a message > saying that the symbol table is not loaded. If I'm missing a step, > what is it? Use the debug flags and minimal optimisation: -g -O0. $ gnatmake -g -O0 hello_world3.adb gcc -c -g -O0 hello_world3.adb gnatbind -x hello_world3.ali gnatlink hello_world3.ali -g -O0 $ gdb hello_world3 GNU gdb (GDB) 7.7 for GNAT GPL 2014 (20140405) Copyright (C) 2014 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. See your support agreement for details of warranty and support. If you do not have a current support agreement, then there is absolutely no warranty for this version of GDB. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-apple-darwin12.5.0". Type "show configuration" for configuration details.For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from hello_world3...done. (gdb) start Temporary breakpoint 1 at 0x10000140f: file hello_world3.adb, line 5. Starting program: /Users/simon/tmp/hello_world3 Temporary breakpoint 1, hello_world3 () at hello_world3.adb:5 5 Put_Line("Hello, world!"); (gdb)