Constify annotate_source
authorTom Tromey <tromey@adacore.com>
Fri, 17 May 2019 14:41:12 +0000 (08:41 -0600)
committerTom Tromey <tromey@adacore.com>
Fri, 17 May 2019 16:16:40 +0000 (10:16 -0600)
I noticed that annotate_source takes a "char *", but really should
take a "const char *".  This patch fixes this.

gdb/ChangeLog
2019-05-17  Tom Tromey  <tromey@adacore.com>

* annotate.c (annotate_source): Make "filename" const.
* annotate.h (annotate_source): Use const.

gdb/ChangeLog
gdb/annotate.c
gdb/annotate.h

index 8d8a6789ab3809456921fc04df2552dcbbe5a2b1..146cb00ef4caafd2ecbc4df6b612af7940fbf00a 100644 (file)
@@ -1,3 +1,8 @@
+2019-05-17  Tom Tromey  <tromey@adacore.com>
+
+       * annotate.c (annotate_source): Make "filename" const.
+       * annotate.h (annotate_source): Use const.
+
 2019-05-17  Alan Hayward  <alan.hayward@arm.com>
 
        * disasm.c (set_disassembler_options): Send errors to stderr.
index 97cb4c8855d66d2661840f03732c57c91d20cac3..088f7c957df0dea2194cfc42de928cb946776a1f 100644 (file)
@@ -419,7 +419,7 @@ annotate_arg_end (void)
 }
 
 void
-annotate_source (char *filename, int line, int character, int mid,
+annotate_source (const char *filename, int line, int character, int mid,
                 struct gdbarch *gdbarch, CORE_ADDR pc)
 {
   if (annotation_level > 1)
index 4a9e1b58f28b122b4e55f5f9941c2b1fb76d5f4e..ff10d4594652a99681bf7916756e3d7f6ff22daf 100644 (file)
@@ -87,7 +87,7 @@ struct annotate_arg_emitter
   DISABLE_COPY_AND_ASSIGN (annotate_arg_emitter);
 };
 
-extern void annotate_source (char *, int, int, int,
+extern void annotate_source (const char *, int, int, int,
                             struct gdbarch *, CORE_ADDR);
 
 extern void annotate_frame_begin (int, struct gdbarch *, CORE_ADDR);
This page took 0.032336 seconds and 4 git commands to generate.