Robert Shearman : widl: Changes to output for better debugability.
Alexandre Julliard
julliard at wine.codeweavers.com
Tue Jan 31 11:23:31 CST 2006
Module: wine
Branch: refs/heads/master
Commit: c41822609367e5cf39f1f610005be2131a7f1885
URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=c41822609367e5cf39f1f610005be2131a7f1885
Author: Robert Shearman <rob at codeweavers.com>
Date: Tue Jan 31 18:08:24 2006 +0100
widl: Changes to output for better debugability.
Write the offset and the absolute address for referenced types.
Write the current offset out when writing a pointer type.
---
tools/widl/typegen.c | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/tools/widl/typegen.c b/tools/widl/typegen.c
index 438a211..8b6e081 100644
--- a/tools/widl/typegen.c
+++ b/tools/widl/typegen.c
@@ -842,9 +842,10 @@ static size_t write_struct_tfs(FILE *fil
/* total size */
print_file(file, 2, "NdrShort(0x%x), /* %u */\n", total_size, total_size);
*typestring_offset += 4;
- print_file(file, 2, "NdrShort(0x%x), /* %d */\n",
+ print_file(file, 2, "NdrShort(0x%x), /* offset = %d (%u) */\n",
array_offset - *typestring_offset,
- array_offset - *typestring_offset);
+ array_offset - *typestring_offset,
+ array_offset);
*typestring_offset += 2;
print_file(file, 2, "FC_END,\n");
*typestring_offset += 1;
@@ -876,9 +877,10 @@ static size_t write_struct_tfs(FILE *fil
/* total size */
print_file(file, 2, "NdrShort(0x%x), /* %u */\n", total_size, total_size);
*typestring_offset += 4;
- print_file(file, 2, "NdrShort(0x%x), /* %d */\n",
+ print_file(file, 2, "NdrShort(0x%x), /* offset = %d (%u) */\n",
+ array_offset - *typestring_offset,
array_offset - *typestring_offset,
- array_offset - *typestring_offset);
+ array_offset);
*typestring_offset += 2;
print_file(file, 2, "FC_END,\n");
*typestring_offset += 1;
@@ -992,6 +994,8 @@ static size_t write_typeformatstring_var
pointer_type = get_attrv(var->attrs, ATTR_POINTERTYPE);
if (!pointer_type) pointer_type = RPC_FC_RP;
+ if (file)
+ fprintf(file, "/* %2u */\n", *typeformat_offset);
print_file(file, indent, "0x%x, 0x00, /* %s */\n",
pointer_type,
pointer_type == RPC_FC_FP ? "FC_FP" : (pointer_type == RPC_FC_UP ? "FC_UP" : "FC_RP"));
More information about the wine-cvs
mailing list