From 5803e8c42cc887736bf72dd9aecc67a43714ab94 Mon Sep 17 00:00:00 2001 From: steve Date: Mon, 1 Jan 2001 08:10:35 +0000 Subject: [PATCH] Handle function scopes in dumpvars scn (PR#95) --- vpi/sys_vcd.c | 9 +++++++-- vvm/vpi_scope.c | 10 +++++++--- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/vpi/sys_vcd.c b/vpi/sys_vcd.c index 0de16b50f..609468229 100644 --- a/vpi/sys_vcd.c +++ b/vpi/sys_vcd.c @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #if !defined(WINNT) && !defined(macintosh) -#ident "$Id: sys_vcd.c,v 1.13 2000/11/01 06:05:44 steve Exp $" +#ident "$Id: sys_vcd.c,v 1.14 2001/01/01 08:10:35 steve Exp $" #endif /* @@ -333,6 +333,7 @@ static void scan_scope(unsigned depth, vpiHandle argv) case vpiModule: case vpiNamedBegin: case vpiTask: + case vpiFunction: sublist = vpi_iterate(vpiInternalScope, item); if (sublist && (depth > 0)) { vcd_info_post_process(); @@ -341,7 +342,8 @@ static void scan_scope(unsigned depth, vpiHandle argv) break; default: - vpi_printf("ERROR: $dumpvars: Unsupported parameter type\n"); + vpi_printf("ERROR: $dumpvars: Unsupported parameter " + "type (%d)\n", vpi_get(vpiType, item)); } } @@ -430,6 +432,9 @@ void sys_vcd_register() /* * $Log: sys_vcd.c,v $ + * Revision 1.14 2001/01/01 08:10:35 steve + * Handle function scopes in dumpvars scn (PR#95) + * * Revision 1.13 2000/11/01 06:05:44 steve * VCD scans tasks (PR#35) * diff --git a/vvm/vpi_scope.c b/vvm/vpi_scope.c index a3f7366cf..d49e8cdf6 100644 --- a/vvm/vpi_scope.c +++ b/vvm/vpi_scope.c @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #if !defined(WINNT) && !defined(macintosh) -#ident "$Id: vpi_scope.c,v 1.10 2000/11/01 06:05:44 steve Exp $" +#ident "$Id: vpi_scope.c,v 1.11 2001/01/01 08:10:35 steve Exp $" #endif # include "vpi_priv.h" @@ -47,7 +47,8 @@ static vpiHandle module_iter(int code, vpiHandle obj) struct __vpiScope*ref = (struct __vpiScope*)obj; assert((obj->vpi_type->type_code == vpiModule) || (obj->vpi_type->type_code == vpiNamedBegin) - || (obj->vpi_type->type_code == vpiTask)); + || (obj->vpi_type->type_code == vpiTask) + || (obj->vpi_type->type_code == vpiFunction)); switch (code) { case vpiInternalScope: @@ -83,7 +84,7 @@ static const struct __vpirt vpip_function_rt = { 0, 0, 0, - 0 + module_iter }; static const struct __vpirt vpip_named_begin_rt = { @@ -149,6 +150,9 @@ void vpip_attach_to_scope(struct __vpiScope*ref, vpiHandle obj) /* * $Log: vpi_scope.c,v $ + * Revision 1.11 2001/01/01 08:10:35 steve + * Handle function scopes in dumpvars scn (PR#95) + * * Revision 1.10 2000/11/01 06:05:44 steve * VCD scans tasks (PR#35) *