From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4072 invoked by alias); 21 Nov 2001 22:38:21 -0000 Mailing-List: contact insight-help@sourceware.cygnus.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: insight-owner@sources.redhat.com Received: (qmail 4008 invoked from network); 21 Nov 2001 22:38:14 -0000 To: Keith Seitz Cc: Insight List Subject: Re: Startup with --args References: X-Zippy: LOOK!!! I'm WALKING in my SLEEP again!! X-Attribution: Tom Reply-To: tromey@redhat.com From: Tom Tromey Date: Thu, 04 Oct 2001 18:08:00 -0000 In-Reply-To: Keith Seitz's message of "Tue, 20 Nov 2001 16:53:03 -0800 (PST)" Message-ID: <87d72biwbh.fsf@creche.redhat.com> X-Mailer: Gnus v5.7/Emacs 20.5 X-SW-Source: 2001-q4/txt/msg00051.txt.bz2 >>>>> "Keith" == Keith Seitz writes: >> I've been running with my --args patch installed for a while now. >> Hopefully it will get its final approval soon. Keith> Are you waiting on me for something? Nope. I think (but I still have to check) that I got the last approval for that patch from Elena today. Keith> Is there a way to do this without modifying Keith> session_notice_file_change? I don't know. It seems to me that Keith> if we want to override the session's arguments, we should just Keith> do that. It never occurred to me. Unbelievable. How about the appended? It is much simpler. Tom Index: ChangeLog from Tom Tromey * library/interface.tcl (gdbtk_tcl_preloop): Override session's command-line arguments if required. Index: library/interface.tcl =================================================================== RCS file: /cvs/src/src/gdb/gdbtk/library/interface.tcl,v retrieving revision 1.32 diff -u -r1.32 interface.tcl --- library/interface.tcl 2001/11/19 18:43:19 1.32 +++ library/interface.tcl 2001/11/21 22:36:53 @@ -113,8 +113,14 @@ if {$gdb_exe_name != ""} { # At startup, file_changed_hook is called too late for us, so we - # must notice the initial session by hand. + # must notice the initial session by hand. If the arguments exist + # -- if the user used `gdb --args' -- then we want the new + # arguments to override the session's arguments. + set current_args [gdb_get_inferior_args] session_notice_file_change + if {[string length $current_args] > 0} { + gdb_set_inferior_args $current_args + } } gdbtk_update From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tom Tromey To: Keith Seitz Cc: Insight List Subject: Re: Startup with --args Date: Wed, 21 Nov 2001 14:38:00 -0000 Message-ID: <87d72biwbh.fsf@creche.redhat.com> References: X-SW-Source: 2001-q4/msg00352.html Message-ID: <20011121143800.pKMYJdSu15j-DVCCojkGfwHPrfeA2hVfk-ec0XHave4@z> >>>>> "Keith" == Keith Seitz writes: >> I've been running with my --args patch installed for a while now. >> Hopefully it will get its final approval soon. Keith> Are you waiting on me for something? Nope. I think (but I still have to check) that I got the last approval for that patch from Elena today. Keith> Is there a way to do this without modifying Keith> session_notice_file_change? I don't know. It seems to me that Keith> if we want to override the session's arguments, we should just Keith> do that. It never occurred to me. Unbelievable. How about the appended? It is much simpler. Tom Index: ChangeLog from Tom Tromey * library/interface.tcl (gdbtk_tcl_preloop): Override session's command-line arguments if required. Index: library/interface.tcl =================================================================== RCS file: /cvs/src/src/gdb/gdbtk/library/interface.tcl,v retrieving revision 1.32 diff -u -r1.32 interface.tcl --- library/interface.tcl 2001/11/19 18:43:19 1.32 +++ library/interface.tcl 2001/11/21 22:36:53 @@ -113,8 +113,14 @@ if {$gdb_exe_name != ""} { # At startup, file_changed_hook is called too late for us, so we - # must notice the initial session by hand. + # must notice the initial session by hand. If the arguments exist + # -- if the user used `gdb --args' -- then we want the new + # arguments to override the session's arguments. + set current_args [gdb_get_inferior_args] session_notice_file_change + if {[string length $current_args] > 0} { + gdb_set_inferior_args $current_args + } } gdbtk_update