comp.lang.ada
 help / color / mirror / Atom feed
From: John Smith <yoursurrogategod@gmail.com>
Subject: Re: How to do basic debugging with Ada?
Date: Wed, 7 Jan 2015 19:40:31 -0800 (PST)
Date: 2015-01-07T19:40:31-08:00	[thread overview]
Message-ID: <af5d46ed-d003-4b87-85aa-d59d3f5d0208@googlegroups.com> (raw)
In-Reply-To: <lysifpfy7w.fsf@pushface.org>

*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 <you...@gmail.com> 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 <http://gnu.org/licenses/gpl.html>
> 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)

  reply	other threads:[~2015-01-08  3:40 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-05  2:52 How to do basic debugging with Ada? John Smith
2015-01-05  3:41 ` Hubert
2015-01-05  3:43 ` brbarkstrom
2015-01-05  8:06 ` Simon Wright
2015-01-08  3:40   ` John Smith [this message]
2015-01-05  9:15 ` jsquirek
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox