This is the mail archive of the
insight@sourceware.org
mailing list for the Insight project.
[RFA] Fix compilation failure due to val_print change.
- From: "Pierre Muller" <muller at ics dot u-strasbg dot fr>
- To: <insight at sourceware dot org>
- Date: Wed, 7 May 2008 11:51:14 +0200
- Subject: [RFA] Fix compilation failure due to val_print change.
Hi,
I am new to this list, but not to GDB,
I am maintainer of the pascal language support
for gdb.
I am regularly compiling GDB for
cygwin, which by default also compiles the gdbtk
subdirectory.
According to Daniel, changes in that directory
depend on the insight team.
Thus I submit here a patch that fixes
compilation failure in trunk due to a recent
change in val_print function
see:
http://sourceware.org/ml/gdb-cvs/2008-05/msg00089.html
This patch simply uses current_language
as additional argument.
Can I check this in?
Is it the same CVS repository as GDB?
Is my GDB copyright paper ok for this?
Pierre Muller
Pascal language support maintainer for GDB
ChangeLog entry:
2008-05-07 Pierre Muller <muller@ics.u-strasbg.fr>
Update uses of val_print functions with additional
language argument.
generic/gdbtk-cmds.c: Add "language.h" include.
(gdb_eval): Add current_language as new arg of val_print.
generic/gdbtk-register.c: Add "language.h" include.
(get_register): Add current_language as new arg of val_print.
generic/gdbtk-wrapper.c: Add "language.h" include.
(wrap_val_print): Add current_language as new arg of val_print.
Index: generic/gdbtk-cmds.c
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/generic/gdbtk-cmds.c,v
retrieving revision 1.99
diff -u -p -r1.99 gdbtk-cmds.c
--- generic/gdbtk-cmds.c 21 Apr 2008 20:14:48 -0000 1.99
+++ generic/gdbtk-cmds.c 7 May 2008 09:30:22 -0000
@@ -41,6 +41,7 @@
#include "value.h"
#include "varobj.h"
#include "exceptions.h"
+#include "language.h"
/* tcl header files includes varargs.h unless HAS_STDARG is defined,
but gdb uses stdarg.h, so make sure HAS_STDARG is defined. */
@@ -631,7 +632,7 @@ gdb_eval (ClientData clientData, Tcl_Int
make_cleanup_ui_file_delete (stb);
val_print (value_type (val), value_contents (val),
value_embedded_offset (val), VALUE_ADDRESS (val),
- stb, format, 0, 0, 0);
+ stb, format, 0, 0, 0, current_language);
result = ui_file_xstrdup (stb, &dummy);
Tcl_SetObjResult (interp, Tcl_NewStringObj (result, -1));
xfree (result);
Index: generic/gdbtk-register.c
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/generic/gdbtk-register.c,v
retrieving revision 1.34
diff -u -p -r1.34 gdbtk-register.c
--- generic/gdbtk-register.c 7 Mar 2008 08:03:19 -0000 1.34
+++ generic/gdbtk-register.c 7 May 2008 09:30:23 -0000
@@ -25,6 +25,7 @@
#include "value.h"
#include "target.h"
#include "gdb_string.h"
+#include "language.h"
#include <tcl.h>
#include "gdbtk.h"
@@ -333,11 +334,11 @@ get_register (int regnum, map_arg arg)
gdbarch_register_name (current_gdbarch, regnum)) ==
0))
{
val_print (FIELD_TYPE (TYPE_FIELD (reg_vtype, 0)), buffer, 0, 0,
- stb, format, 1, 0, Val_pretty_default);
+ stb, format, 1, 0, Val_pretty_default,
current_language);
}
else
val_print (reg_vtype, buffer, 0, 0,
- stb, format, 1, 0, Val_pretty_default);
+ stb, format, 1, 0, Val_pretty_default, current_language);
}
res = ui_file_xstrdup (stb, &dummy);
Index: generic/gdbtk-wrapper.c
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/generic/gdbtk-wrapper.c,v
retrieving revision 1.15
diff -u -p -r1.15 gdbtk-wrapper.c
--- generic/gdbtk-wrapper.c 7 Mar 2008 08:03:19 -0000 1.15
+++ generic/gdbtk-wrapper.c 7 May 2008 09:30:23 -0000
@@ -24,6 +24,7 @@
#include "varobj.h"
#include "block.h"
#include "exceptions.h"
+#include "language.h"
#include "gdbtk-wrapper.h"
/*
@@ -218,7 +219,7 @@ wrap_val_print (char *a)
pretty = (enum val_prettyprint) (*args)->args[7].integer;
val_print (type, valaddr, 0, address, stream, format, deref_ref,
- recurse, pretty);
+ recurse, pretty, current_language);
return 1;
}