server: Always print the full path of objects when dumping them.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
110b53affc
commit
d15f47412e
|
@ -102,9 +102,7 @@ static void completion_dump( struct object *obj, int verbose )
|
|||
struct completion *completion = (struct completion *) obj;
|
||||
|
||||
assert( obj->ops == &completion_ops );
|
||||
fprintf( stderr, "Completion " );
|
||||
dump_object_name( &completion->obj );
|
||||
fprintf( stderr, " (%u packets pending)\n", completion->depth );
|
||||
fprintf( stderr, "Completion depth=%u", completion->depth );
|
||||
}
|
||||
|
||||
static struct object_type *completion_get_type( struct object *obj )
|
||||
|
|
|
@ -314,11 +314,7 @@ static void set_irp_result( struct irp_call *irp, unsigned int status,
|
|||
|
||||
static void device_dump( struct object *obj, int verbose )
|
||||
{
|
||||
struct device *device = (struct device *)obj;
|
||||
|
||||
fprintf( stderr, "Device " );
|
||||
dump_object_name( &device->obj );
|
||||
fputc( '\n', stderr );
|
||||
fputs( "Device\n", stderr );
|
||||
}
|
||||
|
||||
static struct object_type *device_get_type( struct object *obj )
|
||||
|
|
|
@ -108,11 +108,7 @@ static struct directory *dir_objtype;
|
|||
|
||||
static void object_type_dump( struct object *obj, int verbose )
|
||||
{
|
||||
assert( obj->ops == &object_type_ops );
|
||||
|
||||
fputs( "Object type ", stderr );
|
||||
dump_object_name( obj );
|
||||
fputc( '\n', stderr );
|
||||
fputs( "Object type\n", stderr );
|
||||
}
|
||||
|
||||
static struct object_type *object_type_get_type( struct object *obj )
|
||||
|
@ -124,11 +120,7 @@ static struct object_type *object_type_get_type( struct object *obj )
|
|||
|
||||
static void directory_dump( struct object *obj, int verbose )
|
||||
{
|
||||
assert( obj->ops == &directory_ops );
|
||||
|
||||
fputs( "Directory ", stderr );
|
||||
dump_object_name( obj );
|
||||
fputc( '\n', stderr );
|
||||
fputs( "Directory\n", stderr );
|
||||
}
|
||||
|
||||
static struct object_type *directory_get_type( struct object *obj )
|
||||
|
|
|
@ -153,10 +153,8 @@ static void event_dump( struct object *obj, int verbose )
|
|||
{
|
||||
struct event *event = (struct event *)obj;
|
||||
assert( obj->ops == &event_ops );
|
||||
fprintf( stderr, "Event manual=%d signaled=%d ",
|
||||
fprintf( stderr, "Event manual=%d signaled=%d\n",
|
||||
event->manual_reset, event->signaled );
|
||||
dump_object_name( &event->obj );
|
||||
fputc( '\n', stderr );
|
||||
}
|
||||
|
||||
static struct object_type *event_get_type( struct object *obj )
|
||||
|
@ -230,11 +228,7 @@ struct keyed_event *get_keyed_event_obj( struct process *process, obj_handle_t h
|
|||
|
||||
static void keyed_event_dump( struct object *obj, int verbose )
|
||||
{
|
||||
struct keyed_event *event = (struct keyed_event *)obj;
|
||||
assert( obj->ops == &keyed_event_ops );
|
||||
fprintf( stderr, "Keyed event " );
|
||||
dump_object_name( &event->obj );
|
||||
fputc( '\n', stderr );
|
||||
fputs( "Keyed event\n", stderr );
|
||||
}
|
||||
|
||||
static struct object_type *keyed_event_get_type( struct object *obj )
|
||||
|
|
|
@ -153,6 +153,7 @@ static void handle_table_dump( struct object *obj, int verbose )
|
|||
if (!entry->ptr) continue;
|
||||
fprintf( stderr, " %04x: %p %08x ",
|
||||
index_to_handle(i), entry->ptr, entry->access );
|
||||
dump_object_name( entry->ptr );
|
||||
entry->ptr->ops->dump( entry->ptr, 0 );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -325,8 +325,7 @@ static void mailslot_queue_async( struct fd *fd, const async_data_t *data, int t
|
|||
|
||||
static void mailslot_device_dump( struct object *obj, int verbose )
|
||||
{
|
||||
assert( obj->ops == &mailslot_device_ops );
|
||||
fprintf( stderr, "Mail slot device\n" );
|
||||
fputs( "Mailslot device\n", stderr );
|
||||
}
|
||||
|
||||
static struct object_type *mailslot_device_get_type( struct object *obj )
|
||||
|
|
|
@ -604,12 +604,10 @@ static void mapping_dump( struct object *obj, int verbose )
|
|||
struct mapping *mapping = (struct mapping *)obj;
|
||||
assert( obj->ops == &mapping_ops );
|
||||
fprintf( stderr, "Mapping size=%08x%08x prot=%08x fd=%p header_size=%08x base=%08lx "
|
||||
"shared_file=%p ",
|
||||
"shared_file=%p\n",
|
||||
(unsigned int)(mapping->size >> 32), (unsigned int)mapping->size,
|
||||
mapping->protect, mapping->fd, mapping->header_size,
|
||||
(unsigned long)mapping->base, mapping->shared_file );
|
||||
dump_object_name( &mapping->obj );
|
||||
fputc( '\n', stderr );
|
||||
}
|
||||
|
||||
static struct object_type *mapping_get_type( struct object *obj )
|
||||
|
|
|
@ -138,9 +138,7 @@ static void mutex_dump( struct object *obj, int verbose )
|
|||
{
|
||||
struct mutex *mutex = (struct mutex *)obj;
|
||||
assert( obj->ops == &mutex_ops );
|
||||
fprintf( stderr, "Mutex count=%u owner=%p ", mutex->count, mutex->owner );
|
||||
dump_object_name( &mutex->obj );
|
||||
fputc( '\n', stderr );
|
||||
fprintf( stderr, "Mutex count=%u owner=%p\n", mutex->count, mutex->owner );
|
||||
}
|
||||
|
||||
static struct object_type *mutex_get_type( struct object *obj )
|
||||
|
|
|
@ -269,11 +269,7 @@ static const struct fd_ops named_pipe_device_fd_ops =
|
|||
|
||||
static void named_pipe_dump( struct object *obj, int verbose )
|
||||
{
|
||||
struct named_pipe *pipe = (struct named_pipe *) obj;
|
||||
assert( obj->ops == &named_pipe_ops );
|
||||
fprintf( stderr, "Named pipe " );
|
||||
dump_object_name( &pipe->obj );
|
||||
fprintf( stderr, "\n" );
|
||||
fputs( "Named pipe\n", stderr );
|
||||
}
|
||||
|
||||
static unsigned int named_pipe_map_access( struct object *obj, unsigned int access )
|
||||
|
@ -443,8 +439,7 @@ static void pipe_client_destroy( struct object *obj)
|
|||
|
||||
static void named_pipe_device_dump( struct object *obj, int verbose )
|
||||
{
|
||||
assert( obj->ops == &named_pipe_device_ops );
|
||||
fprintf( stderr, "Named pipe device\n" );
|
||||
fputs( "Named pipe device\n", stderr );
|
||||
}
|
||||
|
||||
static struct object_type *named_pipe_device_get_type( struct object *obj )
|
||||
|
|
|
@ -68,12 +68,14 @@ void dump_objects(void)
|
|||
{
|
||||
struct object *ptr = LIST_ENTRY( p, struct object, obj_list );
|
||||
fprintf( stderr, "%p:%d: ", ptr, ptr->refcount );
|
||||
dump_object_name( ptr );
|
||||
ptr->ops->dump( ptr, 1 );
|
||||
}
|
||||
LIST_FOR_EACH( p, &object_list )
|
||||
{
|
||||
struct object *ptr = LIST_ENTRY( p, struct object, obj_list );
|
||||
fprintf( stderr, "%p:%d: ", ptr, ptr->refcount );
|
||||
dump_object_name( ptr );
|
||||
ptr->ops->dump( ptr, 1 );
|
||||
}
|
||||
}
|
||||
|
@ -267,16 +269,24 @@ void *create_named_object( struct namespace *namespace, const struct object_ops
|
|||
return obj;
|
||||
}
|
||||
|
||||
/* recursive helper for dump_object_name */
|
||||
static void dump_name( struct object *obj )
|
||||
{
|
||||
struct object_name *name = obj->name;
|
||||
|
||||
if (!name) return;
|
||||
if (name->parent) dump_name( name->parent );
|
||||
fputs( "\\\\", stderr );
|
||||
dump_strW( name->name, name->len / sizeof(WCHAR), stderr, "[]" );
|
||||
}
|
||||
|
||||
/* dump the name of an object to stderr */
|
||||
void dump_object_name( struct object *obj )
|
||||
{
|
||||
if (!obj->name) fprintf( stderr, "name=\"\"" );
|
||||
else
|
||||
{
|
||||
fprintf( stderr, "name=L\"" );
|
||||
dump_strW( obj->name->name, obj->name->len/sizeof(WCHAR), stderr, "\"\"" );
|
||||
fputc( '\"', stderr );
|
||||
}
|
||||
if (!obj->name) return;
|
||||
fputc( '[', stderr );
|
||||
dump_name( obj );
|
||||
fputs( "] ", stderr );
|
||||
}
|
||||
|
||||
/* unlink a named object from its namespace, without freeing the object itself */
|
||||
|
|
|
@ -124,9 +124,7 @@ static void semaphore_dump( struct object *obj, int verbose )
|
|||
{
|
||||
struct semaphore *sem = (struct semaphore *)obj;
|
||||
assert( obj->ops == &semaphore_ops );
|
||||
fprintf( stderr, "Semaphore count=%d max=%d ", sem->count, sem->max );
|
||||
dump_object_name( &sem->obj );
|
||||
fputc( '\n', stderr );
|
||||
fprintf( stderr, "Semaphore count=%d max=%d\n", sem->count, sem->max );
|
||||
}
|
||||
|
||||
static struct object_type *semaphore_get_type( struct object *obj )
|
||||
|
|
|
@ -77,11 +77,9 @@ static void symlink_dump( struct object *obj, int verbose )
|
|||
struct symlink *symlink = (struct symlink *)obj;
|
||||
assert( obj->ops == &symlink_ops );
|
||||
|
||||
fprintf( stderr, "Symlink " );
|
||||
dump_object_name( obj );
|
||||
fprintf( stderr, " -> L\"" );
|
||||
fputs( "Symlink target=\"", stderr );
|
||||
dump_strW( symlink->target, symlink->len / sizeof(WCHAR), stderr, "\"\"" );
|
||||
fprintf( stderr, "\"\n" );
|
||||
fputs( "\"\n", stderr );
|
||||
}
|
||||
|
||||
static struct object_type *symlink_get_type( struct object *obj )
|
||||
|
|
|
@ -184,10 +184,8 @@ static void timer_dump( struct object *obj, int verbose )
|
|||
{
|
||||
struct timer *timer = (struct timer *)obj;
|
||||
assert( obj->ops == &timer_ops );
|
||||
fprintf( stderr, "Timer manual=%d when=%s period=%u ",
|
||||
fprintf( stderr, "Timer manual=%d when=%s period=%u\n",
|
||||
timer->manual, get_timeout_str(timer->when), timer->period );
|
||||
dump_object_name( &timer->obj );
|
||||
fputc( '\n', stderr );
|
||||
}
|
||||
|
||||
static struct object_type *timer_get_type( struct object *obj )
|
||||
|
|
|
@ -133,10 +133,8 @@ static void winstation_dump( struct object *obj, int verbose )
|
|||
{
|
||||
struct winstation *winstation = (struct winstation *)obj;
|
||||
|
||||
fprintf( stderr, "Winstation flags=%x clipboard=%p atoms=%p ",
|
||||
fprintf( stderr, "Winstation flags=%x clipboard=%p atoms=%p\n",
|
||||
winstation->flags, winstation->clipboard, winstation->atom_table );
|
||||
dump_object_name( &winstation->obj );
|
||||
fputc( '\n', stderr );
|
||||
}
|
||||
|
||||
static struct object_type *winstation_get_type( struct object *obj )
|
||||
|
@ -223,10 +221,8 @@ static void desktop_dump( struct object *obj, int verbose )
|
|||
{
|
||||
struct desktop *desktop = (struct desktop *)obj;
|
||||
|
||||
fprintf( stderr, "Desktop flags=%x winstation=%p top_win=%p hooks=%p ",
|
||||
fprintf( stderr, "Desktop flags=%x winstation=%p top_win=%p hooks=%p\n",
|
||||
desktop->flags, desktop->winstation, desktop->top_window, desktop->global_hooks );
|
||||
dump_object_name( &desktop->obj );
|
||||
fputc( '\n', stderr );
|
||||
}
|
||||
|
||||
static struct object_type *desktop_get_type( struct object *obj )
|
||||
|
|
Loading…
Reference in New Issue