public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] Constify objfile::original_name
@ 2019-10-17  2:54 Tom Tromey
  0 siblings, 0 replies; only message in thread
From: Tom Tromey @ 2019-10-17  2:54 UTC (permalink / raw)
  To: gdb-cvs

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=befcd486f467deb3a6a7576dc03bd40db3939ab6

commit befcd486f467deb3a6a7576dc03bd40db3939ab6
Author: Tom Tromey <tom@tromey.com>
Date:   Wed Oct 16 18:46:43 2019 -0600

    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  <tom@tromey.com>
    
    	* objfiles.h (struct objfile) <original_name>: Now const.

Diff:
---
 gdb/ChangeLog  | 4 ++++
 gdb/objfiles.h | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index ba028ed..ced508f 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,7 @@
+2019-10-16  Tom Tromey  <tom@tromey.com>
+
+	* objfiles.h (struct objfile) <original_name>: Now const.
+
 2019-10-16  Christian Biesinger  <cbiesinger@google.com>
 
 	* gdbsupport/gdb_setjmp.h (SIGSETJMP): Allow passing in the value to
diff --git a/gdb/objfiles.h b/gdb/objfiles.h
index dbd06c0..2d921208 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;


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-10-17  2:54 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-17  2:54 [binutils-gdb] Constify objfile::original_name Tom Tromey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).