From: Tom Tromey Date: Tue, 10 Nov 2020 22:46:17 +0000 (-0700) Subject: Constify value_nsstring X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8e20b4be65843c220260e4f0f5dd943f5570656b;p=binutils-gdb.git Constify value_nsstring This changes the "ptr" parameter to value_nsstring to be const. gdb/ChangeLog 2020-11-10 Tom Tromey * objc-lang.h (value_nsstring): Update. * objc-lang.c (value_nsstring): Make "ptr" const. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 67a151b5c96..bd820d05eac 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2020-11-10 Tom Tromey + + * objc-lang.h (value_nsstring): Update. + * objc-lang.c (value_nsstring): Make "ptr" const. + 2020-11-06 Andrew Burgess * expprint.c (print_subexp_funcall): Increment expression position diff --git a/gdb/objc-lang.c b/gdb/objc-lang.c index 16751464c67..4cd853249aa 100644 --- a/gdb/objc-lang.c +++ b/gdb/objc-lang.c @@ -164,7 +164,7 @@ lookup_child_selector (struct gdbarch *gdbarch, const char *selname) } struct value * -value_nsstring (struct gdbarch *gdbarch, char *ptr, int len) +value_nsstring (struct gdbarch *gdbarch, const char *ptr, int len) { struct type *char_type = builtin_type (gdbarch)->builtin_char; struct value *stringValue[3]; diff --git a/gdb/objc-lang.h b/gdb/objc-lang.h index b2247433dd1..ff1fc348b81 100644 --- a/gdb/objc-lang.h +++ b/gdb/objc-lang.h @@ -39,7 +39,7 @@ extern const char *find_imps (const char *method, std::vector *symbol_names); extern struct value *value_nsstring (struct gdbarch *gdbarch, - char *ptr, int len); + const char *ptr, int len); /* for parsing Objective C */ extern void start_msglist (void);