From 4e7625fde223fd0c98f09f41fe924e7317a82e1a Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Wed, 4 Mar 2020 16:24:08 -0700 Subject: Make "gnutarget" const 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 * jit.c (bfd_open_from_target_memory): Make "target" const. * corefile.c (gnutarget): Now const. * gdbcore.h (gnutarget): Now const. --- gdb/jit.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'gdb/jit.c') diff --git a/gdb/jit.c b/gdb/jit.c index eeaab70..35b7167 100644 --- a/gdb/jit.c +++ b/gdb/jit.c @@ -136,7 +136,8 @@ mem_bfd_iovec_stat (struct bfd *abfd, void *stream, struct stat *sb) /* 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); -- cgit v1.1