From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6428 invoked by alias); 13 Jan 2003 16:12:11 -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 6420 invoked from network); 13 Jan 2003 16:12:07 -0000 Received: from unknown (HELO hub.ott.qnx.com) (209.226.137.76) by 209.249.29.67 with SMTP; 13 Jan 2003 16:12:07 -0000 Received: from smtp.ott.qnx.com (smtp.ott.qnx.com [10.0.2.158]) by hub.ott.qnx.com (8.9.3/8.9.3) with ESMTP id LAA26075; Mon, 13 Jan 2003 11:03:30 -0500 Received: from catdog ([10.4.2.2]) by smtp.ott.qnx.com (8.8.8/8.6.12) with SMTP id LAA31324; Mon, 13 Jan 2003 11:11:55 -0500 Message-ID: <0d6601c2bb1e$70a94670$0202040a@catdog> From: "Kris Warkentin" To: "Felix Lee" , References: <200301102242.h0AMgTl02921@paper-wolf-solo.tigerfood.org> Subject: Re: patch to use target specific .gdbinit file Date: Mon, 13 Jan 2003 16:12:00 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 X-SW-Source: 2003-01/txt/msg00201.txt.bz2 ----- Original Message ----- From: "Felix Lee" To: Sent: Friday, January 10, 2003 5:42 PM Subject: Re: patch to use target specific .gdbinit file > "Kris Warkentin" : > > The following code will allow backend writers to define > > EXTRA_GDBINIT_FILENAME to be an alternate filename for sourcing on startup. > > For example, since we have gdb versions for 5 different CPU targets, we > > allow users to create a $HOME/.ntoCPU-gdbinit. > > 1, I'd rather it be a generalized name, like maybe > .gdbinit-$TARGET. making the name something chosen by the > backend writer feels like it adds unnecessary irregularity. I don't care about the name that much - the reason we did this was to give the option to backend writers as to whether they wanted it or not. We could do something like define GDBINIT_TARGET_SUFFIX which would just create .gdbinit-GDBINIT_TARGET_SUFFIX if that's better. > 2, this is going to make it more awkward to create a single > gdb that will debug multiple targets. Is there any sort of TARGET variable that is set at runtime that I could use? Then we could just do something like #ifdef ENABLE_EXTRA_GDBINIT and then it would just construct .gdbinit-$TARGET like you suggested. I like your suggestion better, the only problem being how we generalize the filename in a consistent and simple way. It would suck if you wound up with .gdbinit-nto-i386-some-stupid-target-stuff as your filename. ;-) Can you offer any suggestions? cheers, Kris