From c976342828d5de3d16b59d623f4f7fb03f52acc9 Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Mon, 8 May 2000 22:33:38 +0000 Subject: Implemented debugging function rlookup() which you can call from gdb to see what resource does the address given as a parameter belong to. --- lib/resource.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/resource.h') diff --git a/lib/resource.h b/lib/resource.h index 1491fde..ab53048 100644 --- a/lib/resource.h +++ b/lib/resource.h @@ -25,6 +25,7 @@ struct resclass { unsigned size; /* Standard size of single resource */ void (*free)(resource *); /* Freeing function */ void (*dump)(resource *); /* Dump to debug output */ + resource *(*lookup)(resource *, unsigned long); /* Look up address (only for debugging) */ }; /* Generic resource manipulation */ @@ -35,6 +36,7 @@ void resource_init(void); pool *rp_new(pool *, char *); /* Create new pool */ void rfree(void *); /* Free single resource */ void rdump(void *); /* Dump to debug output */ +void rlookup(unsigned long); /* Look up address (only for debugging) */ void *ralloc(pool *, struct resclass *); -- cgit v1.2.3