diff -Nru gtkwave-3.3.101/ChangeLog gtkwave-3.3.102/ChangeLog --- gtkwave-3.3.101/ChangeLog 2019-05-23 03:15:27.000000000 +0000 +++ gtkwave-3.3.102/ChangeLog 2019-10-02 07:45:24.000000000 +0000 @@ -1709,3 +1709,8 @@ of 10 roundoff errors. Remove register keyword where applicable as is deprecated. Added --saveonexit gtkwave command line option. +3.3.102 21sep19 Remove redundant TREE_VHDL_ST_PACKAGE from SST exclude. + Added addCommentTracesFromList tcl command from user patch. + Harden savefile loader for missing group start on vectors. + Preliminary VHDL support for wlf2vcd. + Add missing return value checks on mmap() in FST writer. diff -Nru gtkwave-3.3.101/configure gtkwave-3.3.102/configure --- gtkwave-3.3.101/configure 2019-05-23 03:15:27.000000000 +0000 +++ gtkwave-3.3.102/configure 2019-10-02 07:45:24.000000000 +0000 @@ -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.101. +# Generated by GNU Autoconf 2.69 for gtkwave 3.3.102. # # Report bugs to . # @@ -580,8 +580,8 @@ # Identity of this package. PACKAGE_NAME='gtkwave' PACKAGE_TARNAME='gtkwave' -PACKAGE_VERSION='3.3.101' -PACKAGE_STRING='gtkwave 3.3.101' +PACKAGE_VERSION='3.3.102' +PACKAGE_STRING='gtkwave 3.3.102' PACKAGE_BUGREPORT='bybell@rocketmail.com' PACKAGE_URL='' @@ -1405,7 +1405,7 @@ # 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.101 to adapt to many kinds of systems. +\`configure' configures gtkwave 3.3.102 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1471,7 +1471,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of gtkwave 3.3.101:";; + short | recursive ) echo "Configuration of gtkwave 3.3.102:";; esac cat <<\_ACEOF @@ -1630,7 +1630,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -gtkwave configure 3.3.101 +gtkwave configure 3.3.102 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2274,7 +2274,7 @@ 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.101, which was +It was created by gtkwave $as_me 3.3.102, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3141,7 +3141,7 @@ # Define the identity of the package. PACKAGE='gtkwave' - VERSION='3.3.101' + VERSION='3.3.102' cat >>confdefs.h <<_ACEOF @@ -11499,7 +11499,7 @@ # 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.101, which was +This file was extended by gtkwave $as_me 3.3.102, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -11565,7 +11565,7 @@ 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.101 +gtkwave config.status 3.3.102 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff -Nru gtkwave-3.3.101/configure.ac gtkwave-3.3.102/configure.ac --- gtkwave-3.3.101/configure.ac 2019-05-23 03:15:28.000000000 +0000 +++ gtkwave-3.3.102/configure.ac 2019-10-02 07:45:25.000000000 +0000 @@ -2,7 +2,7 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ(2.59) -AC_INIT(gtkwave, 3.3.101, bybell@rocketmail.com) +AC_INIT(gtkwave, 3.3.102, bybell@rocketmail.com) AC_CONFIG_SRCDIR([src/vcd.c]) AM_INIT_AUTOMAKE AC_CONFIG_HEADER([config.h]) diff -Nru gtkwave-3.3.101/contrib/wlf2vcd/wlf2vcd.c gtkwave-3.3.102/contrib/wlf2vcd/wlf2vcd.c --- gtkwave-3.3.101/contrib/wlf2vcd/wlf2vcd.c 2019-05-23 03:15:28.000000000 +0000 +++ gtkwave-3.3.102/contrib/wlf2vcd/wlf2vcd.c 2019-10-02 07:45:25.000000000 +0000 @@ -17,6 +17,8 @@ /* definition of WlfVreg from wlf_api.h */ #define WLF2VCD_MVL4 "01zx" +#define WLF2VCD_MVL9 "ux01zwlh-" +static const char *wlf_mvl9[9] = {"'U'", "'X'", "'0'", "'1'", "'Z'", "'W'", "'L'", "'H'", "'-'"}; typedef struct WlfGlobalContext { @@ -31,6 +33,8 @@ unsigned int max_bits; unsigned int num_aliases; +unsigned is_vhdl : 1; + unsigned char *value_string; int *archive_number; WlfSymbolId *archive_sym; @@ -41,9 +45,10 @@ static void AddSymbolToCB( WlfSymbolId sym, unsigned int vcdid, - unsigned int num_bits, + int num_bits, unsigned int is_real, unsigned int is_vbit, + unsigned int is_vhbit, unsigned int is_vreg ); @@ -58,6 +63,7 @@ unsigned int num_bits; unsigned is_real : 1; unsigned is_vbit : 1; +unsigned is_vhbit : 1; unsigned is_vreg : 1; } cbData; @@ -108,6 +114,7 @@ WlfIterId iter; WlfSymbolId sym; int cnt; +WlfDataType vtyp; /* create an iterator to retrieve children of top */ iter = wlfSymChildren64(top, wlfSelAll); @@ -119,6 +126,11 @@ cnt = wlfSymPropInt(sym, WLF_PROP_SUBELEMENT_COUNT); WlfSymbolSel64 typ = wlfSymPropSymbolSel64(sym, WLF_PROP_SYMBOL_TYPE); + if(typ & wlfSelVhdlScopes) + { + wgc.is_vhdl = 1; + } + if(typ & (wlfSelVhdlScopes | wlfSelVlogScopes)) { wgc.num_scopes++; @@ -126,21 +138,32 @@ else { WlfTypeId wid = wlfSymPropTypeId(sym, WLF_PROP_TYPE_ID); - WlfDataType vtyp = wlfTypePropDataType(wid, WLF_TYPE_TYPE); + vtyp = wlfTypePropDataType(wid, WLF_TYPE_TYPE); + if(vtyp == wlfTypeRecord) + { + // fprintf(stderr, "wlfTypeRecord %d\n", cnt); + wgc.num_scopes++; + } + else if(vtyp != wlfTypeArray) /* still possibly have to recurse */ { int rgh = wlfTypePropInt(wid, WLF_TYPE_ARRAY_RIGHT); int lft = wlfTypePropInt(wid, WLF_TYPE_ARRAY_LEFT); int len = wlfTypePropInt(wid, WLF_TYPE_ARRAY_LENGTH); + if(vtyp == wlfTypeScalar) + { + lft = 31; rgh = 0; len = 32; + } + wgc.num_symbols++; if(len > wgc.max_bits) wgc.max_bits = len; } } - /* recurse through the children, but block out bitblasted children */ - if(cnt<=0) + /* recurse through the children, but block out bitblasted children (except vhdl) */ + if((cnt<=0) || (wgc.is_vhdl)) { countSubElements(sym); } @@ -267,6 +290,7 @@ unsigned int is_real = 0; unsigned int is_vbit = 0; + unsigned int is_vhbit = 0; unsigned int num_bits = 0; unsigned int is_vreg = 0; char *vartype = NULL; @@ -312,7 +336,7 @@ case wlfSelNamedEvent: vartype = "event"; break; /* wlfSelHdlSignals */ - case wlfSelSignal: + case wlfSelSignal: vartype = "wire"; break; break; case wlfSelNet: vartype = "wire"; break; @@ -323,7 +347,8 @@ case wlfSelGeneric: case wlfSelAlias: - default: break; + default: fprintf(stderr, "Type: %d\n", typ); exit(255); + break; } WlfModeSel ptyp = wlfSymPropModeSel(sym, WLF_PROP_PORT_TYPE); @@ -333,15 +358,23 @@ { wgc.prev_hier[wgc.prev_hier_len - 1] = 0; char *pmod = strrchr(wgc.prev_hier, '/'); + char *dmod = strrchr(wgc.prev_hier, '.'); + if(dmod && (dmod - pmod > 0)) pmod = dmod; *(pmod + 1) = 0; wgc.prev_hier_len = pmod - wgc.prev_hier + 1; printf("$upscope $end\n"); } - if(typ & (wlfSelVhdlScopes | wlfSelVlogScopes)) + WlfTypeId wid = wlfSymPropTypeId(sym, WLF_PROP_TYPE_ID); + WlfDataType vtyp = wlfTypePropDataType(wid, WLF_TYPE_TYPE); + + if((typ & (wlfSelVhdlScopes | wlfSelVlogScopes)) || (vtyp == wlfTypeRecord)) { char *ls = strrchr(name, '/'); + char *ds = strrchr(name, '.'); + if(ds && (ds - ls > 0)) ls = ds; + char *sname = ls ? (ls+1) : name; printf("$scope %s %s $end\n", scopetype, sname); @@ -353,20 +386,47 @@ int hlen = strlen(name); wgc.prev_hier = malloc(hlen + 1 + 1); memcpy(wgc.prev_hier, name, hlen); - wgc.prev_hier[hlen] = '/'; + wgc.prev_hier[hlen] = (vtyp == wlfTypeRecord) ? '.' : '/'; wgc.prev_hier[(wgc.prev_hier_len = hlen + 1)] = 0; } else { - WlfTypeId wid = wlfSymPropTypeId(sym, WLF_PROP_TYPE_ID); - WlfDataType vtyp = wlfTypePropDataType(wid, WLF_TYPE_TYPE); - if(vtyp != wlfTypeArray) /* still possibly have to recurse, depends on value of cnt below */ { int rgh = wlfTypePropInt(wid, WLF_TYPE_ARRAY_RIGHT); int lft = wlfTypePropInt(wid, WLF_TYPE_ARRAY_LEFT); int len = wlfTypePropInt(wid, WLF_TYPE_ARRAY_LENGTH); + if(vtyp == wlfTypeScalar) + { + lft = 31; rgh = 0; len = 32; + is_vbit = 1; is_vhbit = 0; is_real = 0; is_vreg = 0; + } + + if(vtyp == wlfTypeEnum) + { + char **enumLiterals; + int i, count; + wlfEnumLiterals(wid, &enumLiterals, &count); + if(count == 9) + { + for(i=0;i<9;i++) + { + if(strcmp(enumLiterals[i], wlf_mvl9[i])) + { + break; + } + } + if(i == 9) + { + is_vhbit = 1; + is_vbit = 0; + lft = rgh = 0; + len = 1; + } + } + } + if((is_real) || (vtyp == wlfTypeReal) || (vtyp == wlfTypeVlogReal)) { is_real = 1; @@ -387,7 +447,7 @@ if(!vcdid) { - AddSymbolToCB(sym, ++wgc.vcdid_added, num_bits = len, is_real, is_vbit, is_vreg); + AddSymbolToCB(sym, ++wgc.vcdid_added, num_bits = len, is_real, is_vbit, is_vhbit, is_vreg); vcdid = wgc.vcdid_added; if(arch >= 0) { @@ -406,26 +466,57 @@ wgc.num_aliases++; } + char *rsl = strrchr(name, '.'); + if(!rsl) rsl = strrchr(name, '/'); + + char *lp = strrchr(rsl, '('); + char *rp = strrchr(rsl, ')'); + char *lp2 = NULL, *rp2 = NULL; + if(lp && rp) + { + *lp = '['; *rp = ']'; + + lp2 = strrchr(rsl, '('); + rp2 = strrchr(rsl, ')'); + if(lp2 && rp2) + { + *lp2 = '['; *rp2 = ']'; + } + else + { + lp2 = rp2 = NULL; + } + } + if((lft != rgh) && (!is_vbit) && (!is_real)) { - printf("$var %s %d %s %s [%d:%d] $end\n", vartype, len, genVcdID(vcdid_str, vcdid), strrchr(name, '/')+1, lft, rgh); + printf("$var %s %d %s %s [%d:%d] $end\n", vartype, len, genVcdID(vcdid_str, vcdid), rsl+1, lft, rgh); } else { if(cnt && (!is_vbit) && (!is_real)) { - printf("$var %s %d %s %s [%d] $end\n", vartype, len, genVcdID(vcdid_str, vcdid), strrchr(name, '/')+1, lft); + printf("$var %s %d %s %s [%d] $end\n", vartype, len, genVcdID(vcdid_str, vcdid), rsl+1, lft); } else { - printf("$var %s %d %s %s $end\n", vartype, len, genVcdID(vcdid_str, vcdid), strrchr(name, '/')+1); + printf("$var %s %d %s %s $end\n", vartype, len, genVcdID(vcdid_str, vcdid), rsl+1); } } + + if(lp && rp) + { + *lp = '('; *rp = ')'; + } + if(lp2 && rp2) + { + *lp2 = '('; *rp2 = ')'; + } } } - /* recurse through the children, but block out bitblasted children */ - if(cnt<=0) + /* recurse through the children, but block out bitblasted children (except vhdl) */ + if((cnt<=0) || (wgc.is_vhdl)) { printSubElements(sym); } @@ -490,7 +581,15 @@ unsigned char *pv = ((cbData*) data)->pv; char *value = wgc.value_string; - if(((cbData*) data)->is_vbit) + if(((cbData*) data)->is_vhbit) + { + for(i=0;iis_vbit) { WlfVbit *ip = (WlfVbit *)pv; int bitrvs = (nbits - 1); @@ -646,9 +745,10 @@ static void AddSymbolToCB( WlfSymbolId sym, unsigned int vcdid, - unsigned int num_bits, + int num_bits, unsigned int is_real, unsigned int is_vbit, + unsigned int is_vhbit, unsigned int is_vreg ) { @@ -664,9 +764,10 @@ pdata->pv = wlfValueGetValue(val); #endif pdata->vcdid = vcdid; - pdata->num_bits = num_bits; + pdata->num_bits = (num_bits < 0) ? 0 : num_bits; // ?? how to fix properly pdata->is_real = is_real; pdata->is_vbit = is_vbit; + pdata->is_vhbit = is_vhbit; pdata->is_vreg = is_vreg; status = wlfAddSignalEventCB(wgc.pack, sym, val, WLF_REQUEST_POSTPONED, sigCb, pdata); if(status != WLF_OK) @@ -693,6 +794,7 @@ wgc.prev_hier = NULL; wgc.prev_hier_len = 0; wgc.vcdid_added = 0; +wgc.is_vhdl = 0; if(argc < 2) { diff -Nru gtkwave-3.3.101/debian/changelog gtkwave-3.3.102/debian/changelog --- gtkwave-3.3.101/debian/changelog 2019-05-25 01:49:30.000000000 +0000 +++ gtkwave-3.3.102/debian/changelog 2019-10-19 05:44:26.000000000 +0000 @@ -1,10 +1,24 @@ -gtkwave (3.3.101-1~1.gbpdc2426) UNRELEASED; urgency=medium +gtkwave (3.3.102-1~1.gbp962719) UNRELEASED; urgency=medium - ** SNAPSHOT build @dc24260486889dd531750112bcb3441338b005b3 ** + ** SNAPSHOT build @96271968f53c5e892bb6936ae1cf282f14cc7642 ** + + * Imported Upstream version 3.3.102 + * Update standards version to 4.4.1 + * Add Rules-Requires-Root: no + + -- أحمد المحمودي (Ahmed El-Mahmoudy) Sat, 19 Oct 2019 07:44:26 +0200 + +gtkwave (3.3.101-2) unstable; urgency=medium + + * Upload to unstable + + -- أحمد المحمودي (Ahmed El-Mahmoudy) Thu, 04 Jul 2019 03:20:35 +0200 + +gtkwave (3.3.101-1) experimental; urgency=medium * Imported Upstream version 3.3.101 - -- أحمد المحمودي (Ahmed El-Mahmoudy) Sat, 25 May 2019 03:49:30 +0200 + -- أحمد المحمودي (Ahmed El-Mahmoudy) Sat, 25 May 2019 04:06:09 +0200 gtkwave (3.3.100-1) experimental; urgency=medium diff -Nru gtkwave-3.3.101/debian/control gtkwave-3.3.102/debian/control --- gtkwave-3.3.101/debian/control 2019-05-25 01:49:30.000000000 +0000 +++ gtkwave-3.3.102/debian/control 2019-10-19 05:44:26.000000000 +0000 @@ -3,9 +3,10 @@ Priority: optional Maintainer: Debian Electronics Team Uploaders: أحمد المحمودي (Ahmed El-Mahmoudy) -Standards-Version: 4.3.0 +Standards-Version: 4.4.1 Build-Depends: debhelper (>= 12), libgtk2.0-dev, zlib1g-dev, libbz2-dev, flex, gperf, tcl-dev, tk-dev, liblzma-dev, libjudy-dev +Rules-Requires-Root: no Homepage: http://gtkwave.sourceforge.net/ Vcs-Git: https://salsa.debian.org/electronics-team/gtkwave.git Vcs-Browser: https://salsa.debian.org/electronics-team/gtkwave Binary files /tmp/tmpHZjeMA/AhaeTr8wFd/gtkwave-3.3.101/doc/gtkwave.odt and /tmp/tmpHZjeMA/oyGeSxf2i_/gtkwave-3.3.102/doc/gtkwave.odt differ diff -Nru gtkwave-3.3.101/LICENSE.TXT gtkwave-3.3.102/LICENSE.TXT --- gtkwave-3.3.101/LICENSE.TXT 2019-05-23 03:15:28.000000000 +0000 +++ gtkwave-3.3.102/LICENSE.TXT 2019-10-02 07:45:25.000000000 +0000 @@ -1,6 +1,6 @@ ########################################################################## -GTKWave 3.3.101 Wave Viewer is Copyright (C) 1999-2019 Tony Bybell. +GTKWave 3.3.102 Wave Viewer is Copyright (C) 1999-2019 Tony Bybell. Portions of GTKWave are Copyright (C) 1999-2019 Udi Finkelstein. Context support is Copyright (C) 2007-2019 Kermin Elliott Fleming. Trace group support is Copyright (C) 2009-2019 Donald Baltus. diff -Nru gtkwave-3.3.101/src/helpers/fst/fstapi.c gtkwave-3.3.102/src/helpers/fst/fstapi.c --- gtkwave-3.3.101/src/helpers/fst/fstapi.c 2019-05-23 03:15:27.000000000 +0000 +++ gtkwave-3.3.102/src/helpers/fst/fstapi.c 2019-10-02 07:45:24.000000000 +0000 @@ -42,6 +42,7 @@ #include "fstapi.h" #include "fastlz.h" #include "lz4.h" +#include #ifndef HAVE_LIBPTHREAD #undef FST_WRITER_PARALLEL @@ -952,6 +953,17 @@ /* * mmap functions */ +static void fstWriterMmapSanity(void *pnt, const char *file, int line, const char *usage) +{ +if(pnt == MAP_FAILED) + { + fprintf(stderr, "fstMmap() assigned to %s failed: errno: %d, file %s, line %d.\n", usage, errno, file, line); + perror("Why"); + pnt = NULL; + } +} + + static void fstWriterCreateMmaps(struct fstWriterContext *xc) { off_t curpos = ftello(xc->handle); @@ -974,12 +986,20 @@ if(!xc->valpos_mem) { fflush(xc->valpos_handle); - xc->valpos_mem = (uint32_t *)fstMmap(NULL, xc->maxhandle * 4 * sizeof(uint32_t), PROT_READ|PROT_WRITE, MAP_SHARED, fileno(xc->valpos_handle), 0); + errno = 0; + if(xc->maxhandle) + { + fstWriterMmapSanity(xc->valpos_mem = (uint32_t *)fstMmap(NULL, xc->maxhandle * 4 * sizeof(uint32_t), PROT_READ|PROT_WRITE, MAP_SHARED, fileno(xc->valpos_handle), 0), __FILE__, __LINE__, "xc->valpos_mem"); + } } if(!xc->curval_mem) { fflush(xc->curval_handle); - xc->curval_mem = (unsigned char *)fstMmap(NULL, xc->maxvalpos, PROT_READ|PROT_WRITE, MAP_SHARED, fileno(xc->curval_handle), 0); + errno = 0; + if(xc->maxvalpos) + { + fstWriterMmapSanity(xc->curval_mem = (unsigned char *)fstMmap(NULL, xc->maxvalpos, PROT_READ|PROT_WRITE, MAP_SHARED, fileno(xc->curval_handle), 0), __FILE__, __LINE__, "xc->curval_handle"); + } } } @@ -1682,7 +1702,8 @@ tlen = ftello(xc->tchn_handle); fstWriterFseeko(xc, xc->tchn_handle, 0, SEEK_SET); -tmem = (unsigned char *)fstMmap(NULL, tlen, PROT_READ|PROT_WRITE, MAP_SHARED, fileno(xc->tchn_handle), 0); +errno = 0; +fstWriterMmapSanity(tmem = (unsigned char *)fstMmap(NULL, tlen, PROT_READ|PROT_WRITE, MAP_SHARED, fileno(xc->tchn_handle), 0), __FILE__, __LINE__, "tmem"); if(tmem) { unsigned long destlen = tlen; @@ -1874,7 +1895,7 @@ if(xc && !xc->already_in_close && !xc->already_in_flush) { - unsigned char *tmem; + unsigned char *tmem = NULL; off_t fixup_offs, tlen, hlen; xc->already_in_close = 1; /* never need to zero this out as it is freed at bottom */ @@ -1912,7 +1933,12 @@ /* write out geom section */ fflush(xc->geom_handle); tlen = ftello(xc->geom_handle); - tmem = (unsigned char *)fstMmap(NULL, tlen, PROT_READ|PROT_WRITE, MAP_SHARED, fileno(xc->geom_handle), 0); + errno = 0; + if(tlen) + { + fstWriterMmapSanity(tmem = (unsigned char *)fstMmap(NULL, tlen, PROT_READ|PROT_WRITE, MAP_SHARED, fileno(xc->geom_handle), 0), __FILE__, __LINE__, "tmem"); + } + if(tmem) { unsigned long destlen = tlen; @@ -2020,14 +2046,18 @@ { int lz4_maxlen; unsigned char *mem; - unsigned char *hmem; + unsigned char *hmem = NULL; int packed_len; fflush(xc->handle); lz4_maxlen = LZ4_compressBound(xc->hier_file_len); mem = (unsigned char *)malloc(lz4_maxlen); - hmem = (unsigned char *)fstMmap(NULL, xc->hier_file_len, PROT_READ|PROT_WRITE, MAP_SHARED, fileno(xc->hier_handle), 0); + errno = 0; + if(xc->hier_file_len) + { + fstWriterMmapSanity(hmem = (unsigned char *)fstMmap(NULL, xc->hier_file_len, PROT_READ|PROT_WRITE, MAP_SHARED, fileno(xc->hier_handle), 0), __FILE__, __LINE__, "hmem"); + } packed_len = LZ4_compress((char *)hmem, (char *)mem, xc->hier_file_len); fstMunmap(hmem, xc->hier_file_len); diff -Nru gtkwave-3.3.101/src/savefile.c gtkwave-3.3.102/src/savefile.c --- gtkwave-3.3.101/src/savefile.c 2019-05-23 03:15:27.000000000 +0000 +++ gtkwave-3.3.102/src/savefile.c 2019-10-02 07:45:24.000000000 +0000 @@ -995,6 +995,7 @@ char *prefix, *suffix, *new; char *prefix_init, *w2_init; unsigned int mode; + int current_grp_depth = -1; if(!(len=strlen(w))) return(0); if(*(w+len-1)=='\n') @@ -1249,6 +1250,8 @@ b = maketyp ? makevec(prefix+1,w2) : makevec_annotated(prefix+1,w2); /* '#' vs ':' cases... */ + if(GLOBALS->default_flags&TR_GRP_BEGIN_B) { current_grp_depth = GLOBALS->group_depth; } + if(b) { if((v=bits2vector(b))) @@ -1257,7 +1260,7 @@ AddVector(v, alias); free_2(b->name); b->name=NULL; - return(v!=NULL); + goto grp_bot; } else { @@ -1312,6 +1315,8 @@ } } +grp_bot: + if((GLOBALS->default_flags&TR_GRP_BEGIN_B) && (current_grp_depth >= 0) && (current_grp_depth == GLOBALS->group_depth)) { AddBlankTrace(prefix+1); } return(v!=NULL); } else diff -Nru gtkwave-3.3.101/src/tcl_commands.c gtkwave-3.3.102/src/tcl_commands.c --- gtkwave-3.3.101/src/tcl_commands.c 2019-05-23 03:15:27.000000000 +0000 +++ gtkwave-3.3.102/src/tcl_commands.c 2019-10-02 07:45:24.000000000 +0000 @@ -1168,6 +1168,44 @@ return(TCL_OK); } +static int gtkwavetcl_addCommentTracesFromList(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) +{ +char reportString[33]; +Tcl_Obj *aobj; + +if(objc==2) + { + char *s = Tcl_GetString(objv[1]); + char** elem = NULL; + int i, l = 0; + + elem = zSplitTclList(s, &l); + if(elem) + { + for(i=0;isignalwindow_width_dirty=1; + MaxSignalLength(); + signalarea_configure_event(GLOBALS->signalarea, NULL); + wavearea_configure_event(GLOBALS->wavearea, NULL); + + sprintf(reportString, "%d", l); + + aobj = Tcl_NewStringObj(reportString, -1); + Tcl_SetObjResult(interp, aobj); + } + else + { + return(gtkwavetcl_badNumArgs(clientData, interp, objc, objv, 1)); + } + +return(TCL_OK); +} static int gtkwavetcl_addSignalsFromList(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { @@ -2244,6 +2282,7 @@ tcl_cmdstruct gtkwave_commands[] = { + {"addCommentTracesFromList", gtkwavetcl_addCommentTracesFromList}, {"addSignalsFromList", gtkwavetcl_addSignalsFromList}, {"deleteSignalsFromList", gtkwavetcl_deleteSignalsFromList}, {"deleteSignalsFromListIncludingDuplicates", gtkwavetcl_deleteSignalsFromListIncludingDuplicates}, @@ -2295,7 +2334,11 @@ {"installFileFilter", gtkwavetcl_installFileFilter}, {"installProcFilter", gtkwavetcl_installProcFilter}, {"installTransFilter", gtkwavetcl_installTransFilter}, + {"loadFile", gtkwavetcl_loadFile}, {"nop", gtkwavetcl_nop}, + {"presentWindow", gtkwavetcl_presentWindow}, + {"processTclList", gtkwavetcl_processTclList}, /* not for general-purpose use */ + {"reLoadFile", gtkwavetcl_reLoadFile}, {"setBaselineMarker", gtkwavetcl_setBaselineMarker}, {"setCurrentTranslateEnums", gtkwavetcl_setCurrentTranslateEnums}, {"setCurrentTranslateFile", gtkwavetcl_setCurrentTranslateFile}, @@ -2313,13 +2356,9 @@ {"setWindowStartTime", gtkwavetcl_setWindowStartTime}, {"setZoomFactor", gtkwavetcl_setZoomFactor}, {"setZoomRangeTimes", gtkwavetcl_setZoomRangeTimes}, - {"loadFile", gtkwavetcl_loadFile}, - {"reLoadFile", gtkwavetcl_reLoadFile}, - {"presentWindow", gtkwavetcl_presentWindow}, {"showSignal", gtkwavetcl_showSignal}, - {"unhighlightSignalsFromList", gtkwavetcl_unhighlightSignalsFromList}, {"signalChangeList", gtkwavetcl_signalChangeList}, /* changed from signal_change_list for consistency! */ - {"processTclList", gtkwavetcl_processTclList}, /* not for general-purpose use */ + {"unhighlightSignalsFromList", gtkwavetcl_unhighlightSignalsFromList}, {"", NULL} /* sentinel */ }; diff -Nru gtkwave-3.3.101/src/tree.c gtkwave-3.3.102/src/tree.c --- gtkwave-3.3.101/src/tree.c 2019-05-23 03:15:27.000000000 +0000 +++ gtkwave-3.3.102/src/tree.c 2019-10-02 07:45:24.000000000 +0000 @@ -1121,7 +1121,6 @@ else if(!strcmp(p, "VHDL_ST_GENFOR")) { exclhier |= exclone << TREE_VHDL_ST_GENFOR; } else if(!strcmp(p, "VHDL_ST_INSTANCE")) { exclhier |= exclone << TREE_VHDL_ST_INSTANCE; } else if(!strcmp(p, "VHDL_ST_PACKAGE")) { exclhier |= exclone << TREE_VHDL_ST_PACKAGE; } - else if(!strcmp(p, "VHDL_ST_PACKAGE")) { exclhier |= exclone << TREE_VHDL_ST_PACKAGE; } else if(!strcmp(p, "VHDL_ST_SIGNAL")) { exclhier |= exclone << TREE_VHDL_ST_SIGNAL; } else if(!strcmp(p, "VHDL_ST_PORTIN")) { exclhier |= exclone << TREE_VHDL_ST_PORTIN; }