From patchwork Fri Sep 8 15:20:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Marchi X-Patchwork-Id: 75552 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id C4CE13858404 for ; Fri, 8 Sep 2023 15:21:31 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C4CE13858404 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1694186491; bh=oFvKSt024n/u2tj18nnagoQKYSh07A1e+4d41QxVivE=; h=To:Cc:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=bmsB4qC5JYIZ0tTngvc1CSXeI+MnQJbK7masVzsA5ML8357UAltJpUwX2tRakmevg p0/qI+TA3AG6NujuUmIyvTkaBK5QBv1TlwHVY012MtG2i5DEs0Qn8/PCRUWtVzFSzk tXOtdmm9u0sRJC6krVKrWobcUJ7EYh+1vYKVDmoE= X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id DB7483858D1E for ; Fri, 8 Sep 2023 15:21:04 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org DB7483858D1E Received: from smarchi-efficios.internal.efficios.com (192-222-143-198.qc.cable.ebox.net [192.222.143.198]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id 325AB1E092; Fri, 8 Sep 2023 11:21:04 -0400 (EDT) To: gdb-patches@sourceware.org Cc: Simon Marchi Subject: [PATCH 1/2] gdb/doc: rename "x86 Architecture-specific Issues" section to "x86" Date: Fri, 8 Sep 2023 11:20:57 -0400 Message-ID: <20230908152102.32731-1-simon.marchi@efficios.com> X-Mailer: git-send-email 2.42.0 MIME-Version: 1.0 X-Spam-Status: No, score=-3497.1 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_NONE, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_SOFTFAIL, 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 X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Simon Marchi via Gdb-patches From: Simon Marchi Reply-To: Simon Marchi Errors-To: gdb-patches-bounces+patchwork=sourceware.org@sourceware.org Sender: "Gdb-patches" I'm looking to add some x86-specific information to the doc, but I find the naming of this section odd. It doesn't really talk about issues, it just gives generally useful information. Also, the sections about other architectures don't mention "issues", just the architecture name. Also, at least in the HTML version of the doc, the name is inconsistent between the main table of content, where it appears as "x86 Architecture-specific Issues", and the sub-table of contents of the "Architectures" section, where it appears as "i386". Rename the section to just "x86". Change-Id: I0a119ff1ab5e7b83c9afa3c3977eb085e88f52ca --- gdb/doc/gdb.texinfo | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) base-commit: 9c5bc1bd1399c11427deec1f8de6c537ab249087 diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo index 8be9725d1a27..72083fc5b64f 100644 --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo @@ -26096,7 +26096,7 @@ all uses of @value{GDBN} with the architecture, both native and cross. @menu * AArch64:: -* i386:: +* x86:: * Alpha:: * MIPS:: * HPPA:: HP PA architecture @@ -26206,8 +26206,8 @@ information automatically from the core file, and will show one of the above messages depending on whether the synchronous or asynchronous mode is selected. @xref{Memory Tagging}. @xref{Memory}. -@node i386 -@subsection x86 Architecture-specific Issues +@node x86 +@subsection x86 @table @code @item set struct-convention @var{mode} From patchwork Fri Sep 8 15:20:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Marchi X-Patchwork-Id: 75551 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 187823858D38 for ; Fri, 8 Sep 2023 15:21:31 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 187823858D38 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1694186491; bh=UT93IfXYirjGTxOVGGYRtgvPBEN/+KcDs40/eOduSrI=; h=To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=XeISTP/eNvECCxj3jD43HY4+ZkW4i2/Td7caaYzhDohXYaZ7tirEX0DOL4+gu1fFO HxkNKG+9tXDI+RLf+mkvFvCqhUTSe1i6EwtA+AQ8Xxm9wPCH2lpqU8NUxqIBr5zb8c GIMoDBsbwKCq7yKqht1JshVoW0wy3PQ0OH1esfnQ= X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id 0F9493858D35 for ; Fri, 8 Sep 2023 15:21:05 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0F9493858D35 Received: from smarchi-efficios.internal.efficios.com (192-222-143-198.qc.cable.ebox.net [192.222.143.198]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id 7BABB1E0C2; Fri, 8 Sep 2023 11:21:04 -0400 (EDT) To: gdb-patches@sourceware.org Cc: Simon Marchi Subject: [PATCH 2/2] gdb/doc: describe x87 registers Date: Fri, 8 Sep 2023 11:20:58 -0400 Message-ID: <20230908152102.32731-2-simon.marchi@efficios.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20230908152102.32731-1-simon.marchi@efficios.com> References: <20230908152102.32731-1-simon.marchi@efficios.com> MIME-Version: 1.0 X-Spam-Status: No, score=-3497.1 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_NONE, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_SOFTFAIL, 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 X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Simon Marchi via Gdb-patches From: Simon Marchi Reply-To: Simon Marchi Errors-To: gdb-patches-bounces+patchwork=sourceware.org@sourceware.org Sender: "Gdb-patches" While investigating this [1], I initially had no idea what register "fioff" stood for, making it difficult to map it to something in the Intel or AMD manuals. Similarly, I can imaging someone familiar with x87 to want to print the "x87 last instruction address", and have no clue that GDB makes it available as register "fioff". The names of the x87 state fields don't seem to be standardized, they even change between sections of the Intel manual (between the FSAVE, FXSAVE and XSAVE area descriptions). Add some details to the doc to help one map GDB register names to x87 state fields. [1] https://inbox.sourceware.org/gdb-patches/20230908022722.430741-1-simon.marchi@efficios.com/T/#u Change-Id: I0ea1eb648358e62da4aa87eea3515ee8a09f2762 --- gdb/doc/gdb.texinfo | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo index 72083fc5b64f..90d928fb295d 100644 --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo @@ -26310,6 +26310,25 @@ At this last step the value of bnd0 can be changed for investigation of bound violations caused along the execution of the call. In order to know how to set the bound registers or bound table for the call consult the ABI. +@subsubsection x87 registers + +GDB provides access to the x87 state through the following registers: + +@itemize + +@item @code{$st0} to @code{st7}: @code{ST(0)} to @code{ST(7)} floating-point +registers +@item @code{$fctrl}: control word register (@code{FCW}) +@item @code{$fstat}: status word register (@code{FSW}) +@item @code{$ftag}: tag word (@code{FTW}) +@item @code{$fiseg}: last instruction pointer segment +@item @code{$fioff}: last instruction pointer +@item @code{$foseg}: last data pointer segment +@item @code{$fooff}: last data pointer +@item @code{$fop}: last opcode + +@end itemize + @node Alpha @subsection Alpha