From: Pedro Alves <palves@redhat.com>
To: gdb-patches@sourceware.org
Subject: [pushed/ob] Constify value_cstring
Date: Wed, 18 Nov 2015 16:01:00 -0000 [thread overview]
Message-ID: <1447862472-3721-1-git-send-email-palves@redhat.com> (raw)
From: Simon Marchi <simon.marchi@ericsson.com>
gdb/ChangeLog:
2015-11-18 Simon Marchi <simon.marchi@ericsson.com>
* valops.c (value_cstring): Constify 'ptr' parameter.
* value.h (value_cstring): Constify 'ptr' parameter.
---
gdb/ChangeLog | 5 +++++
gdb/valops.c | 2 +-
gdb/value.h | 2 +-
3 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index a7b44fe..32f8134 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2015-11-18 Simon Marchi <simon.marchi@ericsson.com>
+
+ * valops.c (value_cstring): Constify 'ptr' parameter.
+ * value.h (value_cstring): Constify 'ptr' parameter.
+
2015-11-18 Yao Qi <yao.qi@linaro.org>
* aarch64-tdep.c (pass_in_v): Add argument len. Add local array
diff --git a/gdb/valops.c b/gdb/valops.c
index 1e372ef..67e6afe 100644
--- a/gdb/valops.c
+++ b/gdb/valops.c
@@ -1626,7 +1626,7 @@ value_array (int lowbound, int highbound, struct value **elemvec)
}
struct value *
-value_cstring (char *ptr, ssize_t len, struct type *char_type)
+value_cstring (const char *ptr, ssize_t len, struct type *char_type)
{
struct value *val;
int lowbound = current_language->string_lower_bound;
diff --git a/gdb/value.h b/gdb/value.h
index 0a4bc47..94a2234 100644
--- a/gdb/value.h
+++ b/gdb/value.h
@@ -696,7 +696,7 @@ extern struct value *value_mark (void);
extern void value_free_to_mark (struct value *mark);
-extern struct value *value_cstring (char *ptr, ssize_t len,
+extern struct value *value_cstring (const char *ptr, ssize_t len,
struct type *char_type);
extern struct value *value_string (char *ptr, ssize_t len,
struct type *char_type);
--
1.9.3
next reply other threads:[~2015-11-18 16:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-18 16:01 Pedro Alves [this message]
2015-11-18 16:21 ` Simon Marchi
2015-11-18 16:41 ` Pedro Alves
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1447862472-3721-1-git-send-email-palves@redhat.com \
--to=palves@redhat.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox