This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[commit] const language_ops.la_printstr
- From: Andrew Cagney <cagney at gnu dot org>
- To: gdb-patches at sources dot redhat dot com
- Date: Fri, 28 Jan 2005 19:12:23 -0500
- Subject: [commit] const language_ops.la_printstr
fyi, one of the big ones I've been working towards,
Andrew
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.
Index: ada-lang.h
===================================================================
RCS file: /cvs/src/src/gdb/ada-lang.h,v
retrieving revision 1.16
diff -p -u -r1.16 ada-lang.h
--- ada-lang.h 28 Jan 2005 19:56:01 -0000 1.16
+++ ada-lang.h 29 Jan 2005 00:09:00 -0000
@@ -204,7 +204,8 @@ extern void ada_emit_char (int, struct u
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 *);
Index: ada-valprint.c
===================================================================
RCS file: /cvs/src/src/gdb/ada-valprint.c,v
retrieving revision 1.18
diff -p -u -r1.18 ada-valprint.c
--- ada-valprint.c 28 Jan 2005 19:19:10 -0000 1.18
+++ ada-valprint.c 29 Jan 2005 00:09:01 -0000
@@ -528,8 +528,8 @@ printstr (struct ui_file *stream, const
}
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);
}
Index: c-lang.c
===================================================================
RCS file: /cvs/src/src/gdb/c-lang.c,v
retrieving revision 1.33
diff -p -u -r1.33 c-lang.c
--- c-lang.c 11 Sep 2004 10:24:45 -0000 1.33
+++ c-lang.c 29 Jan 2005 00:09:01 -0000
@@ -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 *stre
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;
Index: c-lang.h
===================================================================
RCS file: /cvs/src/src/gdb/c-lang.h,v
retrieving revision 1.9
diff -p -u -r1.9 c-lang.h
--- c-lang.h 28 Jan 2005 20:19:54 -0000 1.9
+++ c-lang.h 29 Jan 2005 00:09:01 -0000
@@ -50,7 +50,7 @@ extern int c_value_print (struct value *
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);
Index: f-lang.c
===================================================================
RCS file: /cvs/src/src/gdb/f-lang.c,v
retrieving revision 1.27
diff -p -u -r1.27 f-lang.c
--- f-lang.c 11 Sep 2004 10:24:47 -0000 1.27
+++ f-lang.c 29 Jan 2005 00:09:01 -0000
@@ -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_
#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 *stre
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;
Index: language.c
===================================================================
RCS file: /cvs/src/src/gdb/language.c,v
retrieving revision 1.52
diff -p -u -r1.52 language.c
--- language.c 22 Sep 2004 20:23:54 -0000 1.52
+++ language.c 29 Jan 2005 00:09:01 -0000
@@ -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, s
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_fil
}
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.");
}
Index: language.h
===================================================================
RCS file: /cvs/src/src/gdb/language.h,v
retrieving revision 1.32
diff -p -u -r1.32 language.h
--- language.h 11 Sep 2004 15:04:16 -0000 1.32
+++ language.h 29 Jan 2005 00:09:01 -0000
@@ -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);
Index: m2-lang.c
===================================================================
RCS file: /cvs/src/src/gdb/m2-lang.c,v
retrieving revision 1.20
diff -p -u -r1.20 m2-lang.c
--- m2-lang.c 11 Sep 2004 10:24:49 -0000 1.20
+++ m2-lang.c 29 Jan 2005 00:09:01 -0000
@@ -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 *str
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;
Index: objc-lang.c
===================================================================
RCS file: /cvs/src/src/gdb/objc-lang.c,v
retrieving revision 1.41
diff -p -u -r1.41 objc-lang.c
--- objc-lang.c 12 Jan 2005 18:31:32 -0000 1.41
+++ objc-lang.c 29 Jan 2005 00:09:01 -0000
@@ -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 *s
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;
Index: p-lang.c
===================================================================
RCS file: /cvs/src/src/gdb/p-lang.c,v
retrieving revision 1.22
diff -p -u -r1.22 p-lang.c
--- p-lang.c 11 Sep 2004 10:24:50 -0000 1.22
+++ p-lang.c 29 Jan 2005 00:09:01 -0000
@@ -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
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;
Index: p-lang.h
===================================================================
RCS file: /cvs/src/src/gdb/p-lang.h,v
retrieving revision 1.4
diff -p -u -r1.4 p-lang.h
--- p-lang.h 2 May 2002 11:18:07 -0000 1.4
+++ p-lang.h 29 Jan 2005 00:09:01 -0000
@@ -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);
Index: scm-lang.c
===================================================================
RCS file: /cvs/src/src/gdb/scm-lang.c,v
retrieving revision 1.28
diff -p -u -r1.28 scm-lang.c
--- scm-lang.c 11 Sep 2004 10:24:50 -0000 1.28
+++ scm-lang.c 29 Jan 2005 00:09:01 -0000
@@ -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
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 *st
}
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);
}