From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1597 invoked by alias); 13 Jan 2003 19:38:36 -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 1556 invoked from network); 13 Jan 2003 19:38:34 -0000 Received: from unknown (HELO localhost.redhat.com) (216.138.202.10) by sources.redhat.com with SMTP; 13 Jan 2003 19:38:34 -0000 Received: from redhat.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 1E5A63C63; Mon, 13 Jan 2003 14:38:30 -0500 (EST) Message-ID: <3E2315B5.8030003@redhat.com> Date: Mon, 13 Jan 2003 19:38:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0.1) Gecko/20021211 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Kris Warkentin Cc: Elena Zannoni , Fernando Nasser , Felix Lee , gdb@sources.redhat.com Subject: Re: patch to use target specific .gdbinit file References: <200301102242.h0AMgTl02921@paper-wolf-solo.tigerfood.org> <0d6601c2bb1e$70a94670$0202040a@catdog> <3E230B07.8030607@redhat.com> <0e5301c2bb36$1002c400$0202040a@catdog> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2003-01/txt/msg00206.txt.bz2 > Kris, >> >> In the past there was a proposal (patch?) to add a configuration time >> option that would specify a system init file. There was a patch. I >> believe that the actual idea was accepted as sound but the patch was >> lost in the paper trail :-( Can I suggest extending your patch so that >> the mechanism and file are specified at configure time (please don't ask >> me which of --with or --use or --... is the correct option :-). > > > One problem with this (as Felix suggested earlier) is dealing with a gdb > which supports multiple targets. The whole point is to be able to have > per-target init files and hard wiring it in loses that. Specifying at > config time would be okay for enable/disable but I think it would be better > to have some sort of system of nomenclature for extra init files. In this thread? http://sources.redhat.com/ml/gdb/2002-12/msg00328.html The proposal I'm refering to goes way back. It was something like: --enable-system-gdbinit[=$DATAPREFIX/gdbinit] That would make it possible to, for instance, to do things like load in standard shared library paths. If a site really wants to add a site specific configuration specific gdbinit file they can do that as well vis: --enable-system-gdbinit=~/.gdbinit-TARGET --target=TARGET > Here's a question: does a multi-targetted gdb know what it's targetting at > the point of reading the .gdbinit or is this determined later? Is it > switchable per session? I'm thinking that another possibility is to have it > check for .gdbinit-$TARGET at the time that the target is determined. To clarify something here, target and architecture are separate but very related. GDB configured for a certain TARGET, will support one or more architectures. The x86-64, for instance, also supports i386. For a normal GDB session, an architecture will be selected twice. Once for the default, and once based on the file that is loaded. The second selection may occure before, during or after, .gdbinit parsing. The `target' however, won't change. Andrew