From: Tom Tromey Date: Thu, 17 Oct 2019 00:46:43 +0000 (-0600) Subject: Constify objfile::original_name X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=befcd486f467deb3a6a7576dc03bd40db3939ab6;p=binutils-gdb.git Constify objfile::original_name I noticed that objfile::original_name could be a "const char *" rather than a plain "char *". This patch implements this change. Tested by rebuilding. gdb/ChangeLog 2019-10-16 Tom Tromey * objfiles.h (struct objfile) : Now const. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index ba028ed230f..ced508f1f0a 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2019-10-16 Tom Tromey + + * objfiles.h (struct objfile) : Now const. + 2019-10-16 Christian Biesinger * gdbsupport/gdb_setjmp.h (SIGSETJMP): Allow passing in the value to diff --git a/gdb/objfiles.h b/gdb/objfiles.h index dbd06c01e26..2d92120870d 100644 --- a/gdb/objfiles.h +++ b/gdb/objfiles.h @@ -483,7 +483,7 @@ struct objfile This pointer is never NULL. This does not have to be freed; it is guaranteed to have a lifetime at least as long as the objfile. */ - char *original_name = nullptr; + const char *original_name = nullptr; CORE_ADDR addr_low = 0;