From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26060 invoked by alias); 29 Jul 2007 23:20:03 -0000 Received: (qmail 26052 invoked by uid 22791); 29 Jul 2007 23:20:02 -0000 X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sun, 29 Jul 2007 23:20:00 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 0642B2AA126; Sun, 29 Jul 2007 19:19:59 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 24yWNnkAiwnK; Sun, 29 Jul 2007 19:19:58 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id BD3262AA124; Sun, 29 Jul 2007 19:19:58 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id A2939E7B54; Sun, 29 Jul 2007 16:23:07 -0700 (PDT) Date: Mon, 30 Jul 2007 03:21:00 -0000 From: Joel Brobecker To: mike tiberium Cc: gdb@sourceware.org Subject: Re: GDB with Ada doesn't print variables neither works with GPS Message-ID: <20070729232307.GA3758@adacore.com> References: <5fd4beb00707291452j430533b1q37f924b63fdc456c@mail.gmail.com> <5fd4beb00707291536k64988989t4d029e4390790ea0@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5fd4beb00707291536k64988989t4d029e4390790ea0@mail.gmail.com> User-Agent: Mutt/1.4.2.2i 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/msg00203.txt.bz2 > 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') The only thing that you are missing here is the fact that this string is not printed as a usual string but instead an array of characters. I suspect that the reason that GDB does not identify your object as a string is incomplete/incorrect debugging info. What does ptype Hello_String.all say? It should say "array of character". If it doesn't then, the GDB output is expected. For your GPS issues, it's most likely an issue with your kernel configuration, but I can't help you with that. -- Joel