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,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.43.78.198 with SMTP id zn6mr5883654icb.12.1420688431448; Wed, 07 Jan 2015 19:40:31 -0800 (PST) X-Received: by 10.140.28.180 with SMTP id 49mr144331qgz.4.1420688431314; Wed, 07 Jan 2015 19:40:31 -0800 (PST) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!feeder.eternal-september.org!newsfeed.fsmpi.rwth-aachen.de!newsfeed.straub-nv.de!feeder1-2.proxad.net!proxad.net!feeder2-2.proxad.net!nx01.iad01.newshosting.com!newshosting.com!69.16.185.112.MISMATCH!peer02.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!h15no845878igd.0!news-out.google.com!n9ni2qai.0!nntp.google.com!bm13no302603qab.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Wed, 7 Jan 2015 19:40:31 -0800 (PST) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=50.138.174.211; posting-account=AvekzAoAAABj-TclKcOWQmXwA49MFPGX NNTP-Posting-Host: 50.138.174.211 References: User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: How to do basic debugging with Ada? From: John Smith Injection-Date: Thu, 08 Jan 2015 03:40:31 +0000 Content-Type: text/plain; charset=ISO-8859-1 X-Received-Bytes: 2998 X-Received-Body-CRC: 2777179458 Xref: news.eternal-september.org comp.lang.ada:24466 Date: 2015-01-07T19:40:31-08:00 List-Id: *facepalm* I should have known better. At the time, it didn't occur to me that running just gnatmake (or just gnat) would permit me to see a bunch of options when it comes to compile options or debugging. Thanks everyone. On Monday, January 5, 2015 3:06:28 AM UTC-5, Simon Wright wrote: > 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)