From c4d6e2a61ec1a0c3cde70d08ec6b1e17160566cb Mon Sep 17 00:00:00 2001 From: Andrew Johnson Date: Fri, 14 Jun 2013 13:55:22 -0500 Subject: [PATCH] dbStatic: Improve dbDumpDevice Make it also display the function pointers in the dset and dsxt for each device support it reports on. --- src/ioc/dbStatic/dbStaticLib.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/src/ioc/dbStatic/dbStaticLib.c b/src/ioc/dbStatic/dbStaticLib.c index b76333f7c..d23917d27 100644 --- a/src/ioc/dbStatic/dbStaticLib.c +++ b/src/ioc/dbStatic/dbStaticLib.c @@ -3210,7 +3210,30 @@ void dbDumpDevice(DBBASE *pdbbase,const char *recordTypeName) printf("\tchoice: %s\n",pdevSup->choice); printf("\tlink_type: %d\n",pdevSup->link_type); printf("\tpdset: %p\n",(void *)pdevSup->pdset); + if (pdevSup->pdset) { + static const char *names[] = { + " - report()", + " - init()", + " - init_record()", + " - get_ioint_info()" + }; + int i, n = pdevSup->pdset->number; + DEVSUPFUN *pfunc = &pdevSup->pdset->report; + + printf("\t number: %d\n", n); + for (i = 0; i < n; ++i, ++pfunc) { + const char *name = (i < NELEMENTS(names)) ? names[i] : ""; + + printf("\t func %d: %p%s\n", i, (void *)*pfunc, name); + } + } printf("\tpdsxt: %p\n",(void *)pdevSup->pdsxt); + if (pdevSup->pdsxt) { + printf("\t add_record: %p\n", + (void *)pdevSup->pdsxt->add_record); + printf("\t del_record: %p\n", + (void *)pdevSup->pdsxt->del_record); + } } if(recordTypeName) break; }