From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29114 invoked by alias); 19 Jan 2011 19:03:43 -0000 Received: (qmail 29099 invoked by uid 22791); 19 Jan 2011 19:03:42 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 19 Jan 2011 19:03:37 +0000 Received: (qmail 23971 invoked from network); 19 Jan 2011 19:03:36 -0000 Received: from unknown (HELO scottsdale.localnet) (pedro@127.0.0.2) by mail.codesourcery.com with ESMTPA; 19 Jan 2011 19:03:36 -0000 From: Pedro Alves To: gdb-patches@sourceware.org Subject: Re: [patch] Add tests for JIT debugging interface Date: Wed, 19 Jan 2011 19:27:00 -0000 User-Agent: KMail/1.13.5 (Linux/2.6.35-24-generic; KDE/4.5.1; x86_64; ; ) Cc: Paul Pluzhnikov , Yao Qi References: <20110111232641.AE3D5190C55@elbrus2.mtv.corp.google.com> <4D2DDD61.6040101@codesourcery.com> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201101191203.35101.pedro@codesourcery.com> 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: 2011-01/txt/msg00405.txt.bz2 On Wednesday 19 January 2011 10:22:53, Paul Pluzhnikov wrote: > On Wed, Jan 12, 2011 at 8:57 AM, Yao Qi wrote: > > There are still two failures, which are not about 'set args' in > > gdbserver. > > > > FAIL: gdb.base/jit.exp: info function jit_function > > FAIL: gdb.base/jit.exp: info function jit_function > > Yes, I see that as well. > > > info function jit_function^M > > All functions matching regular expression "jit_function":^M > > (gdb) FAIL: gdb.base/jit.exp: info function jit_function > > > > In gdb.log, I find something strange, > > > > (gdb) continue^M > > Continuing.^M > > jit_inferior_init, registering_code = 0^M > > jit_inferior_init, reg_addr = 0x80486c4^M > > jit_inferior_init, jit_descriptor_addr = 0x804a040^M > > Cannot remove breakpoints because program is no longer writable. <-- [1] > > And that. It's output from infrun.c:normal_stop. Sounds like a bug somewhere. > > > There is no such error [1] in native gdb test. I have no clue on this so > > far. > > That's alright -- I was going to fix this area (see "JIT interface > slowness" in gdb@sourceware.org list), and this isn't the only problem -- > I also noticed that we leak several jit_breakpoints on rerun. > > > We may re-write jit-main.c a little bit to compute the location of > > jit-solib.so via getcwd() + argv[0], rather than passing arguments of its > > location. > > Done slightly differently. > > I believe revised patch addresses all comments so far. > > Thanks, > +int main (int argc, char *argv[]) > +{ > + /* These variables are here so they can easily be set from jit.exp */ "main" at column 0. Period, double space. > +gdb_exit > +gdb_start > +gdb_reinitialize_dir $srcdir/$subdir > +gdb_load $binfile gdb_load_shlibs call missing. This will probably need tweaking for remote host testing, but we'll handle it when/if we stumble on it on our testing, probably. Did you try Yao's suggestion of using clean_restart/prepare_for_testing, etc.? We're prefering using those whenever possible. Other than that, this looks fine. Please go ahead. -- Pedro Alves