Author: fireball
Date: Fri Oct 23 15:26:18 2009
New Revision: 43699
URL:
http://svn.reactos.org/svn/reactos?rev=43699&view=rev
Log:
- Make all object dumping use DbgPrint instead of DPRINT macro, since it does table
formatted output.
- Properly print strings.
Modified:
branches/arwinss/reactos/subsystems/win32/win32k/wine/atom.c
branches/arwinss/reactos/subsystems/win32/win32k/wine/directory.c
branches/arwinss/reactos/subsystems/win32/win32k/wine/handle.c
branches/arwinss/reactos/subsystems/win32/win32k/wine/object.c
branches/arwinss/reactos/subsystems/win32/win32k/wine/queue.c
branches/arwinss/reactos/subsystems/win32/win32k/wine/winstation.c
Modified: branches/arwinss/reactos/subsystems/win32/win32k/wine/atom.c
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/subsystems/win3…
==============================================================================
--- branches/arwinss/reactos/subsystems/win32/win32k/wine/atom.c [iso-8859-1] (original)
+++ branches/arwinss/reactos/subsystems/win32/win32k/wine/atom.c [iso-8859-1] Fri Oct 23
15:26:18 2009
@@ -170,21 +170,22 @@
static void atom_table_dump( struct object *obj, int verbose )
{
int i;
+ UNICODE_STRING str;
struct atom_table *table = (struct atom_table *)obj;
assert( obj->ops == &atom_table_ops );
- DPRINT1( "Atom table size=%d entries=%d\n",
+ DbgPrint( "Atom table size=%d entries=%d\n",
table->last + 1, table->entries_count );
if (!verbose) return;
for (i = 0; i <= table->last; i++)
{
struct atom_entry *entry = table->handles[i];
if (!entry) continue;
- DPRINT1( " %04x: ref=%d pinned=%c hash=%d \"",
+ DbgPrint( " %04x: ref=%d pinned=%c hash=%d \"",
entry->atom, entry->count, entry->pinned ? 'Y' :
'N', entry->hash );
- //dump_strW( entry->str, entry->len / sizeof(WCHAR), stderr,
"\"\"");
- DbgPrint("skipping dump_strW...");
- DPRINT1( "\"\n" );
+ str.Buffer = entry->str; str.Length = str.MaximumLength = entry->len;
+ DbgPrint("%wZ", &str);
+ DbgPrint( "\"\n" );
}
}
Modified: branches/arwinss/reactos/subsystems/win32/win32k/wine/directory.c
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/subsystems/win3…
==============================================================================
--- branches/arwinss/reactos/subsystems/win32/win32k/wine/directory.c [iso-8859-1]
(original)
+++ branches/arwinss/reactos/subsystems/win32/win32k/wine/directory.c [iso-8859-1] Fri Oct
23 15:26:18 2009
@@ -118,7 +118,7 @@
{
assert( obj->ops == &directory_ops );
- DPRINT1( "Directory ");
+ DbgPrint( "Directory ");
dump_object_name( obj );
DbgPrint( "\n" );
}
Modified: branches/arwinss/reactos/subsystems/win32/win32k/wine/handle.c
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/subsystems/win3…
==============================================================================
--- branches/arwinss/reactos/subsystems/win32/win32k/wine/handle.c [iso-8859-1]
(original)
+++ branches/arwinss/reactos/subsystems/win32/win32k/wine/handle.c [iso-8859-1] Fri Oct 23
15:26:18 2009
@@ -121,14 +121,14 @@
assert( obj->ops == &handle_table_ops );
- DPRINT1( "Handle table last=%d count=%d process=%p\n",
+ DbgPrint( "Handle table last=%d count=%d process=%p\n",
table->last, table->count, table->process );
if (!verbose) return;
entry = table->entries;
for (i = 0; i <= table->last; i++, entry++)
{
if (!entry->ptr) continue;
- DPRINT1( " %04x: %p %08x ",
+ DbgPrint( " %04x: %p %08x ",
index_to_handle(i), entry->ptr, entry->access );
entry->ptr->ops->dump( entry->ptr, 0 );
}
Modified: branches/arwinss/reactos/subsystems/win32/win32k/wine/object.c
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/subsystems/win3…
==============================================================================
--- branches/arwinss/reactos/subsystems/win32/win32k/wine/object.c [iso-8859-1]
(original)
+++ branches/arwinss/reactos/subsystems/win32/win32k/wine/object.c [iso-8859-1] Fri Oct 23
15:26:18 2009
@@ -53,13 +53,13 @@
LIST_FOR_EACH( p, &static_object_list )
{
struct object *ptr = LIST_ENTRY( p, struct object, obj_list );
- DPRINT1( "%p:%d: ", ptr, ptr->refcount );
+ DbgPrint( "%p:%d: ", ptr, ptr->refcount );
ptr->ops->dump( ptr, 1 );
}
LIST_FOR_EACH( p, &object_list )
{
struct object *ptr = LIST_ENTRY( p, struct object, obj_list );
- DPRINT1( "%p:%d: ", ptr, ptr->refcount );
+ DbgPrint( "%p:%d: ", ptr, ptr->refcount );
ptr->ops->dump( ptr, 1 );
}
}
@@ -222,12 +222,13 @@
/* dump the name of an object to stderr */
void dump_object_name( struct object *obj )
{
+ UNICODE_STRING str;
if (!obj->name) DbgPrint( "name=\"\"" );
else
{
DbgPrint( "name=L\"" );
- //dump_strW( obj->name->name, obj->name->len/sizeof(WCHAR), stderr,
"\"\"" );
- DbgPrint("[dump_strW is missing]");
+ str.Buffer = obj->name->name; str.Length = str.MaximumLength =
obj->name->len;
+ DbgPrint("%wZ", &str);
DbgPrint( "\"" );
}
}
Modified: branches/arwinss/reactos/subsystems/win32/win32k/wine/queue.c
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/subsystems/win3…
==============================================================================
--- branches/arwinss/reactos/subsystems/win32/win32k/wine/queue.c [iso-8859-1] (original)
+++ branches/arwinss/reactos/subsystems/win32/win32k/wine/queue.c [iso-8859-1] Fri Oct 23
15:26:18 2009
@@ -848,7 +848,7 @@
static void msg_queue_dump( struct object *obj, int verbose )
{
struct msg_queue *queue = (struct msg_queue *)obj;
- DPRINT1( "Msg queue bits=%x mask=%x\n",
+ DbgPrint( "Msg queue bits=%x mask=%x\n",
queue->wake_bits, queue->wake_mask );
}
@@ -920,7 +920,7 @@
static void thread_input_dump( struct object *obj, int verbose )
{
struct thread_input *input = (struct thread_input *)obj;
- DPRINT1( "Thread input focus=%08x capture=%08x active=%08x\n",
+ DbgPrint( "Thread input focus=%08x capture=%08x active=%08x\n",
input->focus, input->capture, input->active );
}
Modified: branches/arwinss/reactos/subsystems/win32/win32k/wine/winstation.c
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/subsystems/win3…
==============================================================================
--- branches/arwinss/reactos/subsystems/win32/win32k/wine/winstation.c [iso-8859-1]
(original)
+++ branches/arwinss/reactos/subsystems/win32/win32k/wine/winstation.c [iso-8859-1] Fri
Oct 23 15:26:18 2009
@@ -122,7 +122,7 @@
{
struct winstation *winstation = (struct winstation *)obj;
- DPRINT1( "Winstation flags=%x clipboard=%p atoms=%p ",
+ DbgPrint( "Winstation flags=%x clipboard=%p atoms=%p ",
winstation->flags, winstation->clipboard, winstation->atom_table
);
dump_object_name( &winstation->obj );
DbgPrint( "\n" );
@@ -232,7 +232,7 @@
{
struct desktop *desktop = (struct desktop *)obj;
- DPRINT1( "Desktop flags=%x winstation=%p top_win=%p hooks=%p ",
+ DbgPrint( "Desktop flags=%x winstation=%p top_win=%p hooks=%p ",
desktop->flags, desktop->winstation, desktop->top_window,
desktop->global_hooks );
dump_object_name( &desktop->obj );
DbgPrint( "\n" );