From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28422 invoked by alias); 13 Dec 2006 23:26:20 -0000 Received: (qmail 28388 invoked from network); 13 Dec 2006 23:26:06 -0000 Received: from unknown (195.23.133.211) by sourceware.org with QMTP; 13 Dec 2006 23:26:06 -0000 Received: (qmail 27701 invoked from network); 13 Dec 2006 23:26:05 -0000 Received: from unknown (HELO mailfrt06.isp.novis.pt) ([195.23.133.198]) (envelope-sender ) by mailrly01.isp.novis.pt with compressed SMTP; 13 Dec 2006 23:26:05 -0000 Received: (qmail 19521 invoked from network); 13 Dec 2006 23:26:05 -0000 Received: from unknown (HELO [127.0.0.1]) ([195.23.225.140]) (envelope-sender ) by mailfrt06.isp.novis.pt with SMTP; 13 Dec 2006 23:26:05 -0000 Message-ID: <45808C03.3040900@portugalmail.pt> Date: Wed, 13 Dec 2006 23:26:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; pt-BR; rv:1.8.0.8) Gecko/20061025 Thunderbird/1.5.0.8 Mnenhy/0.7.4.0 MIME-Version: 1.0 To: gdb-patches Subject: Re: [PATCH 2] Fix gdb.mi/mi-file.exp for stubs. References: <45808168.9010601@portugalmail.pt> In-Reply-To: <45808168.9010601@portugalmail.pt> Content-Type: multipart/mixed; boundary="------------070504060602070508020200" X-Antivirus: avast! (VPS 0658-0, 13-12-2006), Outbound message X-Antivirus-Status: Clean 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: 2006-12/txt/msg00186.txt.bz2 This is a multi-part message in MIME format. --------------070504060602070508020200 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-length: 1347 Pedro Alves escreveu: > Hi all, > > There is a comment on mi-file.exp that says: > > # get the path and absolute path to the current executable > # > # In gdb 6.2 (at least), the default line number is set by > # select_source_symtab to the first line of "main" minus > # the value of "lines_to_list" (which defaults to 10) plus one. > # --chastain 2004-08-13 > > That won't work for remote stubs. > > The attached patch adds a call to mi_run_to_main with the following > comment: > > # When debugging a stub, we can't depend on the current file > # being the default file set by select_source_symtab. > # When the gdb host connects to the stub, the stub will already be > # running the target program stopped at a function > # that probably isn't the one with main. We force > # the file with main to be the current, so the following tests work. > I withdraw this patch. It doesn't fix anything... I misread the testresults. Sorry for the noise. Instead, I propose skipping the test when running the testsuite against a stub. Also, the mi2-file.exp test has the same problem. Please find a new patch attached, review and commit. Cheers, Pedro Alves --- 2006-12-13 Pedro Alves * gdb.mi/mi-file.exp: Skip test if use_gdb_stub is set. * gdb.mi/mi2-file.exp: Likewise. --------------070504060602070508020200 Content-Type: text/plain; name="mi-files.exp.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="mi-files.exp.diff" Content-length: 1624 Index: mi-file.exp =================================================================== RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/mi-file.exp,v retrieving revision 1.7 diff -u -p -r1.7 mi-file.exp --- mi-file.exp 12 Sep 2006 20:11:42 -0000 1.7 +++ mi-file.exp 13 Dec 2006 23:21:31 -0000 @@ -25,6 +25,18 @@ # but to verify the correct output response to MI operations. # +if [target_info exists use_gdb_stub] { + + # When debugging a stub, we can't depend on the current file + # being the default file set by select_source_symtab. + # When the gdb host connects to the stub, the stub will already be + # running the target program stopped at a function + # that probably isn't the one with main. + + verbose "Skipping mi-file.exp." + continue +} + load_lib mi-support.exp set MIFLAGS "-i=mi" Index: mi2-file.exp =================================================================== RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/mi2-file.exp,v retrieving revision 1.7 diff -u -p -r1.7 mi2-file.exp --- mi2-file.exp 10 Aug 2006 05:27:21 -0000 1.7 +++ mi2-file.exp 13 Dec 2006 23:21:31 -0000 @@ -25,6 +25,18 @@ # but to verify the correct output response to MI operations. # +if [target_info exists use_gdb_stub] { + + # When debugging a stub, we can't depend on the current file + # being the default file set by select_source_symtab. + # When the gdb host connects to the stub, the stub will already be + # running the target program stopped at a function + # that probably isn't the one with main. + + verbose "Skipping mi-file.exp." + continue +} + load_lib mi-support.exp set MIFLAGS "-i=mi2" --------------070504060602070508020200--