From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2126) id A77B33858416; Mon, 13 Feb 2023 22:31:07 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A77B33858416 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1676327467; bh=nGvqkiqRMczx6bt+kUA+mbDzy3QOYrbr6rAFwmdFRPI=; h=From:To:Subject:Date:From; b=AQA1LB5MrfUZh9S7sovuo8AqudMPZ0MLiem/L4OEN/tBvg2kZxPCIdNlhJrS4woOO g6KPgR1TT8v2C90yv0II4otUSiz6w0CetjFq/O0ApMLE2CgQ2A+wC15InHqFkZiCvJ 79Y9GuBxXFMmK6gfAtW2evLZNCOQ+VpOvjBlCD2E= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Tom Tromey To: gdb-cvs@sourceware.org Subject: [binutils-gdb] Make struct value data members private X-Act-Checkin: binutils-gdb X-Git-Author: Tom Tromey X-Git-Refname: refs/heads/master X-Git-Oldrev: 0d0f488e1dd2761d2681f13b318f6e3f5eb6a5e3 X-Git-Newrev: 8f4135314ae6e1a98a36295c85af5b246dfa00ff Message-Id: <20230213223107.A77B33858416@sourceware.org> Date: Mon, 13 Feb 2023 22:31:07 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D8f4135314ae6= e1a98a36295c85af5b246dfa00ff commit 8f4135314ae6e1a98a36295c85af5b246dfa00ff Author: Tom Tromey Date: Wed Feb 1 08:25:40 2023 -0700 Make struct value data members private =20 This hoists the 'private' in struct value to also encompass the data members. =20 Approved-By: Simon Marchi Diff: --- gdb/value.h | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/gdb/value.h b/gdb/value.h index 225a3c851c4..7708530ddcc 100644 --- a/gdb/value.h +++ b/gdb/value.h @@ -609,6 +609,8 @@ public: in the history. The value is removed from the value chain. */ int record_latest (); =20 +private: + /* Type of value; either not an lval, or one of the various different possible kinds of lval. */ enum lval_type m_lval =3D not_lval; @@ -785,8 +787,6 @@ public: loaded from the inferior. */ ULONGEST m_limited_length =3D 0; =20 -private: - /* Allocate a value and its contents for type TYPE. If CHECK_SIZE is true, then apply the usual max-value-size checks. */ static struct value *allocate (struct type *type, bool check_size); @@ -806,15 +806,11 @@ private: return failure here, which will ultimately throw an error. */ bool set_limited_array_length (); =20 -public: /* Temporary */ - /* Allocate the contents of this value if it has not been allocated yet. If CHECK_SIZE is true, then apply the usual max-value-size checks. */ void allocate_contents (bool check_size); =20 -private: - /* Helper function for value_contents_eq. The only difference is that this function is bit rather than byte based.