summaryrefslogtreecommitdiff
path: root/lib/resource.h
diff options
context:
space:
mode:
authorMartin Mares <mj@ucw.cz>2000-05-08 22:33:38 +0000
committerMartin Mares <mj@ucw.cz>2000-05-08 22:33:38 +0000
commitc976342828d5de3d16b59d623f4f7fb03f52acc9 (patch)
tree4c36b20465c2d7d65e248c14e718e778a5efef60 /lib/resource.h
parent0521e4f68490d5ef5cc6ba6b2b4e4edf7cf6aa1a (diff)
Implemented debugging function rlookup() which you can call from gdb
to see what resource does the address given as a parameter belong to.
Diffstat (limited to 'lib/resource.h')
-rw-r--r--lib/resource.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/resource.h b/lib/resource.h
index 1491fde7..ab530480 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 *);