From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id oCpWJWoXUWNYsA4AWB0awg (envelope-from ) for ; Thu, 20 Oct 2022 05:39:54 -0400 Received: by simark.ca (Postfix, from userid 112) id 96D591E112; Thu, 20 Oct 2022 05:39:54 -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=BVeW4olW; 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 4F35A1E0D5 for ; Thu, 20 Oct 2022 05:39:54 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 420C938245DB for ; Thu, 20 Oct 2022 09:38:56 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 420C938245DB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1666258736; bh=R/toRILIdgVeh5Or4MzlwsPwrxE9N1wKmEnr0I9VvtI=; 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=BVeW4olWkzQGZcD5/nlstRxCnkMiPSOn/xpwKuSRKujDMVGZqDdOZQOiJ6WWcIv7U RTEgRcIvQGHSF/c7XDVuDhLDSEy2WNLjErBJLEt6VSEFFOAoICSDDQi+RpPWQV2xvJ 6/msCBxolqByHTMArZWf9vw/j1GxT0QXhkdzkkgM= Received: from mail-sender-0.a4lg.com (mail-sender-0.a4lg.com [IPv6:2401:2500:203:30b:4000:6bfe:4757:0]) by sourceware.org (Postfix) with ESMTPS id 3646A3953829 for ; Thu, 20 Oct 2022 09:38:11 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 3646A3953829 Received: from [127.0.0.1] (localhost [127.0.0.1]) by mail-sender-0.a4lg.com (Postfix) with ESMTPSA id 7BA10300089; Thu, 20 Oct 2022 09:38:09 +0000 (UTC) To: Tsukasa OI , Andrew Burgess , Mike Frysinger , Nick Clifton Subject: [PATCH 30/40] sim/ppc: Use TRACE with initialized entry_point Date: Thu, 20 Oct 2022 09:32:35 +0000 Message-Id: <0093fc2d9dbff0f912ef48fd61a412b3a6378c3c.1666258361.git.research_trasio@irq.a4lg.com> In-Reply-To: References: Mime-Version: 1.0 Content-Transfer-Encoding: 8bit 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: Tsukasa OI via Gdb-patches Reply-To: Tsukasa OI Cc: gdb-patches@sourceware.org Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" On a TRACE call on sim_create_inferior, a variable entry_point is not initialized. This commit moves the TRACE call to where the entry_point is initialized. --- sim/ppc/sim_calls.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sim/ppc/sim_calls.c b/sim/ppc/sim_calls.c index 729f6dcb6f3..eddce4ac00a 100644 --- a/sim/ppc/sim_calls.c +++ b/sim/ppc/sim_calls.c @@ -161,8 +161,6 @@ sim_create_inferior (SIM_DESC sd, char * const *envp) { unsigned_word entry_point; - TRACE(trace_gdb, ("sim_create_inferior(start_address=0x%x, ...)\n", - entry_point)); if (simulator == NULL) error ("No program loaded"); @@ -171,6 +169,8 @@ sim_create_inferior (SIM_DESC sd, entry_point = bfd_get_start_address (abfd); else entry_point = 0xfff00000; /* ??? */ + TRACE(trace_gdb, ("sim_create_inferior(start_address=0x%x, ...)\n", + entry_point)); psim_init(simulator); psim_stack(simulator, argv, envp); -- 2.34.1