From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 0Ck1EthBlWIQVAkAWB0awg (envelope-from ) for ; Mon, 30 May 2022 18:14:48 -0400 Received: by simark.ca (Postfix, from userid 112) id 45AEF1E221; Mon, 30 May 2022 18:14:48 -0400 (EDT) Authentication-Results: simark.ca; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=DOCNRkoN; dkim-atps=neutral X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-3.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id CCB4D1E01D for ; Mon, 30 May 2022 18:14:47 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 7C381384B124 for ; Mon, 30 May 2022 22:14:47 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7C381384B124 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1653948887; bh=fJDwGx0Q8mLGynmIT0Bg+oHCNmJua9dUz0VQgfmQ6d8=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=DOCNRkoNbyK6lQE9BQcw/DdgWVCSmabez5N9YKmugkzw6p6KhZyK1o8yGJ1Y0pc5b eyk2gUbkFkcdJ3pU3Z3pk0PrUv75yEtwplDf0M5HOKJ3MRLs1iLCHJqKng2IxC5MO5 QRznZKtr26k0vf0Q/lkpM/R9tlpMMah50mAO7gr4= Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by sourceware.org (Postfix) with ESMTPS id 85989384F01C for ; Mon, 30 May 2022 22:12:39 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 85989384F01C Received: from pps.filterd (m0098414.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 24UM0PpY009844; Mon, 30 May 2022 22:12:37 GMT Received: from pps.reinject (localhost [127.0.0.1]) by mx0b-001b2d01.pphosted.com (PPS) with ESMTPS id 3gd6bdr5s1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 30 May 2022 22:12:37 +0000 Received: from m0098414.ppops.net (m0098414.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 24UM3DoV021409; Mon, 30 May 2022 22:12:37 GMT Received: from ppma04ams.nl.ibm.com (63.31.33a9.ip4.static.sl-reverse.com [169.51.49.99]) by mx0b-001b2d01.pphosted.com (PPS) with ESMTPS id 3gd6bdr5rs-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 30 May 2022 22:12:37 +0000 Received: from pps.filterd (ppma04ams.nl.ibm.com [127.0.0.1]) by ppma04ams.nl.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 24UM7JZT006082; Mon, 30 May 2022 22:12:35 GMT Received: from b06cxnps3075.portsmouth.uk.ibm.com (d06relay10.portsmouth.uk.ibm.com [9.149.109.195]) by ppma04ams.nl.ibm.com with ESMTP id 3gbcae377h-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 30 May 2022 22:12:35 +0000 Received: from d06av22.portsmouth.uk.ibm.com (d06av22.portsmouth.uk.ibm.com [9.149.105.58]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 24UMCUZt21365096 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 30 May 2022 22:12:30 GMT Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id C26404C046; Mon, 30 May 2022 22:12:30 +0000 (GMT) Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 7185C4C040; Mon, 30 May 2022 22:12:30 +0000 (GMT) Received: from heavy.ibmuc.com (unknown [9.171.0.196]) by d06av22.portsmouth.uk.ibm.com (Postfix) with ESMTP; Mon, 30 May 2022 22:12:30 +0000 (GMT) To: Tom Tromey , Andrew Burgess Subject: [PATCH v2 5/7] gdb.base/: Introduce jit_compile_options Date: Tue, 31 May 2022 00:11:45 +0200 Message-Id: <20220530221147.1991835-6-iii@linux.ibm.com> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20220530221147.1991835-1-iii@linux.ibm.com> References: <20220530221147.1991835-1-iii@linux.ibm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-GUID: hd8B04KtzJJQhJVvCxG-qShn8h8NfSX1 X-Proofpoint-ORIG-GUID: hHZDxZS1kJIcvpmjEadobToBkSJiJPpG X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.874,Hydra:6.0.517,FMLib:17.11.64.514 definitions=2022-05-30_09,2022-05-30_03,2022-02-23_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 clxscore=1015 suspectscore=0 bulkscore=0 adultscore=0 priorityscore=1501 mlxscore=0 impostorscore=0 malwarescore=0 mlxlogscore=980 lowpriorityscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2204290000 definitions=main-2205300117 X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Ilya Leoshkevich via Gdb-patches Reply-To: Ilya Leoshkevich Cc: Ulrich Weigand , Andreas Arnez , gdb-patches@sourceware.org, Pedro Alves , Ilya Leoshkevich Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" Move setting LOAD_ADDRESS and LOAD_INCREMENT to a separate global variable. This eliminates repetition and is useful for sharing with performance tests. Also make them unsigned long long in order to prevent overflows when using a lot of shared libraries. --- gdb/testsuite/lib/jit-elf-helpers.exp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/gdb/testsuite/lib/jit-elf-helpers.exp b/gdb/testsuite/lib/jit-elf-helpers.exp index b699917f209..7c17178f800 100644 --- a/gdb/testsuite/lib/jit-elf-helpers.exp +++ b/gdb/testsuite/lib/jit-elf-helpers.exp @@ -19,6 +19,9 @@ set jit_load_address 0x7000000 set jit_load_increment 0x1000000 +set jit_compile_options [list \ + additional_flags=-DLOAD_ADDRESS=${jit_load_address}ull \ + additional_flags=-DLOAD_INCREMENT=${jit_load_increment}ull] # Compile jit-elf-main.c as an executable. # @@ -28,12 +31,11 @@ set jit_load_increment 0x1000000 # On success, return 0. # On failure, return -1. proc compile_jit_main {main_srcfile main_binfile options} { - global jit_load_address jit_load_increment + global jit_compile_options set options [concat \ $options \ - additional_flags=-DLOAD_ADDRESS=$jit_load_address \ - additional_flags=-DLOAD_INCREMENT=$jit_load_increment \ + $jit_compile_options \ debug] if { [gdb_compile ${main_srcfile} ${main_binfile} \ @@ -53,12 +55,11 @@ proc compile_jit_main {main_srcfile main_binfile options} { # On success, return 0. # On failure, return -1. proc compile_jit_elf_main_as_so {main_solib_srcfile main_solib_binfile options} { - global jit_load_address jit_load_increment + global jit_compile_options set options [concat \ $options \ - additional_flags=-DLOAD_ADDRESS=$jit_load_address \ - additional_flags=-DLOAD_INCREMENT=$jit_load_increment \ + $jit_compile_options \ debug] if { [gdb_compile_shlib ${main_solib_srcfile} ${main_solib_binfile} \ -- 2.35.3