Commit 17fca396 authored by rdubner's avatar rdubner

Merge branch 'bobdev' of gitlab.cobolworx.com:COBOLworx/cbl-gdb into bobdev

parents a2802504 3213efde
Symas COBOL Debugging Package
COBOLworx COBOL Debugging Package
The enclosed software consists of Symas COBOL Debugging Package software.
The Symas COBOL Debugging Package consists of software that has been expertly
compiled, tested, and packaged for easy installation and use. The Symas COBOL
The enclosed software consists of COBOLworx COBOL Debugging Package software.
The COBOLworx COBOL Debugging Package consists of software that has been expertly
compiled, tested, and packaged for easy installation and use. The COBOLworx COBOL
Debugging Package is available for many platforms and operating systems.
The purpose of this software is to provide a solution for organizations that
need the dependability and convenience of pre-packaged and supported products
combined with the advantages of Open Source software.
The Symas COBOL Debugging Package contains software that is governed by the
Symas COBOL Debugging Package Public License
The COBOLworx COBOL Debugging Package contains software that is governed by the
COBOLworx COBOL Debugging Package Public License
Symas does not offer any warranty or assume any liability beyond what is
COBOLworx does not offer any warranty or assume any liability beyond what is
contained in these licenses and copyrights.
If you wish to obtain copies of the source files that were used to produce
The Symas COBOL Debugging Package, you may do so by sending email to
sales@symas.com. A small handling fee will apply.
The COBOLworx COBOL Debugging Package, you may do so by sending email to
sales@cobolworx.com. A small handling fee will apply.
We hope your experience using Symas's packaged Open Source products is
We hope your experience using COBOLworx's packaged Open Source products is
pleasant and rewarding. We are always interested in hearing user comments,
so please feel free to contact us at any time regarding this or our other
fine packaged open source products.
=============================================================================
The Symas COBOL Debugging Package Public License
The COBOLworx COBOL Debugging Package Public License
Version 1.0, 2020-February-26
Redistribution and use of this software and associated documentation
......@@ -43,14 +43,14 @@ with the distribution, and
3. Redistributions must contain a verbatim copy of this document.
Symas may revise this license from time to time. Each revision is distinguished
COBOLworx may revise this license from time to time. Each revision is distinguished
by a version number. You may use this Software under terms of this license
revision or under the terms of any subsequent revision of the license.
THIS SOFTWARE IS PROVIDED BY SYMAS AND ITS CONTRIBUTORS `AS IS'' AND ANY
THIS SOFTWARE IS PROVIDED BY COBOLWORX AND ITS CONTRIBUTORS `AS IS'' AND ANY
EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL SYMAS, ITS CONTRIBUTORS, OR THE AUTHOR(S) OR
DISCLAIMED. IN NO EVENT SHALL COBOLWORX, ITS CONTRIBUTORS, OR THE AUTHOR(S) OR
OWNER(S) OF THE SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
......@@ -64,7 +64,7 @@ or otherwise to promote the sale, use or other dealing in this Software without
specific, written prior permission. Title to copyright in this Software shall
at all times remain with copyright holders.
Copyright (c) 2019-2020 Symas Corporation, Grand Junction, Colorado, USA. All
Copyright (c) 2019-2020 COBOLworx Corporation, Grand Junction, Colorado, USA. All
Rights Reserved. Permission to copy and distribute verbatim copies of this
document is granted.
......@@ -72,7 +72,7 @@ document is granted.
=============================================================================
/* #######################################################################
# Copyright (c) 2019-2020 Symas Corporation
# Copyright (c) 2019-2020 COBOLworx Corporation
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
......@@ -84,7 +84,7 @@ document is granted.
# notice, this list of conditions and the following disclaimer in
# the documentation and/or other materials provided with the
# distribution.
# * Neither the name of the Symas Corporation nor the names of its
# * Neither the name of the COBOLworx Corporation nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
......
# Camelian.Systems GnuCOBOL Source Level Debugging Support
# COBOLworx GnuCOBOL Source Level Debugging Support
These are the source files for building the tools that make up the Symas/Camelian debugging extensions for GnuCOBOL.
These are the source files for building the tools that make up the COBOLworx debugging extensions for GnuCOBOL.
You'll need to have GnuCOBOL Version 3.x-dev (or later) installed.
......@@ -42,7 +42,7 @@ It should be emphasized that there are now two branches that are required to be
origin/master is supposed to be stable and buildable at all times.
origin/relcan, for "release candidate", is used by the camelian-packages repositories package-
origin/relcan, for "release candidate", is used by the cbl-gdb-distribution repositories package-
building routines for creating packages. My procedure lately has been to fuss and fiddle
with relcan until the completed final packages work properly, and then merge relcan into
master. That merge gets tagged as a release version, and at that point ../include/version.h
......@@ -53,5 +53,5 @@ Feel free to contact me with any questions or problems.
2020-05-07
Bob Dubner
Symas/Camelian
rdubner@symas.com
COBOLworx
support@cobolworx.com
......@@ -58,10 +58,19 @@ if uname -a | grep -q arm ; then
if grep -qs debian /etc/os-release ; then
os_name=debian
fi
if grep -qs centos /etc/os-release ; then
os_name=centos
fi
if uname -a | grep -qs centos7 ; then
os_name=centos7
fi
if uname -a | grep -qs rhel7 ; then
os_name=rhel7
fi
if uname | grep -q MINGW32_NT ; then
os_name=MINGW32_NT
fi
......@@ -92,9 +101,15 @@ LOADER=`$GCC --print-prog-name ld`
if test X"$COBCDEVEL" != X"" ; then
COBST=$DIR/cobcd-st/cobcd-st
SFIX=$DIR/cobcd-sfix/cobcd-sfix
PYTHON=$DIR/python/cobcd.py
else
COBST=cobcd-st
SFIX=cobcd-sfix
PYTHON=`which cobcd.py`
fi
if test X"$os_name" == X"centos7" || test X"$os_name" == X"rhel7" ; then
COBST_FLAGS=-n
fi
###########################################################
......@@ -288,27 +303,29 @@ BASENAME=$(echo $BASENAME | sed "s/$TRUEBASENAME/$TRUEBASENAME$TEMPEST/")
#cp $TRUESOURCEFILE $SOURCEFILE ## This is part of the failed "compile elsewhere" effort
if test X$ECHO != X"" ; then
echo platform $platform
echo os_name $os_name
echo GCC $GCC
echo CC1 $CC1
echo ASSEMBLER $ASSEMBLER
echo LOADER $LOADER
echo COBC $COBC
echo cob_cflags $cob_cflags
echo COBST $COBST
echo SFIX $SFIX
echo COBCDEVEL $COBCDEVEL
echo COBCDNOCLEAN $COBCDNOCLEAN
echo COBCDXM $COBCDXM
echo ORIGINAL $ORIGINAL
echo PREOPTIONS $PREOPTIONS
echo platform $platform
echo os_name $os_name
echo GCC $GCC
echo CC1 $CC1
echo ASSEMBLER $ASSEMBLER
echo LOADER $LOADER
echo COBC $COBC
echo cob_cflags $cob_cflags
echo COBST $COBST
echo COBST_FLAGS $COBST_FLAGS
echo SFIX $SFIX
echo PYTHON $PYTHON
echo COBCDEVEL $COBCDEVEL
echo COBCDNOCLEAN $COBCDNOCLEAN
echo COBCDXM $COBCDXM
echo ORIGINAL $ORIGINAL
echo PREOPTIONS $PREOPTIONS
echo TRUESOURCEFILE $TRUESOURCEFILE
echo TRUEBASENAME $TRUEBASENAME
echo SOURCEFILE $SOURCEFILE
echo BASENAME $BASENAME
echo POSTOPTIONS $POSTOPTIONS
echo TARGET $TARGET
echo TRUEBASENAME $TRUEBASENAME
echo SOURCEFILE $SOURCEFILE
echo BASENAME $BASENAME
echo POSTOPTIONS $POSTOPTIONS
echo TARGET $TARGET
set | grep COB
fi
......@@ -361,9 +378,9 @@ if test X$result = X"0" ; then
if test X$result = X"0" ; then
if test X$ECHO != X"" ; then
echo $COBST -q $BASENAME
echo $COBST -q $COBST_FLAGS $BASENAME
fi
$COBST -q $BASENAME
$COBST -q $COBST_FLAGS $BASENAME
result=$?
fi
......@@ -431,13 +448,14 @@ if test X$result = X"0" ; then
## if it is necessary for this operating system:
if test X$result = X"0" ; then
if test X$os_name = X"MINGW32_NT" || test X$os_name = X"MINGW64_NT" || test X$os_name = X"MSYS_NT" ; then
if test -f $DIR/cobcd.py ; then
cp $DIR/cobcd.py ./$BASENAME-gdb.py
elif test -f $DIR/python/cobcd.py ; then
cp $DIR/python/cobcd.py ./$BASENAME-gdb.py
elif test -f /usr/local/bin/cobcd.py ; then
cp /usr/local/bin/cobcd.py ./$BASENAME-gdb.py
if test X$os_name = X"MINGW32_NT" \
|| test X$os_name = X"MINGW64_NT" \
|| test X$os_name = X"MSYS_NT" \
|| test X$os_name = X"centos7" \
|| test X$os_name = X"rhel7" \
; then
if test -f $PYTHON ; then
cp $PYTHON ./$BASENAME-gdb.py
else
echo ERROR: "Couldn't find a copy of cobcd.py"
fi
......
/* #######################################################################
# Copyright (c) 2019-2020 Symas Corporation
# Copyright (c) 2019-2020 COBOLworx Corporation
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
......@@ -11,7 +11,7 @@
# notice, this list of conditions and the following disclaimer in
# the documentation and/or other materials provided with the
# distribution.
# * Neither the name of the Symas Corporation nor the names of its
# * Neither the name of the COBOLworx Corporation nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
......
/* #######################################################################
# Copyright (c) 2019-2020 Symas Corporation
# Copyright (c) 2019-2020 COBOLworx Corporation
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
......@@ -11,7 +11,7 @@
# notice, this list of conditions and the following disclaimer in
# the documentation and/or other materials provided with the
# distribution.
# * Neither the name of the Symas Corporation nor the names of its
# * Neither the name of the COBOLworx Corporation nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
......
/* #######################################################################
# Copyright (c) 2019-2020 Symas Corporation
# Copyright (c) 2019-2020 COBOLworx Corporation
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
......@@ -11,7 +11,7 @@
# notice, this list of conditions and the following disclaimer in
# the documentation and/or other materials provided with the
# distribution.
# * Neither the name of the Symas Corporation nor the names of its
# * Neither the name of the COBOLworx Corporation nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
......
/* #######################################################################
# Copyright (c) 2019-2020 Symas Corporation
# Copyright (c) 2019-2020 COBOLworx Corporation
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
......@@ -11,7 +11,7 @@
# notice, this list of conditions and the following disclaimer in
# the documentation and/or other materials provided with the
# distribution.
# * Neither the name of the Symas Corporation nor the names of its
# * Neither the name of the COBOLworx Corporation nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
......
/* #######################################################################
# Copyright (c) 2019-2020 Symas Corporation
# Copyright (c) 2019-2020 COBOLworx Corporation
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
......@@ -11,7 +11,7 @@
# notice, this list of conditions and the following disclaimer in
# the documentation and/or other materials provided with the
# distribution.
# * Neither the name of the Symas Corporation nor the names of its
# * Neither the name of the COBOLworx Corporation nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
......
/* #######################################################################
# Copyright (c) 2019-2020 Symas Corporation
# Copyright (c) 2019-2020 COBOLworx Corporation
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
......@@ -11,7 +11,7 @@
# notice, this list of conditions and the following disclaimer in
# the documentation and/or other materials provided with the
# distribution.
# * Neither the name of the Symas Corporation nor the names of its
# * Neither the name of the COBOLworx Corporation nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
......
/* #######################################################################
# Copyright (c) 2019-2020 Symas Corporation
# Copyright (c) 2019-2020 COBOLworx Corporation
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
......@@ -11,7 +11,7 @@
# notice, this list of conditions and the following disclaimer in
# the documentation and/or other materials provided with the
# distribution.
# * Neither the name of the Symas Corporation nor the names of its
# * Neither the name of the COBOLworx Corporation nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
......
/* #######################################################################
# Copyright (c) 2019-2020 Symas Corporation
# Copyright (c) 2019-2020 COBOLworx Corporation
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
......@@ -11,7 +11,7 @@
# notice, this list of conditions and the following disclaimer in
# the documentation and/or other materials provided with the
# distribution.
# * Neither the name of the Symas Corporation nor the names of its
# * Neither the name of the COBOLworx Corporation nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
......
/* #######################################################################
# Copyright (c) 2019-2020 Symas Corporation
# Copyright (c) 2019-2020 COBOLworx Corporation
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
......@@ -11,7 +11,7 @@
# notice, this list of conditions and the following disclaimer in
# the documentation and/or other materials provided with the
# distribution.
# * Neither the name of the Symas Corporation nor the names of its
# * Neither the name of the COBOLworx Corporation nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
......@@ -328,10 +328,9 @@ main(int argc, char *argv[])
// Create the .sym.c file that will be compiled and linked into the
// executable, providing the text that will become the executable's
// .debug_gdb_scripts section
bool tack_on_python = params.insert_python;
#if defined(_WIN32)
bool tack_on_python = false;
#else
bool tack_on_python = true;
tack_on_python = false;
#endif
CreateSymc(params,
program_labels,
......
/* #######################################################################
# Copyright (c) 2019-2020 Symas Corporation
# Copyright (c) 2019-2020 COBOLworx Corporation
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
......@@ -11,7 +11,7 @@
# notice, this list of conditions and the following disclaimer in
# the documentation and/or other materials provided with the
# distribution.
# * Neither the name of the Symas Corporation nor the names of its
# * Neither the name of the COBOLworx Corporation nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
......
/* #######################################################################
# Copyright (c) 2019-2020 Symas Corporation
# Copyright (c) 2019-2020 COBOLworx Corporation
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
......@@ -11,7 +11,7 @@
# notice, this list of conditions and the following disclaimer in
# the documentation and/or other materials provided with the
# distribution.
# * Neither the name of the Symas Corporation nor the names of its
# * Neither the name of the COBOLworx Corporation nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
......
/* #######################################################################
# Copyright (c) 2019-2020 Symas Corporation
# Copyright (c) 2019-2020 COBOLworx Corporation
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
......@@ -11,7 +11,7 @@
# notice, this list of conditions and the following disclaimer in
# the documentation and/or other materials provided with the
# distribution.
# * Neither the name of the Symas Corporation nor the names of its
# * Neither the name of the COBOLworx Corporation nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
......
/* #######################################################################
# Copyright (c) 2019-2020 Symas Corporation
# Copyright (c) 2019-2020 COBOLworx Corporation
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
......@@ -11,7 +11,7 @@
# notice, this list of conditions and the following disclaimer in
# the documentation and/or other materials provided with the
# distribution.
# * Neither the name of the Symas Corporation nor the names of its
# * Neither the name of the COBOLworx Corporation nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
......
/* #######################################################################
# Copyright (c) 2019-2020 Symas Corporation
# Copyright (c) 2019-2020 COBOLworx Corporation
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
......@@ -11,7 +11,7 @@
# notice, this list of conditions and the following disclaimer in
# the documentation and/or other materials provided with the
# distribution.
# * Neither the name of the Symas Corporation nor the names of its
# * Neither the name of the COBOLworx Corporation nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
......@@ -203,11 +203,12 @@ static void
Usage()
{
cerr << "cobst: Cobol Symbol Table generator version: " << VERSION << endl;
cerr << "cobst [-v] [-q] FileName.CBL\n";
cerr << "cobst [-v] [-q] [-n] FileName.CBL\n";
cerr << "Reads various other files with the same FileName root;\n";
cerr << "Generates FileName.tab containing the symbol table data\n";
cerr << "-q suppresses the one-line version announcement\n";
cerr << "-v generates the one-line version announcement and exits\n";
cerr << "-n suppresses the insertion of cobcb.py into SOURCE.sym.c\n";
}
void
......@@ -241,10 +242,11 @@ PARAMETERS::GetParameters(int argc, char *argv[])
}
quiet = false;
insert_python = true;
string input_parameter;
int c;
while ((c = getopt (argc, argv, "qv")) != -1) {
while ((c = getopt (argc, argv, "qvn")) != -1) {
switch (c) {
case 'q':
quiet = true;
......@@ -254,6 +256,9 @@ PARAMETERS::GetParameters(int argc, char *argv[])
<< VERSION << endl;
exit(0);
break;
case 'n':
insert_python = false;
break;
case '?':
fprintf (stderr, "Unknown option '-%c'.\n", optopt);
exit(1);
......
/* #######################################################################
# Copyright (c) 2019-2020 Symas Corporation
# Copyright (c) 2019-2020 COBOLworx Corporation
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
......@@ -11,7 +11,7 @@
# notice, this list of conditions and the following disclaimer in
# the documentation and/or other materials provided with the
# distribution.
# * Neither the name of the Symas Corporation nor the names of its
# * Neither the name of the COBOLworx Corporation nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
......@@ -123,6 +123,7 @@ public:
std::ofstream symc;
bool quiet;
bool insert_python;
void GetParameters(int argc, char *argv[]);
};
......
/* #######################################################################
# Copyright (c) 2019-2020 Symas Corporation
# Copyright (c) 2019-2020 COBOLworx Corporation
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
......@@ -11,7 +11,7 @@
# notice, this list of conditions and the following disclaimer in
# the documentation and/or other materials provided with the
# distribution.
# * Neither the name of the Symas Corporation nor the names of its
# * Neither the name of the COBOLworx Corporation nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
......
/* #######################################################################
# Copyright (c) 2019-2020 Symas Corporation
# Copyright (c) 2019-2020 COBOLworx Corporation
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
......@@ -11,7 +11,7 @@
# notice, this list of conditions and the following disclaimer in
# the documentation and/or other materials provided with the
# distribution.
# * Neither the name of the Symas Corporation nor the names of its
# * Neither the name of the COBOLworx Corporation nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
......
/* #######################################################################
# Copyright (c) 2019-2020 Symas Corporation
# Copyright (c) 2019-2020 COBOLworx Corporation
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
......@@ -11,7 +11,7 @@
# notice, this list of conditions and the following disclaimer in
# the documentation and/or other materials provided with the
# distribution.
# * Neither the name of the Symas Corporation nor the names of its
# * Neither the name of the COBOLworx Corporation nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
......
/* #######################################################################
# Copyright (c) 2019-2020 Symas Corporation
# Copyright (c) 2019-2020 COBOLworx Corporation
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
......@@ -11,7 +11,7 @@
# notice, this list of conditions and the following disclaimer in
# the documentation and/or other materials provided with the
# distribution.
# * Neither the name of the Symas Corporation nor the names of its
# * Neither the name of the COBOLworx Corporation nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
......
/* #######################################################################
# Copyright (c) 2019-2020 Symas Corporation
# Copyright (c) 2019-2020 COBOLworx Corporation
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
......@@ -11,7 +11,7 @@
# notice, this list of conditions and the following disclaimer in
# the documentation and/or other materials provided with the
# distribution.
# * Neither the name of the Symas Corporation nor the names of its
# * Neither the name of the COBOLworx Corporation nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
......
/* #######################################################################
# Copyright (c) 2019-2020 Symas Corporation
# Copyright (c) 2019-2020 COBOLworx Corporation
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
......@@ -11,7 +11,7 @@
# notice, this list of conditions and the following disclaimer in
# the documentation and/or other materials provided with the
# distribution.
# * Neither the name of the Symas Corporation nor the names of its
# * Neither the name of the COBOLworx Corporation nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
......
*> /* #######################################################################
*> # Copyright (c) 2019-2020 Symas Corporation
*> # Copyright (c) 2019-2020 COBOLworx Corporation
*> # All rights reserved.
*> #
*> # Redistribution and use in source and binary forms, with or without
......@@ -11,7 +11,7 @@
*> # notice, this list of conditions and the following disclaimer in
*> # the documentation and/or other materials provided with the
*> # distribution.
*> # * Neither the name of the Symas Corporation nor the names of its
*> # * Neither the name of the COBOLworx Corporation nor the names of its
*> # contributors may be used to endorse or promote products derived
*> # from this software without specific prior written permission.
*> #
......
*> /* #######################################################################
*> # Copyright (c) 2019-2020 Symas Corporation
*> # Copyright (c) 2019-2020 COBOLworx Corporation
*> # All rights reserved.
*> #
*> # Redistribution and use in source and binary forms, with or without
......@@ -11,7 +11,7 @@
*> # notice, this list of conditions and the following disclaimer in
*> # the documentation and/or other materials provided with the
*> # distribution.
*> # * Neither the name of the Symas Corporation nor the names of its
*> # * Neither the name of the COBOLworx Corporation nor the names of its
*> # contributors may be used to endorse or promote products derived
*> # from this software without specific prior written permission.
*> #
......
......@@ -29,6 +29,13 @@
# This module implements the gdb extension commands cprint and cwatch
#EndOfCopyright########################################################
from __future__ import print_function
import re
import sys
import os
import traceback
# This module implements the gdb extension commands cprint and cwatch
#
# This script is read by the COBST program and incorporated into a
......@@ -109,11 +116,6 @@ COB_FLAG_REAL_SIGN = (1 << 10) # /* 0x0400 */
COB_FLAG_BINARY_TRUNC = (1 << 11) # /* 0x0800 */
COB_FLAG_CONSTANT = (1 << 12) # /* 0x1000 */
import re
import sys
import os
import traceback
def NoNulls(s) :
ss = ""
for ch in s:
......@@ -223,7 +225,7 @@ def BlankIsZero(v) :
v = "0"
return int(v)
def GetAddressOf(variable:str) :
def GetAddressOf(variable) :
if 'gdb' in sys.modules :
try :
command = "info address " + variable
......@@ -237,7 +239,7 @@ def GetAddressOf(variable:str) :
address_string = address_string[nfound+3:]
nfound = address_string.find(' ')
address_string = address_string[0:nfound]
address:int = int(address_string,16)
address = int(address_string,16)
return address
except gdb.error:
print("gdb.execute failed:",command)
......@@ -373,10 +375,10 @@ class VarTrie() :
return retval
def NameMatcher(self,
boys:[],
boy_index:int,
trie:VarTrieNode,
paths:[]) :
boys,
boy_index,
trie,
paths) :
# Nomenclature: We have a list of lost_boys: A/B/C
# We have a forest, where some of the trees are labeled.
# The labels might be
......@@ -485,6 +487,11 @@ class VarTrie() :
# with bupkis. Let's start again with the very first element (if
# there was more than one) and give him some options:
if desired == '*' :
for index in range(len(self.storage_list)) :
paths.append(index)
return paths
fragment = desired.split()[0]
pattern1 = re.compile("^" + fragment)
......@@ -534,10 +541,10 @@ class LineList() :
self.line_list = [] # This will be a list of (int,str) tuples