From: "mike tiberium" <mike.tiberium@gmail.com>
To: gdb@sourceware.org
Subject: GDB with Ada doesn't print variables neither works with GPS
Date: Sun, 29 Jul 2007 23:20:00 -0000 [thread overview]
Message-ID: <5fd4beb00707291536k64988989t4d029e4390790ea0@mail.gmail.com> (raw)
In-Reply-To: <5fd4beb00707291452j430533b1q37f924b63fdc456c@mail.gmail.com>
Hi,
It seems I'm unable to print variables properly in GDB when debugging
an Ada application. This is the best I can get:
(gdb) p /c Hello_String.all
$1 = (72 'H', 101 'e', 108 'l', 108 'l', 111 'o')
Any way I can solve this? =/
--------------------------------------------------------------------------------------------------------------
I used to be able to debug an Ada application using GNAT-GPS but after
some upgrades (kernel? libc?) things stopped working. Fortunately I
can still debug using GPS on the command line, but without an IDE it's
very hard due to Ada's complicator factor =[
Using GNAT-GPS:
file /path/to/app/hello
Using host libthread_db library "/lib/i686/cmov/libthread_db.so.1".
(gdb) break hello.adb:72
Breakpoint 1 at 0x809a450: file /path/to/app/sources/hello.adb, line 72.
(gdb) start -i data.txt
Breakpoint 2 at 0x809a050: file /path/to/app/sources/hello.adb, line 46.
/dev/ptypd: No such file or directory.
Program exited with code 01.
You can't do that without a process to debug.
(gdb) run -i data.txt
/dev/ptypd: No such file or directory.
Program exited with code 01.
You can't do that without a process to debug.
(gdb)
(gdb) show version
GNU gdb 6.6-debian
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i486-linux-gnu".
When I try to create the device, this is what I get:
cd /dev/ && MAKEDEV ptyp
udev active, devices will be created in /dev/.static/dev/
-----------------------------------------------------------
From the command line:
foomatic@mothership$ gdb
GNU gdb 6.6-debian
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i486-linux-gnu".
(gdb) file /path/to/app/hello
Reading symbols from /path/to/app/hello...done.
Using host libthread_db library "/lib/i686/cmov/libthread_db.so.1".
(gdb) break hello.adb:72
Breakpoint 1 at 0x809a450: file /path/to/app/sources/hello.adb, line 72.
(gdb) start -i data.txt
Breakpoint 2 at 0x809a050: file /path/to/app/sources/hello.adb, line 46.
Starting program: /path/to/app/hello -i data.txt
[Thread debugging using libthread_db enabled]
[New Thread -1217326432 (LWP 6648)]
[Switching to Thread -1217326432 (LWP 6648)]
hello () at /path/to/app/sources/hello.adb:46
46 procedure Parse_File is
(gdb)
Any idea on how to fix this?
My system:
uname -a
Linux foomatic 2.6.21-2-686 #1 SMP Wed Jul 11 03:53:02 UTC 2007 i686 GNU/Linux
cat /proc/version
Linux version 2.6.21-2-686 (Debian 2.6.21-6) (waldi@debian.org) (gcc
version 4.1.3 20070629 (prerelease) (Debian 4.1.2-13)) #1 SMP Wed Jul
11 03:53:02 UTC 2007
-----------------------------------------------------------
Thank you very much.
next parent reply other threads:[~2007-07-29 22:36 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <5fd4beb00707291452j430533b1q37f924b63fdc456c@mail.gmail.com>
2007-07-29 23:20 ` mike tiberium [this message]
2007-07-30 3:21 ` Joel Brobecker
[not found] ` <5fd4beb00707311220s36442a40lf45b0857bfa9196d@mail.gmail.com>
2007-08-01 6:40 ` Joel Brobecker
2007-08-01 0:10 ` debugging the multithreads on PPC embedded platfom Jayasri Sangu
2007-08-01 3:15 ` Eli Zaretskii
2007-08-01 3:22 ` Daniel Jacobowitz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5fd4beb00707291536k64988989t4d029e4390790ea0@mail.gmail.com \
--to=mike.tiberium@gmail.com \
--cc=gdb@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox