From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10565 invoked by alias); 29 Jul 2007 22:36:18 -0000 Received: (qmail 10556 invoked by uid 22791); 29 Jul 2007 22:36:16 -0000 X-Spam-Check-By: sourceware.org Received: from rv-out-0910.google.com (HELO rv-out-0910.google.com) (209.85.198.185) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sun, 29 Jul 2007 22:36:14 +0000 Received: by rv-out-0910.google.com with SMTP id g11so278751rvb for ; Sun, 29 Jul 2007 15:36:12 -0700 (PDT) Received: by 10.141.137.8 with SMTP id p8mr187742rvn.1185748572669; Sun, 29 Jul 2007 15:36:12 -0700 (PDT) Received: by 10.141.13.19 with HTTP; Sun, 29 Jul 2007 15:36:12 -0700 (PDT) Message-ID: <5fd4beb00707291536k64988989t4d029e4390790ea0@mail.gmail.com> Date: Sun, 29 Jul 2007 23:20:00 -0000 From: "mike tiberium" To: gdb@sourceware.org Subject: GDB with Ada doesn't print variables neither works with GPS In-Reply-To: <5fd4beb00707291452j430533b1q37f924b63fdc456c@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <5fd4beb00707291452j430533b1q37f924b63fdc456c@mail.gmail.com> Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2007-07/txt/msg00202.txt.bz2 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.