[Pkg-electronics-commits] [gtkwave] 01/03: New upstream version 3.3.82

Dr. Tobias Quathamer toddy at debian.org
Sun Jul 16 18:58:47 UTC 2017


This is an automated email from the git hooks/post-receive script.

toddy pushed a commit to branch master
in repository gtkwave.

commit a48035a188c28724e350d587055157ebcc964ee2
Author: Dr. Tobias Quathamer <toddy at debian.org>
Date:   Sun Jul 16 20:52:08 2017 +0200

    New upstream version 3.3.82
---
 ChangeLog                                 |   3 +
 configure                                 |  20 ++--
 configure.ac                              |   2 +-
 contrib/bundle_for_osx/Info-gtkwave.plist |   6 +-
 contrib/vpi/sys_fst.c                     | 162 ++++++++++++++++++++++++------
 src/analyzer.h                            |   1 +
 src/baseconvert.c                         |   4 +-
 src/bitvec.c                              | 124 +++++++++++++++++------
 src/ghwlib.c                              |   4 +
 9 files changed, 248 insertions(+), 78 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 320bc08..a36e1c1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1597,3 +1597,6 @@
 3.3.81	09jun17	Added max_fsdb_trees environment variable.
 		Fixed -C option so it is persistent across new tabs.		
 		Integrated updated GHW reader code.
+3.3.82	02jul17	Get sys_fst working with VCS VPI.
+		Added string concatenations for vectors.
+		Added asserts to ghwlib.c to make scan-view clean.
diff --git a/configure b/configure
index 93f84dd..e7f581d 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for gtkwave 3.3.81.
+# Generated by GNU Autoconf 2.69 for gtkwave 3.3.82.
 #
 # Report bugs to <bybell at rocketmail.com>.
 #
@@ -580,8 +580,8 @@ MAKEFLAGS=
 # Identity of this package.
 PACKAGE_NAME='gtkwave'
 PACKAGE_TARNAME='gtkwave'
-PACKAGE_VERSION='3.3.81'
-PACKAGE_STRING='gtkwave 3.3.81'
+PACKAGE_VERSION='3.3.82'
+PACKAGE_STRING='gtkwave 3.3.82'
 PACKAGE_BUGREPORT='bybell at rocketmail.com'
 PACKAGE_URL=''
 
