From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17975 invoked by alias); 3 Apr 2002 16:47:48 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 17968 invoked from network); 3 Apr 2002 16:47:47 -0000 Received: from unknown (HELO localhost.redhat.com) (66.31.105.161) by sources.redhat.com with SMTP; 3 Apr 2002 16:47:47 -0000 Received: from cygnus.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id CA2183E55; Wed, 3 Apr 2002 11:47:45 -0500 (EST) Message-ID: <3CAB3231.6010801@cygnus.com> Date: Wed, 03 Apr 2002 08:47:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:0.9.9) Gecko/20020328 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Florian Weimer Cc: gdb@sources.redhat.com Subject: Re: GDB 5.2 vs. Ada (and probably other unknown languages) References: <873cyhaubc.fsf@deneb.enyo.de> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2002-04/txt/msg00018.txt.bz2 > It seems that GDB (starting with 5.1.1 or so) can no longer debug > programs written in languages unknown to it. With previous GDB > versions, you could at least set breakpoints, get backtraces, and > examine most variables, although you had to take name mangling into > account. > > For example, if I try to set a breakpoint in an Ada program, I just > get the error message "internal error - unimplemented function > unk_lang_create_fundamental_type called." > > Is there a workaround? Even if full Ada support is not available, > getting backtraces would be helpful in some cases. Definitly sounds like a new (and unknown) regression :-( Can you create a bug report to track this (http://sources.redhat.com/gdb/bugs/). For a workaround, what happens if you enter ``set language c''? There is also a source code dropping of ACT's Ada support in: ftp://sources.redhat.com/pub/gdb/contrib/gnat/ you may find the relevant change in there. Andrew PS: If you're interested in integrating some of the Ada stuff then you'll probably also need to get copyright (to the fsf) assignment in place. > Here's a small, stand-alone test program (you have to compile it using > "gcc -S -g no_debug.adb && gcc no_debug.s", as it doesn't use the Ada > run-time library). > > package No_Debug is > > procedure Main; > pragma Export (C, Main, "main"); > > end No_Debug; > > with System; use System; > > package body No_Debug is > > procedure Puts (Str : Address); > pragma Import (C, Puts, "puts"); > > Message : constant String := "Hello, world!" & ASCII.NUL; > > procedure Main is > begin > Puts (Message'Address); > end Main; > > end No_Debug; > > I've attached the x86 assembler code below, in case you want to > experiment yourself without having to install Ada. > > >