From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5758 invoked by alias); 16 Mar 2002 01:11:57 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 5679 invoked from network); 16 Mar 2002 01:11:48 -0000 Received: from unknown (HELO mail-out1.apple.com) (17.254.0.52) by sources.redhat.com with SMTP; 16 Mar 2002 01:11:48 -0000 Received: from mailgate1.apple.com (A17-128-100-225.apple.com [17.128.100.225]) by mail-out1.apple.com (8.11.3/8.11.3) with ESMTP id g2G1BmQ19380 for ; Fri, 15 Mar 2002 17:11:48 -0800 (PST) Received: from scv3.apple.com (scv3.apple.com) by mailgate1.apple.com (Content Technologies SMTPRS 4.2.1) with ESMTP id ; Fri, 15 Mar 2002 17:11:24 -0800 Received: from inghji (inghji.apple.com [17.202.40.220]) by scv3.apple.com (8.11.3/8.11.3) with ESMTP id g2G1BlX07863; Fri, 15 Mar 2002 17:11:47 -0800 (PST) Date: Fri, 15 Mar 2002 17:11:00 -0000 Subject: Re: add set cp-abi command Content-Type: text/plain; charset=US-ASCII; format=flowed Mime-Version: 1.0 (Apple Message framework v481) Cc: gdb-patches@sources.redhat.com To: Daniel Jacobowitz From: Jim Ingham In-Reply-To: <20020314162627.A9503@nevyn.them.org> Message-Id: Content-Transfer-Encoding: 7bit X-Mailer: Apple Mail (2.481) X-SW-Source: 2002-03/txt/msg00250.txt.bz2 Oops, I muffed one line in the patch I sent. The line: static struct cp_abi_ops current_cp_abi; should be: static struct cp_abi_ops current_cp_abi = {"auto", NULL}; We do intend for auto to be the initial "current" abi, but we can't be sure when this will be done (and currently the initializers for gnu-v2-abi.c & gnu-v3-abi.c run BEFORE the cp-abi.c initializer). I could fix this, but it is better to make the order not matter. Jim On Thursday, March 14, 2002, at 01:26 PM, Daniel Jacobowitz wrote: > On Thu, Mar 14, 2002 at 01:14:09PM -0800, Jim Ingham wrote: >> Thanks... I am not sure it is really worth the effort. It is not >> really something we want to encourage folks to do, after all, and in >> time the issue will fade away... > > Very true. And by definition, there should really only be one ABI... > if it comes up as a bug again somewhere else, we can look into this. > >>>> *************** >>>> *** 103,109 **** >>>> --- 106,164 ---- >>>> int i; >>>> for (i = 0; i < num_cp_abis; i++) >>>> if (strcmp (cp_abis[i].shortname, short_name) == 0) >>>> + { >>>> current_cp_abi = cp_abis[i]; >>>> return 1; >>>> + } >>>> + >>>> + return 0; >>>> + } >>> >>> Indentation, of course. >> >> This is actually mailer mangling, it was right in the sources. $%#$#$$# >> GUI mailers... > > Well, unless your mailer ate a "+" at the beginning of "return 1;", it > wasn't right in the mail. That line is moving over. I'm sure you'll > have it right when you commit it :) > >>> "currently selected C++ ABI", please. >> >> As you wish... > > Thanks. We may not have consistent grammar or spelling in our messages > right now, but I'm still all over trying. > >>>> + ui_out_field_string (uiout, "cp-abi", current_cp_abi.shortname); >>>> + ui_out_text (uiout, ".\n"); >>>> + } >>>> + >>>> + void >>>> + show_cp_abis_cmd (char *args, int from_tty) >>>> + { >>>> + int i; >>>> + ui_out_text (uiout, "The valid cplus abi's are:\n"); >>> >>> "C++ ABIs" (or ABI's? ABIs, I think, if there isn't a precedent) >> >> We actually checked Strunk & White, and as of the mid 30's, this should >> be ABIs... > > "ABIs" looks like what I remember, too, so let's use that. > >>> I believe 'show cp-abi' should show the available ABIs. That's more >>> in >>> keeping with existing code. >> >> How would you find out the current ABI, then? Probably better is to >> chuck the show abis, and let "set cp-abi" (with no arguments) perform >> this function. This is the way "set language" works, so it has >> precedent. I was sure that there was another command that used the >> singular lists current, plural lists all, but I can't find it so >> maybe I >> was just out of my mind... > > Shall we agree to mimic "set language", then? > > [For anyone following along: > > (gdb) set language > The currently understood settings are: > > local or auto Automatic setting based on source file > c Use the C language > c++ Use the C++ language > asm Use the Asm language > chill Use the Chill language > fortran Use the Fortran language > java Use the Java language > modula-2 Use the Modula-2 language > pascal Use the Pascal language > scheme Use the Scheme language > (gdb) show language > The current source language is "auto; currently c". > > ] > > -- > Daniel Jacobowitz Carnegie Mellon University > MontaVista Software Debian GNU/Linux Developer > -- Jim Ingham jingham@apple.com Developer Tools - gdb Apple Computer