[RFC,08/10] Constify dwarf2_cie::augmentation

Message ID 20230424162211.682763-9-tromey@adacore.com
State New
Headers
Series More use of unrelocated_addr |

Commit Message

Tom Tromey April 24, 2023, 4:22 p.m. UTC
  I noticed that dwarf2_cie::augmentation could be 'const'.
---
 gdb/dwarf2/frame.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
  

Patch

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,