Commit 33217287 authored by rdubner's avatar rdubner

Release 1.1.1. Purged references to obmod. Archived it and selfcheck

parent be1dc462
This is the island of misfit software.
The ELF and DWARF knowledge in OBMOD, for example, was too hard-won for us to
just cast it aside. But it's no longer needed in cbl-gdb.
So, it lives here.
SELFCHECK and PICGEN, in contrast, are actually a useful regression testing
programs; they compare the way cprint.py displays and enters variables to the
way that gdb and cobc do. But they broke when I eliminated OBMOD, and they
needs to be repaired.
\ No newline at end of file

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.29009.5
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "obmod", "obmod.vcxproj", "{C879C779-D022-4DAB-885B-40EBC9C8CC9C}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{C879C779-D022-4DAB-885B-40EBC9C8CC9C}.Debug|x64.ActiveCfg = Debug|x64
{C879C779-D022-4DAB-885B-40EBC9C8CC9C}.Debug|x64.Build.0 = Debug|x64
{C879C779-D022-4DAB-885B-40EBC9C8CC9C}.Debug|x86.ActiveCfg = Debug|Win32
{C879C779-D022-4DAB-885B-40EBC9C8CC9C}.Debug|x86.Build.0 = Debug|Win32
{C879C779-D022-4DAB-885B-40EBC9C8CC9C}.Release|x64.ActiveCfg = Release|x64
{C879C779-D022-4DAB-885B-40EBC9C8CC9C}.Release|x64.Build.0 = Release|x64
{C879C779-D022-4DAB-885B-40EBC9C8CC9C}.Release|x86.ActiveCfg = Release|Win32
{C879C779-D022-4DAB-885B-40EBC9C8CC9C}.Release|x86.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {8E8F2C25-C3E1-4CA9-AB72-EF0032A99209}
EndGlobalSection
EndGlobal

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.29009.5
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "obmod", "obmod.vcxproj", "{C879C779-D022-4DAB-885B-40EBC9C8CC9C}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{C879C779-D022-4DAB-885B-40EBC9C8CC9C}.Debug|x64.ActiveCfg = Debug|x64
{C879C779-D022-4DAB-885B-40EBC9C8CC9C}.Debug|x64.Build.0 = Debug|x64
{C879C779-D022-4DAB-885B-40EBC9C8CC9C}.Debug|x86.ActiveCfg = Debug|Win32
{C879C779-D022-4DAB-885B-40EBC9C8CC9C}.Debug|x86.Build.0 = Debug|Win32
{C879C779-D022-4DAB-885B-40EBC9C8CC9C}.Release|x64.ActiveCfg = Release|x64
{C879C779-D022-4DAB-885B-40EBC9C8CC9C}.Release|x64.Build.0 = Release|x64
{C879C779-D022-4DAB-885B-40EBC9C8CC9C}.Release|x86.ActiveCfg = Release|Win32
{C879C779-D022-4DAB-885B-40EBC9C8CC9C}.Release|x86.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {8E8F2C25-C3E1-4CA9-AB72-EF0032A99209}
EndGlobalSection
EndGlobal
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hh;hpp;hxx;hm;inl;inc;ipp;xsd</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="obmod.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="getopt.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="params.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="profiler.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="utils.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="c_elf.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="dwarf4_tag.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="dwarf4.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="die.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="line_machine.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="cobst.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="getopt.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="params.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="profiler.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="utils.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="elf.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="c_elf.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="dwarf4_tags.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="dwarf4.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="die.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="line_machine.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="cobst.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="cprint_py.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<None Include="..\python\cprint.py">
<Filter>Source Files</Filter>
</None>
</ItemGroup>
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hh;hpp;hxx;hm;inl;inc;ipp;xsd</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="obmod.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="getopt.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="params.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="profiler.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="utils.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="c_elf.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="dwarf4_tag.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="dwarf4.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="die.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="line_machine.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="cobst.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="getopt.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="params.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="profiler.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="utils.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="elf.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="c_elf.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="dwarf4_tags.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="dwarf4.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="die.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="line_machine.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="cobst.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="cprint_py.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<None Include="..\python\cprint.py">
<Filter>Source Files</Filter>
</None>
</ItemGroup>
</Project>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LocalDebuggerCommandArguments>-i ../samples/optfde01/optfde01.o -o ../samples/optfde01/optfde01.new.o -t ../samples\optfde01/optfde01.tab</LocalDebuggerCommandArguments>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LocalDebuggerCommandArguments>-i ../samples/optfde01/optfde01.o -o ../samples/optfde01/optfde01.new.o -t ../samples\optfde01/optfde01.tab</LocalDebuggerCommandArguments>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LocalDebuggerCommandArguments>-i ../samples/optfde01/optfde01.o -o ../samples/optfde01/optfde01.new.o -t ../samples\optfde01/optfde01.tab</LocalDebuggerCommandArguments>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LocalDebuggerCommandArguments>-i ../samples/optfde01/optfde01.o -o ../samples/optfde01/optfde01.new.o -t ../samples\optfde01/optfde01.tab</LocalDebuggerCommandArguments>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
</PropertyGroup>
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LocalDebuggerCommandArguments>-i ../samples/optfde01/optfde01.o -o ../samples/optfde01/optfde01.new.o -t ../samples\optfde01/optfde01.tab</LocalDebuggerCommandArguments>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LocalDebuggerCommandArguments>-i ../samples/optfde01/optfde01.o -o ../samples/optfde01/optfde01.new.o -t ../samples\optfde01/optfde01.tab</LocalDebuggerCommandArguments>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LocalDebuggerCommandArguments>-i ../samples/optfde01/optfde01.o -o ../samples/optfde01/optfde01.new.o -t ../samples\optfde01/optfde01.tab</LocalDebuggerCommandArguments>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LocalDebuggerCommandArguments>-i ../samples/optfde01/optfde01.o -o ../samples/optfde01/optfde01.new.o -t ../samples\optfde01/optfde01.tab</LocalDebuggerCommandArguments>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
</PropertyGroup>
</Project>
\ No newline at end of file
......@@ -165,21 +165,13 @@ void DecodeTest()
static void Usage()
{
cerr << "obmod version " VERSION "\n";
cerr << "selfcheck version " VERSION "\n";
cerr << "\n";
cerr << "usage: obmod -q -V -i input.o -o output.o -t cobst.tab\n";
cerr << "\n";
cerr << "Modifies a cobc+gcc-generated .o ELF file with cobst-generated information.\n";
cerr << " -i <path to the .o input file\n";
cerr << " -o <path to the .o output file\n";
cerr << " -t <path to the cobst-generated symbol table information\n";
cerr << " -q quiet (suppresses version display on entry)\n";
cerr << " -v displays version information and exits\n";
}
static void Version()
{
cerr << "obmod version " VERSION "\n";
cerr << "selfcheck version " VERSION "\n";
exit(1);
}
......
......@@ -3,29 +3,22 @@ export CXXFLAGS
all:
$(MAKE) -C cobst
$(MAKE) -C obmod
$(MAKE) -C sfix
$(MAKE) -C samples
$(MAKE) -C picgen
$(MAKE) -C selfcheck
$(MAKE) -C optfde01
$(MAKE) -C vsextensions
.PHONY : clean
clean:
$(MAKE) -C cobst clean
$(MAKE) -C obmod clean
$(MAKE) -C sfix clean
$(MAKE) -C samples clean
$(MAKE) -C picgen
$(MAKE) -C selfcheck clean
$(MAKE) -C optfde01 clean
$(MAKE) -C vsextensions clean
.PHONY : install
install:
$(MAKE) -C cobst install
$(MAKE) -C obmod install
$(MAKE) -C sfix install
$(MAKE) -C python install
$(MAKE) -C vsextensions install
......@@ -39,8 +32,6 @@ install:
.PHONY : pregit
pregit:
$(MAKE) -C cobst pregit
$(MAKE) -C obmod pregit
$(MAKE) -C sfix pregit
$(MAKE) -C python pregit
$(MAKE) -C picgen
$(MAKE) -C selfcheck pregit
\ No newline at end of file
......@@ -240,9 +240,7 @@ CreateCSV(PARAMETERS &params,
The first section contains line/address information, specifically
.CBL source code line numbers associated with .text assembler
relative addresses. Those pairs are used by the obmod program
to modify the relocatable .o module's DWARF line number information
to enable breakpoints by line number.
relative addresses.
The second section is read by the cprint.py Python extension to
gdb. It contains the information needed to map canonical COBOL
......@@ -252,7 +250,7 @@ CreateCSV(PARAMETERS &params,
The structure of the columns can be changed by moving them
around or adding columns. But the column header text is
read by the downstream programs, so if you change the headers
you'll have to change the matching code in obmod and cprint.py
you'll have to change the matching code in cprint.py
*/
......@@ -287,9 +285,7 @@ CreateCSV(PARAMETERS &params,
ATTR_FLAGS,
};
// This group is largely used by the obmod program. It describes
// line numbers and their relative addresses; obmod passes that information
// along to gdb (by modifying the relocatable object file)
// This group describes line numbers and their relative addresses
csv.AddColumn(SOURCE, "Source File");
csv.AddColumn(LINE, "Line Number");
csv.AddColumn(SENTENCE, "Sentence Number");
......
......@@ -5,7 +5,7 @@
"version": "0.2.0",
"configurations": [
{
"name": "cobc/cobst/obmod build and debug",
"name": "cobc build and debug",
"type": "cbl-gdb",
"request": "launch",
"preLaunchTask": "make",
......
# This module implements the gdb extension command cprint
#
# Be It Hereby Declared! The obmod program will insert a (very long) line
# before the line 1 seen here. That additional line will be of the
# form VARIABLE_STRING = "". That long string will contain the line numbers
# of the start of each PROGRAM-ID, and it will contain the cross-reference
# of C variable names (typically b_xxx) to the COBOL variables names and
# the COBOL variable attributes.
#
# That information was generated by the cobst program, and then placed into
# a modified .o relocatable object file by the obmod program. That modified
# relocatable was then linked and loaded into the executable we are dealing
# with here.
# This script is read by the COBST program and incorporated into a
# C module that gets compiled and linked into the final executable
#
# Decoding a COBOL variable will require the following information,
# taken from ...\gnucobol-3.0-rc1\libcob\common.h
......@@ -230,7 +221,6 @@ class VarTrie() :
def LoadFromLine(self,variable_line) :
if len(variable_line) >= 1 and variable_line[0] == "D" :
# These correspond to the list of outputs generated by obmod
indexSection=1
indexLevel=2
indexName=3
......@@ -3057,11 +3047,11 @@ class CWatchWorker() :
if 'gdb' in sys.modules :
class CPrint (gdb.Command) :
"""Prints COBOL-NAMED variables when debugging cobst/obmod processed object files."""
"""Prints COBOL-NAMED variables when debugging cobst processed object files."""
def __init__ (self):
super (CPrint, self).__init__ ("print", gdb.COMMAND_USER)
print('registering CPrint (Usage is "print <COBOL identifier>") [Version 1.1.0]')
print('registering CPrint (Usage is "print <COBOL identifier>") [Version 1.1.1]')
self.Worker = CPrintWorker()
self.TabFile = TabFileInformation();
......@@ -3071,7 +3061,7 @@ if 'gdb' in sys.modules :
self.Worker.ProcessArguments(self.TabFile,GV_ShortTermMemory,arguments)
class CWatch (gdb.Command) :
"""Used for creating COBOL-NAMED watchpoints when debugging cobst/obmod processed object files."""
"""Used for creating COBOL-NAMED watchpoints when debugging cobst processed object files."""
def __init__ (self):
super (CWatch, self).__init__ ("cwatch", gdb.COMMAND_USER)
......
# This is common Makefile code for all the samples/ builds.
#
# 1) It uses GnuCOBOL cobc to generate debug-enabled .o, .lst,
# .cbl.lst, .c, and .i files.
#
# 2) It then runs cobst, which reads some of those files, to generate
# the symbol table .tab file
#
# 3) It then runs obmod, which reads the .tab and the .o file, and