comp.lang.ada
 help / color / mirror / Atom feed
From: Simon Wright <simon@pushface.org>
Subject: Re: How to do basic debugging with Ada?
Date: Mon, 05 Jan 2015 08:06:27 +0000
Date: 2015-01-05T08:06:27+00:00	[thread overview]
Message-ID: <lysifpfy7w.fsf@pushface.org> (raw)
In-Reply-To: cdd98247-e9d6-49cf-87af-8d97d0c99f4d@googlegroups.com

John Smith <yoursurrogategod@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)

  parent reply	other threads:[~2015-01-05  8:06 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 [this message]
2015-01-08  3:40   ` John Smith
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