From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.polymtl.ca (smtp.polymtl.ca [132.207.4.11]) by sourceware.org (Postfix) with ESMTPS id 5F5DD3858D28 for ; Thu, 5 Jan 2023 20:12:38 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 5F5DD3858D28 Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=polymtl.ca Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=polymtl.ca Received: from simark.ca (simark.ca [158.69.221.121]) (authenticated bits=0) by smtp.polymtl.ca (8.14.7/8.14.7) with ESMTP id 305KCUUV015476 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 5 Jan 2023 15:12:35 -0500 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp.polymtl.ca 305KCUUV015476 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=polymtl.ca; s=default; t=1672949555; bh=YFhPqzGsUWiR3d79FKhONa1fLNLWww2jwPnDG8K9/ak=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lVDfR6Nw9gWizY4613hj3KCkQF9IfZmNiDi8/MgcZuD1skF5wZz5qLEFHlPpyn80k VmjWnnQoyLibC3OTfSEkZ9URmGAKXnVdhKnPGnzkQSgiOjpSA+kSepjatGvRszFLxZ +RGKYRTLSPs7p1GtHGTb+2OeIsWXYa5+/S9hY+vM= Received: from simark.localdomain (unknown [217.28.27.60]) (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 ESMTPSA id EBC801E9EF; Thu, 5 Jan 2023 15:02:41 -0500 (EST) From: Simon Marchi To: gdb-patches@sourceware.org Cc: Simon Marchi , Andrew Burgess Subject: [PATCH v2 7/8] gdb: make gdb_printing_disassembler::stream public Date: Thu, 5 Jan 2023 15:02:36 -0500 Message-Id: <20230105200237.987771-8-simon.marchi@polymtl.ca> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230105200237.987771-1-simon.marchi@polymtl.ca> References: <20230105200237.987771-1-simon.marchi@polymtl.ca> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Poly-FromMTA: (simark.ca [158.69.221.121]) at Thu, 5 Jan 2023 20:12:30 +0000 X-Spam-Status: No, score=-3189.4 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: From: Simon Marchi In the ROCm port, we need to access the underlying stream of a gdb_printing_disassembler, so make it public. The reason we need to access it is to know whether it supports style escape code. We then pass that information to a temporary string_file we use while symbolizing addresses. Change-Id: Ib95755a4a45b8f6478787993e9f904df60dd8dc1 Approved-By: Andrew Burgess --- gdb/disasm.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gdb/disasm.h b/gdb/disasm.h index 86d8eed61e90..02d940810771 100644 --- a/gdb/disasm.h +++ b/gdb/disasm.h @@ -123,12 +123,12 @@ struct gdb_printing_disassembler : public gdb_disassemble_info { DISABLE_COPY_AND_ASSIGN (gdb_printing_disassembler); -protected: - /* The stream that disassembler output is being written too. */ struct ui_file *stream () { return m_stream; } +protected: + /* Constructor. All the arguments are just passed to the parent class. We also add the two print functions to the arguments passed to the parent. See gdb_disassemble_info for a description of how the -- 2.39.0