From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id CH6vLvuDTWIzMgAAWB0awg (envelope-from ) for ; Wed, 06 Apr 2022 08:13:47 -0400 Received: by simark.ca (Postfix, from userid 112) id BD37A1F344; Wed, 6 Apr 2022 08:13:47 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RDNS_DYNAMIC,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (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 ESMTPS id 0CE961E787 for ; Wed, 6 Apr 2022 08:13:46 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id A3A97385DC1F for ; Wed, 6 Apr 2022 12:13:45 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A3A97385DC1F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1649247225; bh=rT5EtuR8CSHEywBpYsEGxV+PVUCu9Vva42XM3/y0R14=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=MsugTc/pw+v+cDfN1EHFwqBaTV+H2smaG9rPyDMpdeYQ/hJ7u9EtXVjlwvHhR5nc6 IB5JDaFtNhISKUMGada0Qba4eb4WSkXkdFyc0BCEtRwlFjA/qG52P95o6RWQBHz8q4 EyxYGSWySfxbgIdtMXWBlmagjLmJlm31kma/G/8s= Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 95CAA3857815 for ; Wed, 6 Apr 2022 12:05:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 95CAA3857815 Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-639-nOCvkUAyOlC09qy7IS2hbw-1; Wed, 06 Apr 2022 08:05:26 -0400 X-MC-Unique: nOCvkUAyOlC09qy7IS2hbw-1 Received: by mail-wr1-f71.google.com with SMTP id o26-20020adf8b9a000000b0020617a99c43so425262wra.16 for ; Wed, 06 Apr 2022 05:05:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=rT5EtuR8CSHEywBpYsEGxV+PVUCu9Vva42XM3/y0R14=; b=nbrGbmzZDbqprtpr5QY/wmToANxMDAOIXV6nrKRI7bFShDJgopmQ2e+9nLjizLHgBE RdU1o25Jr2MPRPJzYvyQLbwyQEopXz73atBWIGebecCrpXFJvVtKZoh3mZ94BJxlHDXV pafkaRW/6nmyHUeo2vc+ndhF8/T1/Y3ZKLoGNLl1AqwKv6/qh/53DVsOB5fLu40jBA+z Tdl+pvbuGz3gNsES40bCEurlyMNSvRn3ZAYVs9kd0s2IEsuuH6KTp2Osa/twlWJDFQIJ CdDUG+/CyC6AOED8/n+JAqzB/ce5SO5koIH0tNlRPuQLP+rpUfmzhlgGguKTZh6OnUwB Z70w== X-Gm-Message-State: AOAM533MVSdQXPiQCTikUWxucFC3YzeiKoOwllTrEHA211h6m0czK9qp ywiBCGCQgmQZ4HzPbbdQQAZz/6BkCEWg3chcT7uJ/urKdX5zZy2oE1C1gvQxLR2lGHwTChxZNvu 0zUxRI4Shs3qNM+beCTrbXeODjakScAy/Kyi5hdGaEloglnFFtKz8KPmNE9O68yUOWQrJaCc2Ng == X-Received: by 2002:a5d:5511:0:b0:206:100e:9158 with SMTP id b17-20020a5d5511000000b00206100e9158mr6273639wrv.107.1649246724608; Wed, 06 Apr 2022 05:05:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyv9yB6z9aDbjwY54CYcoG4wH6g1tKSqpQ5KWbOXufGG3fcu4yvlxmp4PRcecooGroLQwRSpA== X-Received: by 2002:a5d:5511:0:b0:206:100e:9158 with SMTP id b17-20020a5d5511000000b00206100e9158mr6273616wrv.107.1649246724285; Wed, 06 Apr 2022 05:05:24 -0700 (PDT) Received: from localhost (host86-169-131-113.range86-169.btcentralplus.com. [86.169.131.113]) by smtp.gmail.com with ESMTPSA id b15-20020a05600018af00b002057c72d45fsm17485724wri.77.2022.04.06.05.05.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Apr 2022 05:05:23 -0700 (PDT) To: gdb-patches@sourceware.org Subject: [PATCHv2 16/16] gdb: update comments throughout reggroups.{c, h} files Date: Wed, 6 Apr 2022 13:04:49 +0100 Message-Id: <27d9aa1ed218d7d44fb38db9b01f9f79e1710ab3.1649246539.git.aburgess@redhat.com> X-Mailer: git-send-email 2.25.4 In-Reply-To: References: MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Andrew Burgess via Gdb-patches Reply-To: Andrew Burgess Cc: Andrew Burgess Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" This commit updates the comments in the gdb/reggroups.{c,h} files. Fill in some missing comments, correct a few comments that were not clear, and where we had comments duplicated between .c and .h files, update the .c to reference the .h. No user visible changes after this commit. --- gdb/reggroups.c | 11 +++++++++-- gdb/reggroups.h | 14 ++++++++++++-- 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/gdb/reggroups.c b/gdb/reggroups.c index 96d4ae4d1f8..ef5e47e0986 100644 --- a/gdb/reggroups.c +++ b/gdb/reggroups.c @@ -28,6 +28,8 @@ #include "gdbcmd.h" /* For maintenanceprintlist. */ #include "gdbsupport/gdb_obstack.h" +/* See reggroups.h. */ + const reggroup * reggroup_new (const char *name, enum reggroup_type type) { @@ -82,9 +84,11 @@ struct reggroups std::vector m_groups; }; +/* Key used to lookup register group data from a gdbarch. */ + static struct gdbarch_data *reggroups_data; -/* Add GROUP to the list of register groups for GDBARCH. */ +/* See reggroups.h. */ void reggroup_add (struct gdbarch *gdbarch, const reggroup *group) @@ -128,7 +132,8 @@ gdbarch_reggroups (struct gdbarch *gdbarch) return groups->groups (); } -/* Is REGNUM a member of REGGROUP? */ +/* See reggroups.h. */ + int default_register_reggroup_p (struct gdbarch *gdbarch, int regnum, const struct reggroup *group) @@ -207,6 +212,8 @@ reggroups_dump (struct gdbarch *gdbarch, struct ui_file *file) } } +/* Implement 'maintenance print reggroups' command. */ + static void maintenance_print_reggroups (const char *args, int from_tty) { diff --git a/gdb/reggroups.h b/gdb/reggroups.h index db5625a53bd..8aa9ad8c76f 100644 --- a/gdb/reggroups.h +++ b/gdb/reggroups.h @@ -24,7 +24,17 @@ struct gdbarch; -enum reggroup_type { USER_REGGROUP, INTERNAL_REGGROUP }; +/* The different register group types. */ +enum reggroup_type { + /* Used for any register group that should be visible to the user. + Architecture specific register groups, as well as most of the default + groups will have this type. */ + USER_REGGROUP, + + /* Used for a few groups that GDB uses while managing machine state. + These groups are mostly hidden from the user. */ + INTERNAL_REGGROUP +}; /* Individual register group. */ @@ -73,7 +83,7 @@ extern const reggroup *reggroup_gdbarch_new (struct gdbarch *gdbarch, const char *name, enum reggroup_type type); -/* Add a register group (with attribute values) to the pre-defined list. */ +/* Add a register group GROUP to the list of register groups for GDBARCH. */ extern void reggroup_add (struct gdbarch *gdbarch, const reggroup *group); /* Return the list of all register groups for GDBARCH. */ -- 2.25.4