From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7318 invoked by alias); 28 Mar 2008 15:24:57 -0000 Received: (qmail 7294 invoked by uid 22791); 28 Mar 2008 15:24:56 -0000 X-Spam-Check-By: sourceware.org Received: from qnxmail.qnx.com (HELO nimbus.ott.qnx.com) (209.226.137.76) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 28 Mar 2008 15:24:38 +0000 Received: by nimbus.ott.qnx.com with Internet Mail Service (5.5.2653.19) id ; Fri, 28 Mar 2008 11:24:35 -0400 Message-ID: <47ED0DAB.1040406@qnx.com> From: Aleksandar Ristovski To: Daniel Jacobowitz Cc: gdb-patches@sourceware.org Subject: Re: [RFC] gdb.mi tests Date: Fri, 28 Mar 2008 15:24:00 -0000 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) user-agent: Thunderbird 2.0.0.12 (Windows/20080213) Content-Type: multipart/mixed; boundary="----_=_NextPart_000_01C890E7.CFDED5E1" X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2008-03/txt/msg00465.txt.bz2 This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. ------_=_NextPart_000_01C890E7.CFDED5E1 Content-Type: text/plain; charset="iso-8859-1" Content-length: 1102 Daniel Jacobowitz wrote: > On Wed, Mar 12, 2008 at 03:18:15PM -0400, Aleksandar Ristovski wrote: >> Attached working diff. Comments welcome. > > I think this patch is OK, if you add a changelog entry for it. Do > you have write access? If not, would you like to? > In the context of this thread, I have reduced the originally proposed diff. Now it is a simple change in mi-support.exp, diff attached. I gave up the removal of "load_lib mi-support.exp" from all tests since, as Daniel pointed out, the overriding can still be done by loading the file in your board file, and after the load_lib statement redefining the functions of interest; load_lib makes sure to not reload already loaded file. Leaving "load_lib mi-support.exp" maybe makes it a bit more clear what file contains functions that can be overridden. Thanks, Aleksandar Ristovski QNX Software Systems 2008-03-28 Aleksandar Ristovski * lib/mi-support.exp: Rename mi_gdb_start to default_mi_gdb_start and add mi_gdb_start to simply call the default one. Brings mi-support in line with gdb.exp. ------_=_NextPart_000_01C890E7.CFDED5E1 Content-Type: text/plain; name="mi-support.diff" Content-Disposition: attachment; filename="mi-support.diff" Content-length: 1492 Index: gdb/testsuite/lib/mi-support.exp =================================================================== RCS file: /cvs/src/src/gdb/testsuite/lib/mi-support.exp,v retrieving revision 1.51 diff -u -p -r1.51 mi-support.exp --- gdb/testsuite/lib/mi-support.exp 29 Jan 2008 19:36:58 -0000 1.51 +++ gdb/testsuite/lib/mi-support.exp 28 Mar 2008 15:07:52 -0000 @@ -84,7 +84,7 @@ proc mi_uncatched_gdb_exit {} { } # -# mi_gdb_start [INFERIOR_PTY] -- start gdb running, default procedure +# default_mi_gdb_start [INFERIOR_PTY] -- start gdb running, default procedure # # INFERIOR_PTY should be set to separate-inferior-tty to have the inferior work # with it's own PTY. If set to same-inferior-tty, the inferior shares GDB's PTY. @@ -94,7 +94,7 @@ proc mi_uncatched_gdb_exit {} { # tests on different hosts all using the same server, things can # get really slow. Give gdb at least 3 minutes to start up. # -proc mi_gdb_start { args } { +proc default_mi_gdb_start { args } { global verbose global GDB global GDBFLAGS @@ -230,6 +230,14 @@ proc mi_gdb_start { args } { return 0; } +# +# Overridable function. You can override this function in your +# baseboard file. +# +proc mi_gdb_start { args } { + return [default_mi_gdb_start $args] +} + # Many of the tests depend on setting breakpoints at various places and # running until that breakpoint is reached. At times, we want to start # with a clean-slate with respect to breakpoints, so this utility proc ------_=_NextPart_000_01C890E7.CFDED5E1--