This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH] Fix pascal specific part of PR 11349.
- From: "Pierre Muller" <pierre dot muller at ics-cnrs dot unistra dot fr>
- To: <gdb-patches at sourceware dot org>
- Date: Mon, 3 May 2010 15:43:32 +0200
- Subject: [PATCH] Fix pascal specific part of PR 11349.
FYI, this patch fixes the lack of dereferencing
for pascal parameters passed as 'var' parameters
which get a TYPE_CODE_REF when dwarf debug information is generated,
at least for Free Pascal.
This does not fix the other problem
reported in the same bug report
about the 'x var' that does not work.
That part is handled in
http://sourceware.org/ml/gdb-patches/2010-05/msg00021.html
Pierre Muller
Committed as pascal language maintainer.
ChangeLog entry:
2010-05-03 Pierre Muller <muller@ics.u-strasbg.fr>
PR pascal/11349.
* p-valprint.c (pascal_value_print): Always dereference a value with
type code TYPE_CODE_REF.
Index: p-valprint.c
===================================================================
RCS file: /cvs/src/src/gdb/p-valprint.c,v
retrieving revision 1.69
diff -u -p -r1.69 p-valprint.c
--- p-valprint.c 21 Apr 2010 09:54:58 -0000 1.69
+++ p-valprint.c 3 May 2010 13:38:04 -0000
@@ -544,6 +544,9 @@ pascal_value_print (struct value *val, s
const struct value_print_options *options)
{
struct type *type = value_type (val);
+ struct value_print_options opts = *options;
+
+ opts.deref_ref = 1;
/* If it is a pointer, indicate what it points to.
@@ -570,7 +573,7 @@ pascal_value_print (struct value *val, s
fprintf_filtered (stream, ") ");
}
}
- return common_val_print (val, stream, 0, options, current_language);
+ return common_val_print (val, stream, 0, &opts, current_language);
}