From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4891 invoked by alias); 12 Jan 2011 07:17:39 -0000 Received: (qmail 4879 invoked by uid 22791); 12 Jan 2011 07:17:38 -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 07:17:32 +0000 Received: (qmail 26273 invoked from network); 12 Jan 2011 07:17:30 -0000 Received: from unknown (HELO orlando.localnet) (pedro@127.0.0.2) by mail.codesourcery.com with ESMTPA; 12 Jan 2011 07:17:30 -0000 From: Pedro Alves To: gdb-patches@sourceware.org Subject: Re: [patch] Add tests for JIT debugging interface Date: Wed, 12 Jan 2011 10:03:00 -0000 User-Agent: KMail/1.13.5 (Linux/2.6.33-29-realtime; KDE/4.4.5; x86_64; ; ) Cc: Paul Pluzhnikov References: <20110111232641.AE3D5190C55@elbrus2.mtv.corp.google.com> In-Reply-To: <20110111232641.AE3D5190C55@elbrus2.mtv.corp.google.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201101120717.28184.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/msg00251.txt.bz2 On Tuesday 11 January 2011 23:26:41, Paul Pluzhnikov wrote: > +int main(int argc, char *argv[]) > +{ > + if (argc < 2) > + usage(argv[0]); > + else > + { You're using GNU formatting throughout the file except here. > +proc one_test {count match_str} { > + global solib_binfile gdb_prompt > + > + gdb_test_no_output "set args $solib_binfile $count" "set args" > + if ![runto_main] then { > + fail "Can't run to main" > + return 0 > + } > + > + gdb_breakpoint [gdb_get_line_number "break here 1"] > + gdb_continue_to_breakpoint "break here 1" > + gdb_test "info function jit_function" "$match_str" > + gdb_breakpoint [gdb_get_line_number "break here 2"] > + gdb_continue_to_breakpoint "break here 2" > + # All jit librares must have been unregistered > + gdb_test "info function jit_function" \ > + "All functions matching regular expression \"jit_function\":" Tests should have distinct messages. Since this procedure is ran more than once, you'll have identical output more than once in your gdb.sum. I suggest making use of $pf_prefix (grep will find uses). This is okay with that, and Yao's comments addressed. Thanks much! > +} > + > +one_test 1 "${hex} jit_function_0000" > +one_test 2 "${hex} jit_function_0000\[\r\n\]+${hex} jit_function_0001" -- Pedro Alves