From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23449 invoked by alias); 5 Jan 2008 13:58:22 -0000 Received: (qmail 23441 invoked by uid 22791); 5 Jan 2008 13:58:21 -0000 X-Spam-Check-By: sourceware.org Received: from romy.inter.net.il (HELO romy.inter.net.il) (213.8.233.24) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sat, 05 Jan 2008 13:58:02 +0000 Received: from HOME-C4E4A596F7 (IGLD-80-230-71-78.inter.net.il [80.230.71.78]) by romy.inter.net.il (MOS 3.7.3-GA) with ESMTP id JUY32785 (AUTH halo1); Sat, 5 Jan 2008 15:57:33 +0200 (IST) Date: Sat, 05 Jan 2008 13:58:00 -0000 Message-Id: From: Eli Zaretskii To: Joel Brobecker CC: gdb-patches@sourceware.org In-reply-to: <20080104151340.GC3758@adacore.com> (message from Joel Brobecker on Fri, 4 Jan 2008 07:13:40 -0800) Subject: Re: [commit/Ada] Add handling of "ptype TYPE_NAME.FIELD0.[...].FIELDN" expressions Reply-to: Eli Zaretskii References: <20080104151340.GC3758@adacore.com> X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2008-01/txt/msg00078.txt.bz2 > Date: Fri, 4 Jan 2008 07:13:40 -0800 > From: Joel Brobecker > > The subject says it all. Before the patch, you could do: > > (gdb) ptype type_name > > But if you wanted to get the type of one field inside that type, > you would hit a limitation: > > (gdb) ptype circle.pos > Invalid attempt to select from type: "circle.pos". > > The attached patch enhances the debugger to able to do the above. > > 2008-01-04 Joel Brobecker > > * ada-exp.y (chop_separator): New function. > (write_selectors): Rewrite to re-use chop_separator. > (ada_nget_field_index, get_symbol_field_type): New functions. > (write_var_or_type): Add support for "ptype TYPENAME.FIELD" > expressions. Is this an Ada-only problem? If not, why are we fixing it only for Ada?