From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29193 invoked by alias); 13 Jan 2003 22:30:24 -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 29181 invoked from network); 13 Jan 2003 22:30:20 -0000 Received: from unknown (HELO localhost.redhat.com) (216.138.202.10) by 209.249.29.67 with SMTP; 13 Jan 2003 22:30:20 -0000 Received: from redhat.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 3A0E83C63; Mon, 13 Jan 2003 17:30:10 -0500 (EST) Message-ID: <3E233DF2.6010403@redhat.com> Date: Mon, 13 Jan 2003 22:30: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> <3E2315B5.8030003@redhat.com> <0e8401c2bb47$c00d89a0$0202040a@catdog> <3E2332A5.10403@redhat.com> <0ed601c2bb51$818e58d0$0202040a@catdog> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2003-01/txt/msg00214.txt.bz2 >> >> Er, that is a single gdb executable supporting ``multiple architectures''. >> > > > Well then a configure option isn't the answer. A configuration time option answers a problem. Perhaps not your problem. >We build GDBs targetting 5 > different CPUs. At the moment, these are separate binaries so it's an easy > matter to have each binary look for a hard-wired $HOME/.gdbinit-nto. > Someday, however, we want to multi-arch gdb (as we already have with > binutils) so that we can ship one gdb binary. That is where the > configure/compile time setting of the extra gdbinit file falls apart. What > I was asking about earlier was a runtime method of determining the file to > source so that if I use the same binary for multiple targets, I can source a > different file for each one. > > I was thinking that we should put a hook in the code that is run when > switching targets to source a target file based on what gdb thinks its > target is at the time. Loading a file, I think, would be a hack, and a pretty nasty one at that. Several suggstions I think of: - being able to test the architecture from with in a script - being able to attach commands (hooks in gdb parlance) to things like loading a file or adding a new architecture. Andrew