@@ -1383,7 +1383,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures gtkwave 3.3.81 to adapt to many kinds of systems.
+\`configure' configures gtkwave 3.3.82 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1449,7 +1449,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of gtkwave 3.3.81:";;
+     short | recursive ) echo "Configuration of gtkwave 3.3.82:";;
    esac
   cat <<\_ACEOF
 
@@ -1595,7 +1595,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-gtkwave configure 3.3.81
+gtkwave configure 3.3.82
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2239,7 +2239,7 @@ cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by gtkwave $as_me 3.3.81, which was
+It was created by gtkwave $as_me 3.3.82, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -3106,7 +3106,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE='gtkwave'
- VERSION='3.3.81'
+ VERSION='3.3.82'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -10997,7 +10997,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by gtkwave $as_me 3.3.81, which was
+This file was extended by gtkwave $as_me 3.3.82, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -11063,7 +11063,7 @@ _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-gtkwave config.status 3.3.81
+gtkwave config.status 3.3.82
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
diff --git a/configure.ac b/configure.ac
index 0844459..3d9474b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2,7 +2,7 @@
 # Process this file with autoconf to produce a configure script.
 
 AC_PREREQ(2.59)
-AC_INIT(gtkwave, 3.3.81, bybell at rocketmail.com)
+AC_INIT(gtkwave, 3.3.82, bybell at rocketmail.com)
 AC_CONFIG_SRCDIR([src/vcd.c])
 AM_INIT_AUTOMAKE
 AC_CONFIG_HEADER([config.h])
diff --git a/contrib/bundle_for_osx/Info-gtkwave.plist b/contrib/bundle_for_osx/Info-gtkwave.plist
index 5322102..d238827 100644
--- a/contrib/bundle_for_osx/Info-gtkwave.plist
+++ b/contrib/bundle_for_osx/Info-gtkwave.plist
@@ -8,7 +8,7 @@
     <key>CFBundleExecutable</key>
     <string>gtkwave</string>
     <key>CFBundleGetInfoString</key>
-    <string>3.3.81, (C) 1999-2017 Tony Bybell http://gtkwave.sourceforge.net</string>
+    <string>3.3.82, (C) 1999-2017 Tony Bybell http://gtkwave.sourceforge.net</string>
     <key>CFBundleIconFile</key>
     <string>gtkwave.icns</string>
     <key>CFBundleIdentifier</key>
@@ -18,11 +18,11 @@
     <key>CFBundlePackageType</key>
     <string>APPL</string>
     <key>CFBundleShortVersionString</key>
-    <string>3.3.81</string>
+    <string>3.3.82</string>
     <key>CFBundleSignature</key>
     <string>????</string>
     <key>CFBundleVersion</key>
-    <string>3.3.81</string>
+    <string>3.3.82</string>
     <key>NSHumanReadableCopyright</key>
     <string>Copyright 1999 - 2017 Tony Bybell, GNU General Public License.</string>
     <key>LSMinimumSystemVersion</key>
diff --git a/contrib/vpi/sys_fst.c b/contrib/vpi/sys_fst.c
index d031569..2e14f16 100644
--- a/contrib/vpi/sys_fst.c
+++ b/contrib/vpi/sys_fst.c
@@ -1,7 +1,6 @@
 /*
 
 FST dumper for NC Verilog / Verilog-XL
-
 to compile/run under AIX: 
 
 ar -xv /lib/libz.a   # to get libz.so.1
@@ -10,10 +9,24 @@ ld -G -o sys_fst.so sys_fst.o fstapi.o fastlz.o libz.so.1 -bnoentry -bexpall -ll
 
 [nc]verilog r.v +loadvpi=sys_fst.so:sys_fst_register +access+r
 
+
+FST dumper for VCS
+to compile/run under LINUX:
+
+gcc -O2 -c -fPIC *.c
+ld -G -o sys_fst.so ../../src/libz/*.o *.o
+vcs +v2k -R +vpi +acc+2 +memchbk -full64 t.v -P sys_fst.tab sys_fst.so
+
+sys_fst.tab:
+
+$fstdumpfile check=sys_dumpfile_compiletf call=sys_dumpfile_calltf acc+=r:*
+$fstdumpvars check=sys_dumpvars_compiletf call=sys_dumpvars_calltf acc+=r:*
+$fstdumpoff  check=sys_dumpoff_compiletf  call=sys_dumpoff_calltf  acc+=r:*
+
  */
 
-#include  "vpi_user.h"
-#include  "acc_user.h"
+#include  <vpi_user.h>
+#include  <acc_user.h>
 #include  <stdio.h>
 #include  <stdlib.h>
 #include  <string.h>
@@ -25,23 +38,22 @@ ld -G -o sys_fst.so sys_fst.o fstapi.o fastlz.o libz.so.1 -bnoentry -bexpall -ll
 struct fst_info {
     struct fst_info *dump_chain;
     vpiHandle       item;
+    s_vpi_value     value;
 
     fstHandle       fstSym;
     unsigned        is_real:1;
     unsigned        is_changed:1;
 };
 
-static int variable_cb(p_cb_data cause);
-
 /*************************************************/
 
 static struct fstContext *ctx = NULL;
+static uint64_t        prev64 = 0;
 
 static char    *dump_path = NULL;
 
 static int      dump_is_off = 0;
 
-static struct fst_info *fst_list = 0;
 static struct fst_info *fst_dump_list = 0;
 
 static int      dumpvars_status = 0;	/* 0:fresh 1:cb installed,
@@ -66,7 +78,10 @@ dump_header_pending(void)
 }
 
 
-static int
+int variable_cb_rosync(p_cb_data cause);
+
+
+int
 variable_cb_rosync(p_cb_data cause)
 {
     p_vpi_time      tim = cause->time;
@@ -74,7 +89,11 @@ variable_cb_rosync(p_cb_data cause)
     struct fst_info *a_info = fst_dump_list;
     s_vpi_value     value;
 
-    fstWriterEmitTimeChange(ctx, now64);
+   if((now64 > prev64) || (!now64))
+	{
+	fstWriterEmitTimeChange(ctx, now64);
+    	prev64 = now64;
+	}
 
     while (a_info) {
 	if (!a_info->is_real) {
@@ -92,12 +111,16 @@ variable_cb_rosync(p_cb_data cause)
 	    fstWriterEmitValueChange(ctx, a_info->fstSym, &d);
 	}
 
+
 	a_info->is_changed = 0;
-	a_info = a_info->dump_chain;
+	struct fst_info *a_info_next = a_info->dump_chain;
+	a_info->dump_chain = NULL;
+	a_info = a_info_next;
     }
 
     fst_dump_list = NULL;
     return (0);
+
 }
 
 
@@ -117,11 +140,11 @@ install_rosync_cb(void)
     cb.user_data = NULL;
     cb.obj = NULL;
 
-    vpi_register_cb(&cb);
+    vpi_free_object(vpi_register_cb(&cb));
 }
 
 
-static int
+int
 variable_cb(p_cb_data cause)
 {
     struct fst_info *info = (struct fst_info *) cause->user_data;
@@ -130,7 +153,7 @@ variable_cb(p_cb_data cause)
 	return (0);
     if (dump_header_pending())
 	return (0);
-    if (info->is_changed)
+    if (info->is_changed) 
 	return (0);
 
     if (!fst_dump_list) {
@@ -183,7 +206,7 @@ install_dumpvars_callback(void)
     cb.user_data = NULL;
     cb.obj = NULL;
 
-    vpi_register_cb(&cb);
+    vpi_free_object(vpi_register_cb(&cb));
 
     dumpvars_status = 1;
     return (0);
@@ -193,12 +216,45 @@ install_dumpvars_callback(void)
 static int
 end_of_sim_cb(p_cb_data cause)
 {
-    if (ctx) {
+    if (ctx) 	
+	{
 	fstWriterClose(ctx);
-    }
+	ctx = NULL;
+	prev64 = 0;
+    	}
     return (0);
 }
 
+static int
+next_time_cb(p_cb_data cause)
+{
+struct t_cb_data cb;
+struct t_vpi_time vtime;
+
+p_vpi_time      tim = cause->time;
+uint64_t        now64 = timerec_to_time64(tim);
+
+if(now64 > prev64)
+	{
+	fstWriterEmitTimeChange(ctx, now64);
+	prev64 = now64;
+	}
+
+memset(&cb, 0, sizeof(cb));
+memset(&vtime, 0, sizeof(vtime));
+
+vtime.type = vpiSimTime;
+cb.time = &vtime;
+cb.reason = cbNextSimTime;
+cb.cb_rtn = next_time_cb;
+cb.user_data = NULL;
+cb.obj = NULL;
+
+vpi_free_object(vpi_register_cb(&cb));
+
+return (0);
+}
+
 
 static void
 open_dumpfile(void)
@@ -216,6 +272,9 @@ open_dumpfile(void)
 	 * primary 
 	 */
 	ctx = fstWriterCreate(dump_path, 1);
+	prev64 = 0;
+	fstWriterSetPackType(ctx, FST_WR_PT_LZ4);
+	/* fstWriterSetParallelMode(ctx, 1); */
 
 	time(&walltime);
 	fstWriterSetDate(ctx, asctime(localtime(&walltime)));
@@ -235,12 +294,24 @@ open_dumpfile(void)
 	cb.user_data = NULL;
 	cb.obj = NULL;
 
-	vpi_register_cb(&cb);
+	vpi_free_object(vpi_register_cb(&cb));
+
+	memset(&cb, 0, sizeof(cb));
+	memset(&vtime, 0, sizeof(vtime));
+
+	vtime.type = vpiSimTime;
+	cb.time = &vtime;
+	cb.reason = cbNextSimTime;
+	cb.cb_rtn = next_time_cb;
+	cb.user_data = NULL;
+	cb.obj = NULL;
+
+	vpi_free_object(vpi_register_cb(&cb));
     }
 }
 
 
-static int
+int
 sys_dumpfile_compiletf(char *name)
 {
     vpiHandle       sys = vpi_handle(vpiSysTfCall, 0);
@@ -281,7 +352,7 @@ sys_dumpfile_compiletf(char *name)
 }
 
 
-static int
+int
 sys_dumpfile_calltf(char *name)
 {
     return (0);
@@ -411,11 +482,29 @@ draw_module_type(vpiHandle item, int typ)
 		fstWriterCreateVar(ctx, vtyp, FST_VD_IMPLICIT, siz, name,
 				   0);
 	} else {
-	    char           *n2 = malloc(strlen(name) + 32);
+	    char           *n2 = malloc(strlen(name) + 64);
+	    int len = ilrange - irrange;
+	    if(len < 0) len = - len;
+	    len++;
+
 	    if (ilrange == irrange) {
-		sprintf(n2, "%s [%d]", name, irrange);
+		if(siz == len)
+			{
+			sprintf(n2, "%s [%d]", name, irrange);
+			}
+			else
+			{
+			sprintf(n2, "%s [%d][%d:0]", name, irrange, siz/len-1);
+			}
 	    } else {
-		sprintf(n2, "%s [%d:%d]", name, ilrange, irrange);
+		if(siz == len)
+			{
+			sprintf(n2, "%s [%d:%d]", name, ilrange, irrange);
+			}
+			else
+			{
+			sprintf(n2, "%s [%d:%d][%d:0]", name, ilrange, irrange, siz/len-1);
+			}
 	    }
 
 	    info->fstSym =
@@ -429,6 +518,7 @@ draw_module_type(vpiHandle item, int typ)
 	info->dump_chain = fst_dump_list;
     	fst_dump_list = info;
 
+
 	memset(&cb, 0, sizeof(cb));
 	memset(&time, 0, sizeof(time));
 	time.type = vpiSimTime;
@@ -436,15 +526,13 @@ draw_module_type(vpiHandle item, int typ)
 	cb.time = &time;
 	cb.user_data = (char *) info;
 
-	cb.value = NULL; /* was &info->value; */
+	cb.value = &info->value; /* NC seems to be ok with NULL, but VCS needs &info->value */
+	info->value.format = vpiObjTypeVal;
 	cb.obj = net;
 	cb.reason = cbValueChange;
 	cb.cb_rtn = variable_cb;
 
-	/* info->value.format = vpiObjTypeVal; */
-	fst_list = info;
-
-	vpi_register_cb(&cb);
+	vpi_free_object(vpi_register_cb(&cb));
     }
 
     return (0);
@@ -478,6 +566,14 @@ draw_scope_fst(vpiHandle item, int depth, int depth_max)
 	int             vpitype = vpi_get(vpiType, item);
 	int             fsttype;
 
+        int lineno = vpi_get(vpiLineNo, item);
+	const char *fname = vpi_get_str(vpiFile, item);
+	fstWriterSetSourceInstantiationStem(ctx, fname, lineno, 1);
+
+        lineno = vpi_get(vpiDefLineNo, item);
+	fname = vpi_get_str(vpiDefFile, item);
+	fstWriterSetSourceStem(ctx, fname, lineno, 1);
+
 	switch (vpitype) {
 	case vpiTaskFunc:
 	case vpiTask:
@@ -518,6 +614,14 @@ draw_scope_fst(vpiHandle item, int depth, int depth_max)
 		int             vpitype = vpi_get(vpiType, item);
 		int             fsttype;
 
+	        int lineno = vpi_get(vpiLineNo, item);
+		const char *fname = vpi_get_str(vpiFile, item);
+		fstWriterSetSourceInstantiationStem(ctx, fname, lineno, 1);
+
+	        lineno = vpi_get(vpiDefLineNo, item);
+		fname = vpi_get_str(vpiDefFile, item);
+		fstWriterSetSourceStem(ctx, fname, lineno, 1);
+
 		switch (vpitype) {
 		case vpiTaskFunc:
 		case vpiTask:
@@ -562,7 +666,7 @@ draw_scope_fst(vpiHandle item, int depth, int depth_max)
  * This function is also used in sys_fst to check the arguments of the fst
  * variant of $dumpvars. 
  */
-static int
+int
 sys_dumpvars_compiletf(char *name)
 {
     vpiHandle       sys = vpi_handle(vpiSysTfCall, 0);
@@ -602,7 +706,7 @@ sys_dumpvars_compiletf(char *name)
 }
 
 
-static int
+int
 sys_dumpvars_calltf(char *name)
 {
     unsigned        depth;
@@ -672,7 +776,7 @@ sys_dumpoff_compiletf(char *name)
 }
 
 
-static int
+int
 sys_dumpoff_calltf(char *name)
 {
     dump_is_off = 1;
diff --git a/src/analyzer.h b/src/analyzer.h
index 57d1947..898b61f 100644
--- a/src/analyzer.h
+++ b/src/analyzer.h
@@ -142,6 +142,7 @@ typedef struct VectorEnt
 {
 TimeType time;
 vptr next;
+unsigned char flags;  /* so far only set on strings */
 unsigned char v[]; /* C99 */
 } VectorEnt;
 
diff --git a/src/baseconvert.c b/src/baseconvert.c
index 43989e1..84725aa 100644
--- a/src/baseconvert.c
+++ b/src/baseconvert.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) Tony Bybell 1999-2016.
+ * Copyright (c) Tony Bybell 1999-2017.
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
@@ -1623,7 +1623,7 @@ char *convert_ascii(Trptr t, vptr v)
 {
 char *s;
 
-if(!t->t_filter_converted)
+if((!t->t_filter_converted) && (!(v->flags & HIST_STRING)))
 	{
 	s = convert_ascii_2(t, v);
 	}
diff --git a/src/bitvec.c b/src/bitvec.c
index 2eab400..b18f25a 100644
--- a/src/bitvec.c
+++ b/src/bitvec.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) Tony Bybell 1999-2012.
+ * Copyright (c) Tony Bybell 1999-2017.
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
@@ -246,6 +246,8 @@ int numextrabytes;
 TimeType mintime, lasttime=-1;
 bvptr bitvec=NULL;
 TimeType tshift, tmod;
+int is_string;
+int string_len;
 
 if(!b) return(NULL);
 
@@ -294,52 +296,108 @@ while(h[0])	/* should never exit through this point the way we set up histents w
 
 	regions++;
 
+	is_string = 1;
+	string_len = 0;
+	for(i=0;i<b->nnbits;i++)
+                {
+		if((h[i]->flags & HIST_STRING))
+			{
+			if(h[i]->time >= 0)
+				{ 
+				if(h[i]->v.h_vector)
+					{
+					if((GLOBALS->loaded_file_type == GHW_FILE) && (h[i]->v.h_vector[0] == '\'') && (h[i]->v.h_vector[1]) && (h[i]->v.h_vector[2] == '\''))
+						{
+						string_len++;
+						}
+						else
+						{
+						string_len += strlen(h[i]->v.h_vector);
+						}
+					}
+				}
+			}
+			else
+			{
+			is_string = 0;
+			break;
+			}
+		}
+
+	if(is_string)
+		{
+		vadd->flags |= HIST_STRING;
+		vadd=(vptr)realloc_2(vadd,sizeof(struct VectorEnt)+string_len+1);
+		vadd->v[0] = 0;
+		}
+
 	for(i=0;i<b->nnbits;i++)
 		{
 		unsigned char enc;
 
 		tshift = (b->attribs) ? b->attribs[i].shift : 0;
 
-		if((b->attribs)&&(b->attribs[i].flags & TR_INVERT))
+		if(!is_string)
 			{
-			enc  = ((unsigned char)(h[i]->v.h_val));
-			switch(enc)	/* don't remember if it's preconverted in all cases; being conservative is OK */
+			if((b->attribs)&&(b->attribs[i].flags & TR_INVERT))
 				{
-				case AN_0: case '0':
-					enc = AN_1; break;
-
-				case AN_1: case '1':
-					enc = AN_0; break;
-
-				case AN_H: case 'h': case 'H':
-					enc = AN_L; break;
-
-				case AN_L: case 'l': case 'L':
-					enc = AN_H; break;
-
-				case 'x': case 'X':
-					enc = AN_X; break;
-
-				case 'z': case 'Z':
-					enc = AN_Z; break;
-
-				case 'u': case 'U':
-					enc = AN_U; break;
-
-				case 'w': case 'W':
-					enc = AN_W; break;
-
-				default:
-					enc = enc & AN_MSK; break;
+				enc  = ((unsigned char)(h[i]->v.h_val));
+				switch(enc)	/* don't remember if it's preconverted in all cases; being conservative is OK */
+					{
+					case AN_0: case '0':
+						enc = AN_1; break;
+	
+					case AN_1: case '1':
+						enc = AN_0; break;
+	
+					case AN_H: case 'h': case 'H':
+						enc = AN_L; break;
+	
+					case AN_L: case 'l': case 'L':
+						enc = AN_H; break;
+	
+					case 'x': case 'X':
+						enc = AN_X; break;
+	
+					case 'z': case 'Z':
+						enc = AN_Z; break;
+	
+					case 'u': case 'U':
+						enc = AN_U; break;
+	
+					case 'w': case 'W':
+						enc = AN_W; break;
+	
+					default:
+						enc = enc & AN_MSK; break;
+					}
 				}
+				else
+				{
+				enc  = ((unsigned char)(h[i]->v.h_val)) & AN_MSK;
+				}
+
+			vadd->v[i] = enc;
 			}
 			else
 			{
-			enc  = ((unsigned char)(h[i]->v.h_val)) & AN_MSK;
+			if(h[i]->time >= 0)
+				{
+				if(h[i]->v.h_vector)
+					{
+					if((GLOBALS->loaded_file_type == GHW_FILE) && (h[i]->v.h_vector[0] == '\'') && (h[i]->v.h_vector[1]) && (h[i]->v.h_vector[2] == '\''))
+						{
+						char ghw_str[2] = {h[i]->v.h_vector[1], 0};
+						strcat(vadd->v, ghw_str);
+						}
+						else
+						{
+						strcat(vadd->v, h[i]->v.h_vector);
+						}
+					}			
+				}
 			}
 
-		vadd->v[i] = enc;
-
 		if(h[i]->next)
 			{
 			if((h[i]->next->time >= 0) && (h[i]->next->time < MAX_HISTENT_TIME-2))
diff --git a/src/ghwlib.c b/src/ghwlib.c
index 99d72d0..5264e86 100644
--- a/src/ghwlib.c
+++ b/src/ghwlib.c
@@ -483,6 +483,8 @@ get_nbr_elements (union ghw_type *t)
 int
 ghw_get_range_length (union ghw_range *rng)
 {
+assert(rng); /* scan-view detects possible null pointer dereference here through a convoluted sequence of steps which probably violate what GHW would do*/
+
   switch (rng->kind)
     {
     case ghdl_rtik_type_i32:
@@ -1203,6 +1205,8 @@ print_name (struct ghw_hie *hie, int full_names)
   struct ghw_hie **buf;
   struct ghw_hie **end;
 
+  assert (hie->name); /* scan view complains about possibility of depth=0 below on malloc */
+
   if (0 == full_names)
     {
       printf (" %s: ", hie->name);

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-electronics/gtkwave.git



More information about the Pkg-electronics-commits mailing list