From patchwork Thu Nov 9 20:03:54 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joel Brobecker X-Patchwork-Id: 24185 Received: (qmail 50022 invoked by alias); 9 Nov 2017 20:04:03 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 49981 invoked by uid 89); 9 Nov 2017 20:04:01 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-25.6 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, RP_MATCHES_RCVD, SPF_PASS autolearn=ham version=3.3.2 spammy=colleague, our X-HELO: rock.gnat.com Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 09 Nov 2017 20:04:00 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 2794C56BDA for ; Thu, 9 Nov 2017 15:03:58 -0500 (EST) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id Y47YK-WEAhQS for ; Thu, 9 Nov 2017 15:03:58 -0500 (EST) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id ED46A56BD5 for ; Thu, 9 Nov 2017 15:03:57 -0500 (EST) Received: by joel.gnat.com (Postfix, from userid 1000) id 454A983060; Thu, 9 Nov 2017 12:03:56 -0800 (PST) From: Joel Brobecker To: gdb-patches@sourceware.org Subject: [pushed/obv/Ada] fix typos in ada-lang.c comment Date: Thu, 9 Nov 2017 12:03:54 -0800 Message-Id: <20171109200354.11887-1-brobecker@adacore.com> Hello, A colleague of mine noticed some typos in one of the large comments in ada-lang.c, so this patch fixes them. gdb/ChangeLog: * ada-lang.c: Fix some typos in the general command documenting how Ada expressions are being evaluated and how their result is printed. Tested by rebuilding GDB on x86_64-linux. Thank you, diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 22434aa343..59324f3b76 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2017-11-09 Joel Brobecker + + * ada-lang.c: Fix some typos in the general command documenting + how Ada expressions are being evaluated and how their result + is printed. + 2017-11-09 Tom Tromey * psymtab.c (psymbol_hash): Do not hash string contents. diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c index 749473355c..ca5cdd1fb9 100644 --- a/gdb/ada-lang.c +++ b/gdb/ada-lang.c @@ -10303,14 +10303,14 @@ ada_value_cast (struct type *type, struct value *arg2, enum noside noside) one element out of that array. On the other hand, fixing should not be performed on the elements when taking a slice of an array! - Note that one of the side-effects of miscomputing the offset and + Note that one of the side effects of miscomputing the offset and size of each field is that we end up also miscomputing the size of the containing type. This can have adverse results when computing the value of an entity. GDB fetches the value of an entity based on the size of its type, and thus a wrong size causes GDB to fetch the wrong amount of memory. In the case where the computed size is too small, GDB fetches too little data to print the value of our - entiry. Results in this case as unpredicatble, as we usually read + entity. Results in this case are unpredictable, as we usually read past the buffer containing the data =:-o. */ /* Implement the evaluate_exp routine in the exp_descriptor structure