diff options
author | Tom Tromey <tom@tromey.com> | 2020-11-10 15:46:17 -0700 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2020-11-10 15:46:18 -0700 |
commit | 8e20b4be65843c220260e4f0f5dd943f5570656b (patch) | |
tree | 8f0a96f809e543fccfdb871979fb42cc2cb686ee /gdb | |
parent | 6c51cf513d98adcf34a342c7e9d885a6c788cda8 (diff) | |
download | gdb-8e20b4be65843c220260e4f0f5dd943f5570656b.zip gdb-8e20b4be65843c220260e4f0f5dd943f5570656b.tar.gz gdb-8e20b4be65843c220260e4f0f5dd943f5570656b.tar.bz2 |
Constify value_nsstring
This changes the "ptr" parameter to value_nsstring to be const.
gdb/ChangeLog
2020-11-10 Tom Tromey <tom@tromey.com>
* objc-lang.h (value_nsstring): Update.
* objc-lang.c (value_nsstring): Make "ptr" const.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/objc-lang.c | 2 | ||||
-rw-r--r-- | gdb/objc-lang.h | 2 |
3 files changed, 7 insertions, 2 deletions
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 <tom@tromey.com> + + * objc-lang.h (value_nsstring): Update. + * objc-lang.c (value_nsstring): Make "ptr" const. + 2020-11-06 Andrew Burgess <andrew.burgess@embecosm.com> * 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<const char *> *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); |