aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2005-01-29 00:11:12 +0000
committerAndrew Cagney <cagney@redhat.com>2005-01-29 00:11:12 +0000
commitce27fb254cf9f800fb7f1a953eb8fa47522b9788 (patch)
tree12520f0b7edd8c6ab5c28f23c88c6fd7ccb0554a
parent1a73b492f8dd36d2b0b3917acaf49d07de6fa581 (diff)
downloadgdb-ce27fb254cf9f800fb7f1a953eb8fa47522b9788.zip
gdb-ce27fb254cf9f800fb7f1a953eb8fa47522b9788.tar.gz
gdb-ce27fb254cf9f800fb7f1a953eb8fa47522b9788.tar.bz2
2005-01-28 Andrew Cagney <cagney@gnu.org>
* language.h (struct language_defn): Make la_printstr's buffer parameter a const bfd_byte. * p-lang.h (pascal_printstr): Update function to match. * ada-valprint.c (ada_printstr): Update function to match. * scm-lang.c (scm_printstr): Update function to match. * p-lang.c (pascal_printstr): Update function to match. * ada-lang.h (ada_printstr): Update function to match. * m2-lang.c (m2_printstr): Update function to match. * objc-lang.c (objc_printstr): Update function to match. * c-lang.h (c_printstr): Update function to match. * f-lang.c (f_printstr): Update function to match. * c-lang.c (c_printstr): Update function to match. * language.c (unk_lang_printstr): Update function to match.
-rw-r--r--gdb/ChangeLog14
-rw-r--r--gdb/ada-lang.h3
-rw-r--r--gdb/ada-valprint.c4
-rw-r--r--gdb/c-lang.c9
-rw-r--r--gdb/c-lang.h2
-rw-r--r--gdb/f-lang.c13
-rw-r--r--gdb/language.c10
-rw-r--r--gdb/language.h2
-rw-r--r--gdb/m2-lang.c12
-rw-r--r--gdb/objc-lang.c4
-rw-r--r--gdb/p-lang.c8
-rw-r--r--gdb/p-lang.h3
-rw-r--r--gdb/scm-lang.c11
13 files changed, 52 insertions, 43 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index e42cac8..8681d94 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,19 @@
2005-01-28 Andrew Cagney <cagney@gnu.org>
+ * language.h (struct language_defn): Make la_printstr's buffer
+ parameter a const bfd_byte.
+ * p-lang.h (pascal_printstr): Update function to match.
+ * ada-valprint.c (ada_printstr): Update function to match.
+ * scm-lang.c (scm_printstr): Update function to match.
+ * p-lang.c (pascal_printstr): Update function to match.
+ * ada-lang.h (ada_printstr): Update function to match.
+ * m2-lang.c (m2_printstr): Update function to match.
+ * objc-lang.c (objc_printstr): Update function to match.
+ * c-lang.h (c_printstr): Update function to match.
+ * f-lang.c (f_printstr): Update function to match.
+ * c-lang.c (c_printstr): Update function to match.
+ * language.c (unk_lang_printstr): Update function to match.
+
* valprint.c (val_print_type_code_int): Make buffer a const bfd_byte.
* valprint.h (val_print_type_code_int): Ditto.
diff --git a/gdb/ada-lang.h b/gdb/ada-lang.h
index 7db9452..57816cb 100644
--- a/gdb/ada-lang.h
+++ b/gdb/ada-lang.h
@@ -204,7 +204,8 @@ extern void ada_emit_char (int, struct ui_file *, int, int);
extern void ada_printchar (int, struct ui_file *);
-extern void ada_printstr (struct ui_file *, char *, unsigned int, int, int);
+extern void ada_printstr (struct ui_file *, const bfd_byte *,
+ unsigned int, int, int);
extern void ada_convert_actuals (struct value *, int, struct value **,
CORE_ADDR *);
diff --git a/gdb/ada-valprint.c b/gdb/ada-valprint.c
index 0f2f816..040a626 100644
--- a/gdb/ada-valprint.c
+++ b/gdb/ada-valprint.c
@@ -528,8 +528,8 @@ printstr (struct ui_file *stream, const bfd_byte *string,
}
void
-ada_printstr (struct ui_file *stream, char *string, unsigned int length,
- int width, int force_ellipses)
+ada_printstr (struct ui_file *stream, const bfd_byte *string,
+ unsigned int length, int width, int force_ellipses)
{
printstr (stream, string, length, force_ellipses, width);
}
diff --git a/gdb/c-lang.c b/gdb/c-lang.c
index c7eb918..fa53927 100644
--- a/gdb/c-lang.c
+++ b/gdb/c-lang.c
@@ -1,6 +1,7 @@
/* C language support routines for GDB, the GNU debugger.
- Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2002, 2003, 2004
- Free Software Foundation, Inc.
+
+ Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2002,
+ 2003, 2004, 2005 Free Software Foundation, Inc.
This file is part of GDB.
@@ -85,8 +86,8 @@ c_printchar (int c, struct ui_file *stream)
printing LENGTH characters, or if FORCE_ELLIPSES. */
void
-c_printstr (struct ui_file *stream, char *string, unsigned int length,
- int width, int force_ellipses)
+c_printstr (struct ui_file *stream, const bfd_byte *string,
+ unsigned int length, int width, int force_ellipses)
{
unsigned int i;
unsigned int things_printed = 0;
diff --git a/gdb/c-lang.h b/gdb/c-lang.h
index 0a0267e..1ecee2c 100644
--- a/gdb/c-lang.h
+++ b/gdb/c-lang.h
@@ -50,7 +50,7 @@ extern int c_value_print (struct value *, struct ui_file *, int,
extern void c_printchar (int, struct ui_file *);
-extern void c_printstr (struct ui_file * stream, char *string,
+extern void c_printstr (struct ui_file * stream, const bfd_byte *string,
unsigned int length, int width,
int force_ellipses);
diff --git a/gdb/f-lang.c b/gdb/f-lang.c
index e058dd4..811ac54 100644
--- a/gdb/f-lang.c
+++ b/gdb/f-lang.c
@@ -1,6 +1,8 @@
/* Fortran language support routines for GDB, the GNU debugger.
- Copyright 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004
- Free Software Foundation, Inc.
+
+ Copyright 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002,
+ 2003, 2004, 2005 Free Software Foundation, Inc.
+
Contributed by Motorola. Adapted from the C parser by Farooq Butt
(fmbutt@engage.sps.mot.com).
@@ -87,9 +89,6 @@ static void patch_common_entries (SAVED_F77_COMMON_PTR, CORE_ADDR, int);
#endif
static struct type *f_create_fundamental_type (struct objfile *, int);
-static void f_printstr (struct ui_file * stream, char *string,
- unsigned int length, int width,
- int force_ellipses);
static void f_printchar (int c, struct ui_file * stream);
static void f_emit_char (int c, struct ui_file * stream, int quoter);
@@ -161,8 +160,8 @@ f_printchar (int c, struct ui_file *stream)
be replaced with a true F77 version. */
static void
-f_printstr (struct ui_file *stream, char *string, unsigned int length,
- int width, int force_ellipses)
+f_printstr (struct ui_file *stream, const bfd_byte *string,
+ unsigned int length, int width, int force_ellipses)
{
unsigned int i;
unsigned int things_printed = 0;
diff --git a/gdb/language.c b/gdb/language.c
index cdf35ea..ba7b80c 100644
--- a/gdb/language.c
+++ b/gdb/language.c
@@ -1,7 +1,7 @@
/* Multiple source language support for GDB.
Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000,
- 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+ 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
Contributed by the Department of Computer Science at the State University
of New York at Buffalo.
@@ -86,10 +86,6 @@ static void unk_lang_emit_char (int c, struct ui_file *stream, int quoter);
static void unk_lang_printchar (int c, struct ui_file *stream);
-static void unk_lang_printstr (struct ui_file * stream, char *string,
- unsigned int length, int width,
- int force_ellipses);
-
static struct type *unk_lang_create_fundamental_type (struct objfile *, int);
static void unk_lang_print_type (struct type *, char *, struct ui_file *,
@@ -1098,8 +1094,8 @@ unk_lang_printchar (int c, struct ui_file *stream)
}
static void
-unk_lang_printstr (struct ui_file *stream, char *string, unsigned int length,
- int width, int force_ellipses)
+unk_lang_printstr (struct ui_file *stream, const bfd_byte *string,
+ unsigned int length, int width, int force_ellipses)
{
error ("internal error - unimplemented function unk_lang_printstr called.");
}
diff --git a/gdb/language.h b/gdb/language.h
index 1a54f05..e9698b7 100644
--- a/gdb/language.h
+++ b/gdb/language.h
@@ -193,7 +193,7 @@ struct language_defn
void (*la_printchar) (int ch, struct ui_file * stream);
- void (*la_printstr) (struct ui_file * stream, char *string,
+ void (*la_printstr) (struct ui_file * stream, const bfd_byte *string,
unsigned int length, int width,
int force_ellipses);
diff --git a/gdb/m2-lang.c b/gdb/m2-lang.c
index fbb1fa3..fdad7b4 100644
--- a/gdb/m2-lang.c
+++ b/gdb/m2-lang.c
@@ -1,6 +1,7 @@
/* Modula 2 language support routines for GDB, the GNU debugger.
- Copyright 1992, 1993, 1994, 1995, 1996, 1998, 2000, 2002, 2003, 2004
- Free Software Foundation, Inc.
+
+ Copyright 1992, 1993, 1994, 1995, 1996, 1998, 2000, 2002, 2003,
+ 2004, 2005 Free Software Foundation, Inc.
This file is part of GDB.
@@ -31,9 +32,6 @@
extern void _initialize_m2_language (void);
static struct type *m2_create_fundamental_type (struct objfile *, int);
-static void m2_printstr (struct ui_file * stream, char *string,
- unsigned int length, int width,
- int force_ellipses);
static void m2_printchar (int, struct ui_file *);
static void m2_emit_char (int, struct ui_file *, int);
@@ -109,8 +107,8 @@ m2_printchar (int c, struct ui_file *stream)
be replaced with a true Modula version. */
static void
-m2_printstr (struct ui_file *stream, char *string, unsigned int length,
- int width, int force_ellipses)
+m2_printstr (struct ui_file *stream, const bfd_byte *string,
+ unsigned int length, int width, int force_ellipses)
{
unsigned int i;
unsigned int things_printed = 0;
diff --git a/gdb/objc-lang.c b/gdb/objc-lang.c
index f0d3b78..8ddffa8 100644
--- a/gdb/objc-lang.c
+++ b/gdb/objc-lang.c
@@ -1,6 +1,6 @@
/* Objective-C language support routines for GDB, the GNU debugger.
- Copyright 2002, 2003, 2004 Free Software Foundation, Inc.
+ Copyright 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
Contributed by Apple Computer, Inc.
Written by Michael Snyder.
@@ -335,7 +335,7 @@ objc_printchar (int c, struct ui_file *stream)
FORCE_ELLIPSES. */
static void
-objc_printstr (struct ui_file *stream, char *string,
+objc_printstr (struct ui_file *stream, const bfd_byte *string,
unsigned int length, int width, int force_ellipses)
{
unsigned int i;
diff --git a/gdb/p-lang.c b/gdb/p-lang.c
index f7c49df..8c0b6e5 100644
--- a/gdb/p-lang.c
+++ b/gdb/p-lang.c
@@ -1,5 +1,7 @@
/* Pascal language support routines for GDB, the GNU debugger.
- Copyright 2000, 2002, 2003, 2004 Free Software Foundation, Inc.
+
+ Copyright 2000, 2002, 2003, 2004, 2005 Free Software Foundation,
+ Inc.
This file is part of GDB.
@@ -155,8 +157,8 @@ pascal_printchar (int c, struct ui_file *stream)
had to stop before printing LENGTH characters, or if FORCE_ELLIPSES. */
void
-pascal_printstr (struct ui_file *stream, char *string, unsigned int length,
- int width, int force_ellipses)
+pascal_printstr (struct ui_file *stream, const bfd_byte *string,
+ unsigned int length, int width, int force_ellipses)
{
unsigned int i;
unsigned int things_printed = 0;
diff --git a/gdb/p-lang.h b/gdb/p-lang.h
index 39eb043..0f1ef81 100644
--- a/gdb/p-lang.h
+++ b/gdb/p-lang.h
@@ -43,7 +43,8 @@ extern int
extern void pascal_printchar (int, struct ui_file *);
-extern void pascal_printstr (struct ui_file *, char *, unsigned int, int, int);
+extern void pascal_printstr (struct ui_file *, const bfd_byte *,
+ unsigned int, int, int);
extern struct type *pascal_create_fundamental_type (struct objfile *, int);
diff --git a/gdb/scm-lang.c b/gdb/scm-lang.c
index 21f39ec..71f2d2d 100644
--- a/gdb/scm-lang.c
+++ b/gdb/scm-lang.c
@@ -1,7 +1,7 @@
/* Scheme/Guile language support routines for GDB, the GNU debugger.
- Copyright 1995, 1996, 1998, 2000, 2001, 2002, 2003, 2004 Free Software
- Foundation, Inc.
+ Copyright 1995, 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005 Free
+ Software Foundation, Inc.
This file is part of GDB.
@@ -40,9 +40,6 @@ static struct value *evaluate_subexp_scm (struct type *, struct expression *,
int *, enum noside);
static struct value *scm_lookup_name (char *);
static int in_eval_c (void);
-static void scm_printstr (struct ui_file * stream, char *string,
- unsigned int length, int width,
- int force_ellipses);
struct type *builtin_type_scm;
@@ -53,8 +50,8 @@ scm_printchar (int c, struct ui_file *stream)
}
static void
-scm_printstr (struct ui_file *stream, char *string, unsigned int length,
- int width, int force_ellipses)
+scm_printstr (struct ui_file *stream, const bfd_byte *string,
+ unsigned int length, int width, int force_ellipses)
{
fprintf_filtered (stream, "\"%s\"", string);
}