From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id QjKKGQoFAWIALwAAWB0awg (envelope-from ) for ; Mon, 07 Feb 2022 06:39:54 -0500 Received: by simark.ca (Postfix, from userid 112) id 53BEC1F3C6; Mon, 7 Feb 2022 06:39:54 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) 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.2 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 AEDC61EE1A for ; Mon, 7 Feb 2022 06:39:53 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 0907C385841C for ; Mon, 7 Feb 2022 11:39:53 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0907C385841C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1644233993; bh=VkRwEm5oJnFMoSxeLzvuTq9Kq1wbGt476S9PIczE90s=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=i+JEQW0Bny8s27Gn+QYnmcvQFoKJ8rDy/KoAGrFnLj5x4nhIGQIVfqkNHImIq8y7z Sj+AhQtLGgXHrZH4q6qKwj/hBM8nr4E45PkMES3qlgHyUmfvV7iQdRIZRk/rm+bYdI mhQ/84gg3mBGz9HCb84VZQfS8JK9ytmQVqGMa8gE= Received: from NAM04-DM6-obe.outbound.protection.outlook.com (mail-dm6nam08on2078.outbound.protection.outlook.com [40.107.102.78]) by sourceware.org (Postfix) with ESMTPS id AB6163858D20 for ; Mon, 7 Feb 2022 11:39:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org AB6163858D20 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=idweVX6+3/RPwvIj5h1ybDzr6hN1JbwXq2yZmSZw/hdpkZNjjztaKOTQ1LQpCfqaURZ8FrUjmwdD/NbATNkbvLuYQ70W+wZHLI/vFQNWDUcbvvIr4/rloQcDPviWCRAdoV1+aVtEo8xKypTPfL3/3lByxCHG2TtExeyCmbDLXfY7y9SjsAvlH2S0ecw+NgoQ+9RMBPOVCXGhoev3z7VdXBgW2DZDyUMluUL9d3WwNHk9A0dEU0/lL+s4XgfOGjMM9h7/V4U9neW/bLYaY3fVrWDkIfk1gnACUghkWi8h5/bvhQQFqT6jI30wVMwS1soFn1jEw+E9rk05Ro1FPVLN3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=VkRwEm5oJnFMoSxeLzvuTq9Kq1wbGt476S9PIczE90s=; b=N6rctPBySjLeUgoQkEMwYr5qgh5S+Zbhc1qprg48pvDSXJbKU+LiHjJrSip1WRf9+D6Qvvx4FRX/XIkfnrZj37ELY2yRSLjLenE5gRNHIjkkeKk2dS2EEmiUWDvCqTWZLWLvx2cVJZ57qC4tcrYdXZz28qIrzPQl+b8Y7/pfDfh5k8zG5bsHPHxJu/pXgmGiwAYeFaRocWS1pFw4bVrMzbVH/A0crYRaKrXX36c2vRP2Wp9zEQkd3YPXhVlUIwFB7XPMfsx1SriWO70mOu7W9WV/r1bUMC9gTuPVnsh4ShqqXmwIS0v7BqOnO86KlYwijaVH5gjBonmHXoL98Qez0Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none Received: from DM6PR17MB3113.namprd17.prod.outlook.com (2603:10b6:5:6::10) by BN8PR17MB2898.namprd17.prod.outlook.com (2603:10b6:408:4e::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4951.18; Mon, 7 Feb 2022 11:39:30 +0000 Received: from DM6PR17MB3113.namprd17.prod.outlook.com ([fe80::78f9:3a56:7d30:e2c9]) by DM6PR17MB3113.namprd17.prod.outlook.com ([fe80::78f9:3a56:7d30:e2c9%5]) with mapi id 15.20.4951.018; Mon, 7 Feb 2022 11:39:30 +0000 To: gdb-patches@sourceware.org Subject: [PATCH] gdb: change "maint info jit" to print jit_code_entry::symfile_addr value Date: Mon, 7 Feb 2022 11:39:22 +0000 Message-Id: <20220207113923.2366281-1-jan.vrany@labware.com> X-Mailer: git-send-email 2.30.2 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: LO4P265CA0040.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:2ac::9) To DM6PR17MB3113.namprd17.prod.outlook.com (2603:10b6:5:6::10) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 0ba455d9-8b8b-427e-13a9-08d9ea2e80b8 X-MS-TrafficTypeDiagnostic: BN8PR17MB2898:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:269; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: x/zbAisy0WHTmnjwU87ucVVk/6vzdamNMqRlH9W8+3FemcrW+JVqXLCwA0nAoIw/j7UzjJX3gXXnyHvYMZKNXZLIR8Ed0vaOfIGO1jn0LPy3V19DNdVMOFZrrI1yYzkXJdkl1qIfvSq/QI6IHoXk0cOY3d+brrTNovkRbE2IjqbiBQkdVgdp61VXTbRhfQTC6AX+aDCmL+rv89TVBVJCRsGsEeKpVEtOkgMKJiqp6X1tKDfr8FD9yM4Z4gXcTLnd+w/t1KlYPhKtCVHNsScNBEJ9170vaaLJYJK5e+erGBcXNgx+u8tkKMq030W6cmQzkV7xdykqK2x73XHfPRWl2965Au1xmZVErEE920BwZJhxbIX6EA03b7O9XqvoFiVe/WzMc2QYN3QqZ1HaUOxRgslc3a5V145HO/vGHDbbaGJQAqJ851BijTo21UFH6cjF46x7zv8Lk6L7KtykP6Ca/lzv4rF5onB63KIxlnvxKJk6tUHvJ8izx41wCaGDdOk8QWdmb/svEcO+cINDVWXCbox1+pK5gPSNcjFLLDe4CLQM3RUEMDQjWMkqn8V3eRuzFrMebrrKC399Qw3s1eocyGTOKFJSy/x5/AV92XqEAESmVLS2/RSY7RGp9jbURCSONEVC1MyLKTDnu/nr+kkTvp2WBmzWxvs5wCQKvQXZzWbEv8zv2E8KjKmheFYg0c/op3M01xjC2xvxf/FxEK5Wug== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR17MB3113.namprd17.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(366004)(83380400001)(316002)(6916009)(38100700002)(38350700002)(107886003)(44832011)(8936002)(66556008)(66946007)(66476007)(8676002)(2906002)(4326008)(5660300002)(36756003)(2616005)(52116002)(508600001)(6666004)(6512007)(6506007)(186003)(26005)(1076003)(86362001)(6486002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?oKCvAUgkHNpgpQPsSE2JwOW3jVuBNwJlMV22YOmRhmOhXmrCCTi9GmOowC79?= =?us-ascii?Q?X4y4GnCCQ1OWHi4FFZ7ipCTvd9hCeBUw8+RoXvOpaOO7wtTx7qCjPeW3+6qs?= =?us-ascii?Q?U0cXcwSfTs04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ii?Q?xCJGVoh/F48+wAKheIIqbUuMbzLG6Nn9USFazvpwWKhFcQE0C7AuhJNNHCzq?= =?us-ascii?Q?/wzrmeuzCbE8GJnF8XXXXs7Ayr0uPj0ro2as43k7EHwX45Bzv4v7XeULg99r?= =?us-ascii?Q?OYdBLEkD4luNotkTSkY+MezdFGOMmT6E8W3pra+0JlPmqwLGE/1ghjDw+vd5?= =?us-ascii?Q?bglk8m+JV6CmMl2CPNHHApSMTjaeKS7yYkd5CZfKwhgahut1hep3mF/SqQHZ?= =?us-ascii?Q?GstZidJHvTB7YKvJIqsss+cLqRg0ijrl6iQJG9Ru51MZLfyBNheMP7miCqYc?= =?us-ascii?Q?as9Y3KLPItl6Qk/whFJd1qjHrASgEc75w+JhdlFHqaun7Vv9n7xrdNV39WZ0?= =?us-ascii?Q?opl4mZAN5XpPw1NaapJ2xqUCyzf2Ux1hSAuj5NFnBXk7mLUBjk8948FoO67T?= =?us-ascii?Q?naCPDgx0SABZsiGsWPXd1cjuvMygG/F/5XctEgtmEMcYZp5ur5lXCR1cCCD8?= =?us-ascii?Q?VCTQDl3uSTPwQhRoAJg+fyECo36b4JXtXfSXrlzsydueW0lKvNr5NRt/cdq6?= =?us-ascii?Q?d8ECPikfQU5PrlowSLXNdmHLZIVwp9T4iuUTt2tSDK/fK2Ae8k7Va0VnU9Ju?= =?us-ascii?Q?qLTSNy/n0qTJA7mHef4LUyo=3D?= X-OriginatorOrg: labware.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0ba455d9-8b8b-427e-13a9-08d9ea2e80b8 X-MS-Exchange-CrossTenant-AuthSource: DM6PR17MB3113.namprd17.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Feb 2022 11:39:30.1546 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: b5db0322-1aa0-4c0a-859c-ad0f96966f4c X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: Fq2EjbTQvUEpS2gjUL2NLqLz0ZgmAFJkYLh14o03FxM+jSfXW68dLHlOoqYsbW16EUI5ZQGZ32QAD92PN8qwTA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN8PR17MB2898 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: Jan Vrany via Gdb-patches Reply-To: Jan Vrany Cc: Jan Vrany Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" This commit changes the output of 'maint info jit' command to print jit_code_entry::symfile_addr value rather than address of jit_code_entry itself. This makes it consistent with address included in objfile names (commit 4a620b7e). To access this address, we keep this value in jiter_objfile_data attached to each objfile created by JIT reader API. --- gdb/jit.c | 10 +++++----- gdb/jit.h | 9 +++++++-- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/gdb/jit.c b/gdb/jit.c index 7819d763ab3..420cc80b86a 100644 --- a/gdb/jit.c +++ b/gdb/jit.c @@ -94,7 +94,7 @@ maint_info_jit_cmd (const char *args, int from_tty) printed_header = true; } - printf_filtered (" %s\n", paddress (obj->arch (), obj->jited_data->addr)); + printf_filtered (" %s\n", paddress (obj->arch (), obj->jited_data->symfile_addr)); } } @@ -211,11 +211,11 @@ get_jiter_objfile_data (objfile *objf) at inferior address ENTRY. */ static void -add_objfile_entry (struct objfile *objfile, CORE_ADDR entry) +add_objfile_entry (struct objfile *objfile, CORE_ADDR entry, CORE_ADDR symfile_addr) { gdb_assert (objfile->jited_data == nullptr); - objfile->jited_data.reset (new jited_objfile_data (entry)); + objfile->jited_data.reset (new jited_objfile_data (entry, symfile_addr)); } /* Helper function for reading the global JIT descriptor from remote @@ -644,7 +644,7 @@ jit_object_close_impl (struct gdb_symbol_callbacks *cb, for (gdb_symtab &symtab : obj->symtabs) finalize_symtab (&symtab, objfile); - add_objfile_entry (objfile, priv_data->entry_addr); + add_objfile_entry (objfile, priv_data->entry_addr, priv_data->entry.symfile_addr); delete obj; } @@ -773,7 +773,7 @@ JITed symbol file is not an object file, ignoring it.\n")); &sai, OBJF_SHARED | OBJF_NOT_FILENAME, NULL); - add_objfile_entry (objfile, entry_addr); + add_objfile_entry (objfile, entry_addr, code_entry->symfile_addr); } /* This function registers code associated with a JIT code entry. It uses the diff --git a/gdb/jit.h b/gdb/jit.h index 09dbce21f5c..10a10dade7f 100644 --- a/gdb/jit.h +++ b/gdb/jit.h @@ -95,12 +95,17 @@ struct jiter_objfile_data struct jited_objfile_data { - jited_objfile_data (CORE_ADDR addr) - : addr (addr) + jited_objfile_data (CORE_ADDR addr, CORE_ADDR symfile_addr) + : addr (addr), + symfile_addr (symfile_addr) {} /* Address of struct jit_code_entry for this objfile. */ CORE_ADDR addr; + + /* Value of jit_code_entry->symfile_addr for this objfile. */ + CORE_ADDR symfile_addr; + }; /* Re-establish the jit breakpoint(s). */ -- 2.30.2