From patchwork Thu Mar 28 18:21:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 783635 Delivered-To: patch@linaro.org Received: by 2002:a5d:4e01:0:b0:33e:7753:30bd with SMTP id p1csp2871218wrt; Thu, 28 Mar 2024 11:22:28 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVf75XeBP+H8K6napBMbw2j8dVHNnouT+pbCfI70js16geDpW/ksTsMk8sRANn0KYHN14g0h6RLaSaWFGuVFh3t X-Google-Smtp-Source: AGHT+IFzVIw9kyJigvrGziMLG5YCqIS34RHG762WitC43w2bQTqkWbXUy5PLjwR20aRDqObl/dj6 X-Received: by 2002:aca:170d:0:b0:3c3:dd82:a1df with SMTP id j13-20020aca170d000000b003c3dd82a1dfmr43752oii.32.1711650148729; Thu, 28 Mar 2024 11:22:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1711650148; cv=none; d=google.com; s=arc-20160816; b=YmR9IyyjVLnWF9e14VOaxercNio9hweBETO+PSfuG2FJh95mw9Hj05u44faPYu3zQV HaInKuzX2KHJLKFBQqpHYcNs7NRyqTN01AmPk2+PiJONtjp4v7yXim9HPvqTjo+Mudcm n6ntKemyL+yTAFNMFs3p1vFyu+oe2EKtZDbyJWBjhi2jYSrQibvN3EetyvPT5I+JhwYr dAxLT5f7DDE9NN5yDQV57alhmUVZ+lShJPenvTu5YasjYLeZlvu3gqg0JSLeHJ6jvOxu TcU4oke4EsBQ4m5GlGBJHp6Piy4QRgxAvhY0GEqRJf4NHsROoIf5KHDmb6gUVhaSMbQC u6rg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:to:from:dkim-signature; bh=1pFViSSelBLDC7jQWPNWKQ58HUVyc3Kf8+NgXdrfBUc=; fh=PnYt+qEB9tAfMKoqBm2xjKOFpYyFFGPudh5cVIoieJM=; b=xYebWdIuqfK6Zda7gugrICxIql72o5JfEOehT0M+h+oWfxj8R9IvhsxzdRrjeCn6b0 g47HktYwsky4Q9v2Z+SuEYUTxa54pSJ6LItuMKqCkpuPULKmeROQW099aJyV7qn5AvYw 3D0QzeHWOL+83QPTHlL2ucf24heaWN9xbWtN3qPxnia2Il9sRzW9lgWH5XBM7Zn0o4nc idyCLlFWLZVFGHrBgZKAt57R3T0+ZXJXkAfPAyyX1ftTU/k9NLx82CFiTZxZBxc0aopT d5gfp0mI55QwBMW+DdnGdrR9/b6Yr/Ph7ueF9nqSp1BCqViipIe+JqZbTjtVku9+uGRq 3UWw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=WC3v60+U; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id t19-20020a05620a451300b007887490bf7bsi2254420qkp.140.2024.03.28.11.22.28 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 28 Mar 2024 11:22:28 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=WC3v60+U; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rpuNO-0001by-OH; Thu, 28 Mar 2024 14:21:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rpuNN-0001bm-Cj for qemu-devel@nongnu.org; Thu, 28 Mar 2024 14:21:21 -0400 Received: from mail-oo1-xc32.google.com ([2607:f8b0:4864:20::c32]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rpuNL-0006CZ-QA for qemu-devel@nongnu.org; Thu, 28 Mar 2024 14:21:21 -0400 Received: by mail-oo1-xc32.google.com with SMTP id 006d021491bc7-5a467dae51dso447513eaf.1 for ; Thu, 28 Mar 2024 11:21:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1711650078; x=1712254878; darn=nongnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date:message-id:reply-to; bh=1pFViSSelBLDC7jQWPNWKQ58HUVyc3Kf8+NgXdrfBUc=; b=WC3v60+U1hM4ve9DWcPktZrRGR4r2g+wsfK+xEMRZKZcpSmP+FqvLnoVGdajW8o1a9 sTaWeSiIC/RoH45Be+0WBds0PrJeeJMmpsNHHdvEhMEcUC5hcjE1LDCB7yyey+PNp4J9 +MLk265IlOQHBEwZ98bDkiTB17MR3bYeWC3HkBMKKUPw3x3hFCuUs/ZRipolCHjbkeNj +kCqEB+IRPdOjjfPGjBWEoSwbGgOAXGP6YzYToMTXUxlyOaZ0oZPb3XCcqpMan6dW6Jm zCbfxNyE+4OUEvKZleYALcGZkXQCDwDAjtVTIIxGaaBuQNoM6MmPVLcyyal2eSF+knYL 3V9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711650078; x=1712254878; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=1pFViSSelBLDC7jQWPNWKQ58HUVyc3Kf8+NgXdrfBUc=; b=vQcfF0Le5dpcg3M7C5k+hihkRFfPBQfjasVcXzEX1jeb1YRQs4eBG8rQ3TrjalavGU Vo7En4vSbrSnpC4/8P49uUZUVZIMVgB/xbDuIhXk8I4hIx+//uD7ZGs9qdCku6vbnFqw 5lteZ5Bb+4CrW0OLHVL3gBlJgHwvdgvD3sjcKmfnmJA9xqongJ7sx7bge0XTD2zhn73B VFNLpW2On8mov4hp739I93WK9BGfxRckkkpvc+SAs3SLmYuUM6E5K9VoxAYEfLO/gmmW xJP/pr/0p7dr2eNQSd9K0zNCkTqBz8XgoNtOBTvF846eiWzZ+uQiugaIIgPVj6R4jU+p LxLg== X-Gm-Message-State: AOJu0YzD2NlCO4kvTiyHJ4iB4ri1DHVOdfFYsKLRIB9JDtkg8zaWg/DJ lZPg9zqrEqVfugBy/4hMfZBVGifFwVGflcMMQspIt2eBAu1+CUt5npi9jtv0lZ23Kh3Goc9DQo9 M X-Received: by 2002:a05:6358:2612:b0:17e:8ea3:83cc with SMTP id l18-20020a056358261200b0017e8ea383ccmr137852rwc.24.1711650077994; Thu, 28 Mar 2024 11:21:17 -0700 (PDT) Received: from stoup.. (098-147-007-212.res.spectrum.com. [98.147.7.212]) by smtp.gmail.com with ESMTPSA id e8-20020a63aa08000000b005d6b5934deesm1594374pgf.48.2024.03.28.11.21.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Mar 2024 11:21:17 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH for-9.0] disas: Show opcodes for target_disas and monitor_disas Date: Thu, 28 Mar 2024 08:21:15 -1000 Message-Id: <20240328182115.1437442-1-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::c32; envelope-from=richard.henderson@linaro.org; helo=mail-oo1-xc32.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, PDS_OTHER_BAD_TLD=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Fixes: 83b4613ba83 ("disas: introduce show_opcodes") Signed-off-by: Richard Henderson --- disas/disas-mon.c | 1 + disas/disas.c | 1 + 2 files changed, 2 insertions(+) diff --git a/disas/disas-mon.c b/disas/disas-mon.c index 48ac492c6c..5d6d9aa02d 100644 --- a/disas/disas-mon.c +++ b/disas/disas-mon.c @@ -34,6 +34,7 @@ void monitor_disas(Monitor *mon, CPUState *cpu, uint64_t pc, disas_initialize_debug_target(&s, cpu); s.info.fprintf_func = disas_gstring_printf; s.info.stream = (FILE *)ds; /* abuse this slot */ + s.info.show_opcodes = true; if (is_physical) { s.info.read_memory_func = physical_read_memory; diff --git a/disas/disas.c b/disas/disas.c index 17170d291e..7e3b0bb46c 100644 --- a/disas/disas.c +++ b/disas/disas.c @@ -211,6 +211,7 @@ void target_disas(FILE *out, CPUState *cpu, uint64_t code, size_t size) s.info.stream = out; s.info.buffer_vma = code; s.info.buffer_length = size; + s.info.show_opcodes = true; if (s.info.cap_arch >= 0 && cap_disas_target(&s.info, code, size)) { return;