aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/ChangeLog9
-rw-r--r--gdb/c-lang.c2
-rw-r--r--gdb/expprint.c8
-rw-r--r--gdb/utils.c3
-rw-r--r--gdb/valprint.c4
-rw-r--r--gdb/varobj.c4
6 files changed, 21 insertions, 9 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index a57e2c1..c8787fc 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,14 @@
2013-03-07 Pedro Alves <palves@redhat.com>
+ * c-lang.c (parse_one_string): Cast argument to gdb_byte *.
+ * expprint.c (print_subexp_standard): Likewise.
+ * utils.c (host_char_to_target): Likewise.
+ * valprint.c (generic_emit_char, generic_printstr): Likewise.
+ * varobj.c (value_get_print_value): Change type of local to char*.
+ Cast it gdb_byte * in call to language printer.
+
+2013-03-07 Pedro Alves <palves@redhat.com>
+
* charset.c (struct wchar_iterator) <input>: Change type to 'const
gdb_byte *'.
(make_wchar_iterator): Remove cast to char*.
diff --git a/gdb/c-lang.c b/gdb/c-lang.c
index 91cb21e..1c1d60b 100644
--- a/gdb/c-lang.c
+++ b/gdb/c-lang.c
@@ -536,7 +536,7 @@ parse_one_string (struct obstack *output, char *data, int len,
/* If we saw a run of characters, convert them all. */
if (p > data)
convert_between_encodings (host_charset (), dest_charset,
- data, p - data, 1,
+ (gdb_byte *) data, p - data, 1,
output, translit_none);
/* If we saw an escape, convert it. */
if (p < limit)
diff --git a/gdb/expprint.c b/gdb/expprint.c
index 4dd2d7c..6905534 100644
--- a/gdb/expprint.c
+++ b/gdb/expprint.c
@@ -203,7 +203,8 @@ print_subexp_standard (struct expression *exp, int *pos,
additional parameter to LA_PRINT_STRING. -fnf */
get_user_print_options (&opts);
LA_PRINT_STRING (stream, builtin_type (exp->gdbarch)->builtin_char,
- &exp->elts[pc + 2].string, nargs, NULL, 0, &opts);
+ (gdb_byte *) &exp->elts[pc + 2].string, nargs,
+ NULL, 0, &opts);
}
return;
@@ -217,7 +218,8 @@ print_subexp_standard (struct expression *exp, int *pos,
fputs_filtered ("@\"", stream);
get_user_print_options (&opts);
LA_PRINT_STRING (stream, builtin_type (exp->gdbarch)->builtin_char,
- &exp->elts[pc + 2].string, nargs, NULL, 0, &opts);
+ (gdb_byte *) &exp->elts[pc + 2].string, nargs,
+ NULL, 0, &opts);
fputs_filtered ("\"", stream);
}
return;
@@ -307,7 +309,7 @@ print_subexp_standard (struct expression *exp, int *pos,
get_user_print_options (&opts);
LA_PRINT_STRING (stream, builtin_type (exp->gdbarch)->builtin_char,
- tempstr, nargs - 1, NULL, 0, &opts);
+ (gdb_byte *) tempstr, nargs - 1, NULL, 0, &opts);
(*pos) = pc;
}
else
diff --git a/gdb/utils.c b/gdb/utils.c
index 6065d82..4c2f08c 100644
--- a/gdb/utils.c
+++ b/gdb/utils.c
@@ -1471,7 +1471,8 @@ host_char_to_target (struct gdbarch *gdbarch, int c, int *target_c)
cleanups = make_cleanup_obstack_free (&host_data);
convert_between_encodings (target_charset (gdbarch), host_charset (),
- &the_char, 1, 1, &host_data, translit_none);
+ (gdb_byte *) &the_char, 1, 1,
+ &host_data, translit_none);
if (obstack_object_size (&host_data) == 1)
{
diff --git a/gdb/valprint.c b/gdb/valprint.c
index 05d6c3e..18cff49 100644
--- a/gdb/valprint.c
+++ b/gdb/valprint.c
@@ -2071,7 +2071,7 @@ generic_emit_char (int c, struct type *type, struct ui_file *stream,
make_cleanup_obstack_free (&output);
convert_between_encodings (INTERMEDIATE_ENCODING, host_charset (),
- obstack_base (&wchar_buf),
+ (gdb_byte *) obstack_base (&wchar_buf),
obstack_object_size (&wchar_buf),
sizeof (gdb_wchar_t), &output, translit_char);
obstack_1grow (&output, '\0');
@@ -2426,7 +2426,7 @@ generic_printstr (struct ui_file *stream, struct type *type,
make_cleanup_obstack_free (&output);
convert_between_encodings (INTERMEDIATE_ENCODING, host_charset (),
- obstack_base (&wchar_buf),
+ (gdb_byte *) obstack_base (&wchar_buf),
obstack_object_size (&wchar_buf),
sizeof (gdb_wchar_t), &output, translit_char);
obstack_1grow (&output, '\0');
diff --git a/gdb/varobj.c b/gdb/varobj.c
index 9255dc4..33ed7cf 100644
--- a/gdb/varobj.c
+++ b/gdb/varobj.c
@@ -2844,7 +2844,7 @@ value_get_print_value (struct value *value, enum varobj_display_formats format,
{
struct ui_file *stb;
struct cleanup *old_chain;
- gdb_byte *thevalue = NULL;
+ char *thevalue = NULL;
struct value_print_options opts;
struct type *type = NULL;
long len = 0;
@@ -2956,7 +2956,7 @@ value_get_print_value (struct value *value, enum varobj_display_formats format,
/* If the THEVALUE has contents, it is a regular string. */
if (thevalue)
- LA_PRINT_STRING (stb, type, thevalue, len, encoding, 0, &opts);
+ LA_PRINT_STRING (stb, type, (gdb_byte *) thevalue, len, encoding, 0, &opts);
else if (string_print)
/* Otherwise, if string_print is set, and it is not a regular
string, it is a lazy string. */