From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-f51.google.com (mail-wr1-f51.google.com [209.85.221.51]) by sourceware.org (Postfix) with ESMTPS id 7D5513857C71 for ; Mon, 16 May 2022 18:41:14 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 7D5513857C71 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=palves.net Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wr1-f51.google.com with SMTP id a5so17904687wrp.7 for ; Mon, 16 May 2022 11:41:14 -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:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=qM6X94buYNE1JrNgfdIAWNtWjeJ15WdIdfxaVQT+o4c=; b=nCGIjqHUJo+9xUKUwgXGLfJsPAoCsn+s+s0tvuz027ju8jeEcDVbXXTC2RdwwqwFqq qS42ZfBrLiqkH8JWUmmT2hr9d0/EGQC+3iK1As54yii/mzuXRIu82HUt00naobg7xFjM gvGFY7PyHC/AaX9fplxhR9z78XJHtqkSOOt+LIz8/lpxHhaYbLd5dwvf8Y7StWuqGA+e U2S9dOjrJePm0l4vGGosb/3RPfApW2qmFd1wsF7y3RRXxGg7qy80hl5NOrykyIff4hY1 gHTSH/B3j1ze41sDfTZBbQ8O0OQERgmH0t0QXyEKUd8KBbCLKy5Xv0R2RbDPUa3kQiVN +nvg== X-Gm-Message-State: AOAM531XQG1VniUuVpq8bOYDq9UdxxKyF3WgA54Nl2vbdWvYI33fnEdX cDoRVLnGYMD6Cs7uQvjXeQVsCP4qO8E= X-Google-Smtp-Source: ABdhPJxu4OZX83qkuyMXuA7274idwEG1oGP16lhVme0My4om1/pYAEly1cu4QxIZbvIuaGFojR61Mg== X-Received: by 2002:a5d:6051:0:b0:20d:d49:26b8 with SMTP id j17-20020a5d6051000000b0020d0d4926b8mr3159763wrt.454.1652726473337; Mon, 16 May 2022 11:41:13 -0700 (PDT) Received: from localhost ([2001:8a0:f924:2600:209d:85e2:409e:8726]) by smtp.gmail.com with ESMTPSA id f20-20020a7bcc14000000b003948f4e750fsm33364wmh.23.2022.05.16.11.41.12 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 16 May 2022 11:41:12 -0700 (PDT) From: Pedro Alves To: gdb-patches@sourceware.org Subject: [PATCH 19/23] Add/tweak intro comments of struct breakpoint and several subclasses Date: Mon, 16 May 2022 19:40:26 +0100 Message-Id: <20220516184030.665489-20-pedro@palves.net> X-Mailer: git-send-email 2.36.0 In-Reply-To: <20220516184030.665489-1-pedro@palves.net> References: <20220516184030.665489-1-pedro@palves.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-9.7 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, GIT_PATCH_0, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE 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.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 May 2022 18:41:15 -0000 This tweaks the intro comments of the following classes: internal_breakpoint momentary_breakpoint breakpoint base_breakpoint watchpoint catchpoint Change-Id: If6b31f51ebbb81705fbe5b8435f60ab2c88a98c8 --- gdb/breakpoint.c | 12 ++++++++++-- gdb/breakpoint.h | 13 +++++++------ 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index 613f6a875e4..0d239f50fcc 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c @@ -271,7 +271,10 @@ struct ordinary_breakpoint : public base_breakpoint void print_recreate (struct ui_file *fp) const override; }; -/* Internal breakpoints. */ +/* Internal breakpoints. These typically have a lifetime the same as + the program, and they end up installed on the breakpoint chain with + a negative breakpoint number. They're visible in "maint info + breakpoints", but not "info breakpoints". */ struct internal_breakpoint : public base_breakpoint { internal_breakpoint (struct gdbarch *gdbarch, @@ -294,7 +297,12 @@ struct internal_breakpoint : public base_breakpoint void print_mention () const override; }; -/* Momentary breakpoints. */ +/* Momentary breakpoints. These typically have a lifetime of some run + control command only, are always thread-specific, and have 0 for + breakpoint number. I.e., there can be many momentary breakpoints + on the breakpoint chain and they all same the same number (zero). + They're visible in "maint info breakpoints", but not "info + breakpoints". */ struct momentary_breakpoint : public base_breakpoint { using base_breakpoint::base_breakpoint; diff --git a/gdb/breakpoint.h b/gdb/breakpoint.h index 807c97a5bed..8735396e8d4 100644 --- a/gdb/breakpoint.h +++ b/gdb/breakpoint.h @@ -616,7 +616,7 @@ using bp_location_range = next_range; useful for a hack I had to put in; I'm going to leave it in because I can see how there might be times when it would indeed be useful */ -/* This is for all kinds of breakpoints. */ +/* Abstract base class representing all kinds of breakpoints. */ struct breakpoint { @@ -846,9 +846,9 @@ struct breakpoint void print_recreate_thread (struct ui_file *fp) const; }; -/* The structure to be inherit by all kinds of breakpoints (real - breakpoints, i.e., user "break" breakpoints, internal and momentary - breakpoints, etc.). */ +/* Abstract base class representing code breakpoints. User "break" + breakpoints, internal and momentary breakpoints, etc. IOW, any + kind of breakpoint whose locations are created from SALs. */ struct base_breakpoint : public breakpoint { using breakpoint::breakpoint; @@ -887,7 +887,8 @@ struct base_breakpoint : public breakpoint struct program_space *search_pspace) override; }; -/* An instance of this type is used to represent a watchpoint. */ +/* An instance of this type is used to represent a watchpoint, + a.k.a. a data breakpoint. */ struct watchpoint : public breakpoint { @@ -1022,7 +1023,7 @@ struct tracepoint : public base_breakpoint int static_trace_marker_id_idx = 0; }; -/* The base class for catchpoints. */ +/* The abstract base class for catchpoints. */ struct catchpoint : public breakpoint { -- 2.36.0