From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14324 invoked by alias); 12 Jan 2011 05:39:46 -0000 Received: (qmail 14314 invoked by uid 22791); 12 Jan 2011 05:39:44 -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, 12 Jan 2011 05:39:37 +0000 Received: (qmail 1191 invoked from network); 12 Jan 2011 05:39:36 -0000 Received: from unknown (HELO ?198.18.137.225?) (yao@127.0.0.2) by mail.codesourcery.com with ESMTPA; 12 Jan 2011 05:39:36 -0000 Message-ID: <4D2D3E94.4070509@codesourcery.com> Date: Wed, 12 Jan 2011 07:02:00 -0000 From: Yao Qi User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.13) Gecko/20101208 Thunderbird/3.1.7 MIME-Version: 1.0 To: Paul Pluzhnikov CC: "gdb-patches@sourceware.org" Subject: Re: [patch] Add tests for JIT debugging interface References: <20110111232641.AE3D5190C55@elbrus2.mtv.corp.google.com> In-Reply-To: <20110111232641.AE3D5190C55@elbrus2.mtv.corp.google.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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/msg00249.txt.bz2 On 01/11/2011 05:26 PM, Paul Pluzhnikov wrote: > + > +int main(int argc, char *argv[]) > +{ > + if (argc< 2) > + usage(argv[0]); > + else > + { > + const char *const libname = argv[1]; > + int i, fd, count = 1; > + struct stat st; > + > + if (argc> 2) > + count = atoi (argv[2]); > + > + if ((fd = open (libname, O_RDONLY)) == -1) > + { > + fprintf (stderr, "open (\"%s\", O_RDONLY): %s\n", libname, strerror (errno)); This line is too long. > + exit (1); > + } > + > + if (fstat (fd,&st) != 0) > + { > + fprintf (stderr, "fstat (\"%d\"): %s\n", fd, strerror (errno)); > + exit (1); > + } > + > + for (i = 0; i< count; ++i) > + { > + const void *const addr = mmap (0, st.st_size, PROT_READ|PROT_WRITE, MAP_PRIVATE, fd, 0); This line is too long as well. > +# Start with a fresh gdb. > + > +gdb_exit > +gdb_start > +gdb_reinitialize_dir $srcdir/$subdir > +gdb_load $binfile > + We can use "clean_restart" here. > +proc one_test {count match_str} { > + global solib_binfile gdb_prompt I don't find any usage of "gdb_prompt", we probably remove it. Test cases work well in native GDB. Does gdbserver have JIT debugging interface also? If not, we probably should skip this test for remote mode or kfail it. -- Yao Qi