From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io1-xd2b.google.com (mail-io1-xd2b.google.com [IPv6:2607:f8b0:4864:20::d2b]) by sourceware.org (Postfix) with ESMTPS id BD280385841D for ; Mon, 24 Apr 2023 16:22:28 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org BD280385841D Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=adacore.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=adacore.com Received: by mail-io1-xd2b.google.com with SMTP id ca18e2360f4ac-763da065494so16654639f.0 for ; Mon, 24 Apr 2023 09:22:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1682353348; x=1684945348; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=kkUe9erIq6gfnk+uuT17j43vpqKBF56SJ0tTwjnCpzw=; b=dvZIX8qRqVBn3kPvOD7z9Uvj39NuedBcgf1B8TfQXDZBalVQsva4HQtxvLcVJchcHj NjYpJTbJajIpMwjSXVN1+lH48cmqE2qx/z9UgU1Oh3fhjZ2gVTuV753C9Q52u94bHerR vu83Xb/Sd3HjfGmzz2NHLsb4FCaSIG82tEH/icNh8l4XnBo8EMBF6BXxSrKP0qoXxR/E PnXAiNz2ZUyInw9xMYnszLUaDdnz5bz8o6yb5y+0sQacOQjqnES1PuObas5IJ1LK+jIJ c8jTjEY4JoFjN/Zomgoq8Vyyr5Cu9uVHo26eYzS2zHo+6Y33J/sWbmkLOauCIA+Z55NG qigA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682353348; x=1684945348; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=kkUe9erIq6gfnk+uuT17j43vpqKBF56SJ0tTwjnCpzw=; b=cWQSA0gVhhND2ATeIxdwV7G2dXslvWke5sInVkl1DkuKUU5nufgT5WzG26hlRjVM0y TminGY8VS9LMAV2ypZEpcx8JGKPFm9WybvPR8Pg1ODlxlpS114PwKNyWkKmT+P/VKDUQ mr+8zcX1QGoe9wBlKtmWWxt3LQ7pkCEowLEft8RAHN5jLvqvOCm6uA4cxeLBHkjC3MED t9u6DQIPpoc3IGdGfV5ay//ddqWqxcYlXz5uEz3Qhi2KQrmPmzliINNNOl2mU2Oo9x2s faRkcbHJTqsbJQhuTAnJoiaQpjjwYBAeMZ87lDzsSk8c/x4P7hmfC+OMcr7MbCubM5tr HMQA== X-Gm-Message-State: AAQBX9eTEmqY6JG1SBu6uoBVprhPlfrBzyiSSH+osFZ+rB/y6Y6hfGyi rzaVM5JVbiMAI8RVggvwniR4pO1IvDEm7p87FOEUpQ== X-Google-Smtp-Source: AKy350bBFFp6aq3gKVdrfrH5rbTctC+6aCIq/P9PfFNwqTH5yXwfHzaO9KEZZREAm+Z2qlj8eiJ/Ww== X-Received: by 2002:a5d:8197:0:b0:758:6d1e:2978 with SMTP id u23-20020a5d8197000000b007586d1e2978mr5427640ion.10.1682353348097; Mon, 24 Apr 2023 09:22:28 -0700 (PDT) Received: from localhost.localdomain (71-211-191-82.hlrn.qwest.net. [71.211.191.82]) by smtp.gmail.com with ESMTPSA id cx27-20020a056638491b00b0040fa19472bcsm3444049jab.92.2023.04.24.09.22.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Apr 2023 09:22:27 -0700 (PDT) From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [RFC 08/10] Constify dwarf2_cie::augmentation Date: Mon, 24 Apr 2023 10:22:09 -0600 Message-Id: <20230424162211.682763-9-tromey@adacore.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230424162211.682763-1-tromey@adacore.com> References: <20230424162211.682763-1-tromey@adacore.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-11.3 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,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 List-Id: I noticed that dwarf2_cie::augmentation could be 'const'. --- gdb/dwarf2/frame.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gdb/dwarf2/frame.c b/gdb/dwarf2/frame.c index a561aaf3100..8f8add201f4 100644 --- a/gdb/dwarf2/frame.c +++ b/gdb/dwarf2/frame.c @@ -80,7 +80,7 @@ struct dwarf2_cie const gdb_byte *end; /* Saved augmentation, in case it's needed later. */ - char *augmentation; + const char *augmentation; /* Encoding of addresses. */ gdb_byte encoding; @@ -1746,7 +1746,7 @@ decode_frame_entry_1 (struct gdbarch *gdbarch, { /* This is a CIE. */ struct dwarf2_cie *cie; - char *augmentation; + const char *augmentation; unsigned int cie_version; /* Check that a CIE was expected. */ @@ -1780,7 +1780,7 @@ decode_frame_entry_1 (struct gdbarch *gdbarch, buf += 1; /* Interpret the interesting bits of the augmentation. */ - cie->augmentation = augmentation = (char *) buf; + cie->augmentation = augmentation = (const char *) buf; buf += (strlen (augmentation) + 1); /* Ignore armcc augmentations. We only use them for quirks, -- 2.39.1