I noticed that gnutarget was not "const". Since writing through this
pointer would probably be a bug, I think it ought to be. This patch
makes the change.
gdb/ChangeLog
2020-03-04 Tom Tromey <tom@tromey.com>
* jit.c (bfd_open_from_target_memory): Make "target" const.
* corefile.c (gnutarget): Now const.
* gdbcore.h (gnutarget): Now const.
+2020-03-04 Tom Tromey <tom@tromey.com>
+
+ * jit.c (bfd_open_from_target_memory): Make "target" const.
+ * corefile.c (gnutarget): Now const.
+ * gdbcore.h (gnutarget): Now const.
+
2020-03-04 Hannes Domani <ssbssa@yahoo.de>
* NEWS: Mention support for WOW64 processes.
\f
/* The current default bfd target. Points to storage allocated for
gnutarget_string. */
-char *gnutarget;
+const char *gnutarget;
/* Same thing, except it is "auto" not NULL for the default case. */
static char *gnutarget_string;
/* The current default bfd target. */
-extern char *gnutarget;
+extern const char *gnutarget;
extern void set_gnutarget (const char *);
/* Open a BFD from the target's memory. */
static gdb_bfd_ref_ptr
-bfd_open_from_target_memory (CORE_ADDR addr, ULONGEST size, char *target)
+bfd_open_from_target_memory (CORE_ADDR addr, ULONGEST size,
+ const char *target)
{
struct target_buffer *buffer = XNEW (struct target_buffer);