From 8e20b4be65843c220260e4f0f5dd943f5570656b Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Tue, 10 Nov 2020 15:46:17 -0700 Subject: 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. --- gdb/ChangeLog | 5 +++++ gdb/objc-lang.c | 2 +- gdb/objc-lang.h | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) (limited to 'gdb') diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 67a151b..bd820d0 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 1675146..4cd8532 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 b224743..ff1fc34 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); -- cgit v1.1