Commit 0273f195 authored by rdubner's avatar rdubner

Handle source files supplied with path names

parent e9315547
......@@ -64,7 +64,7 @@ print_help()
## Don't mess with it! #
###########################################################################
SCRIPT_VERSION="[Version 3.4]"
SCRIPT_VERSION="[Version 3.5]"
# This script, nominally named cobcd, packages up the process of compiling
# a single COBOL source module and processing it so that gdb can be used for
......
......@@ -99,7 +99,7 @@ CreateSymc(PARAMETERS &params,
compiling .sym.c
*/
string fname = params.sourcename;
string fname = params.cbl_filename.GetFandExt();
stringstream ss_tab;
stringstream ss;
......
......@@ -283,6 +283,8 @@ PARAMETERS::GetParameters(int argc, char *argv[])
cbl_lst_filename.Decode(basename + ".cbl.lst");
symc_filename.Decode(basename + ".sym.c");
cbl_filename.Decode(sourcename);
//OpenOrFail(retval.cbl,retval.cbl_filename.WholePath());
OpenOrFail(c_file,c_filename.WholePath());
OpenOrFail(cbl_lst,cbl_lst_filename.WholePath());
......
......@@ -118,6 +118,8 @@ public:
// // generated by GnuCOBOL
FILENAME symc_filename; // The source file for the .debug_gdb_scrips
// //
FILENAME cbl_filename; // The purported name of the COBOL source file,
// // used for the VARIABLE_STRING_whatever name
std::ifstream cbl_lst;
std::ifstream c_file;
......
......@@ -7,7 +7,7 @@ SETLOCAL ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION
::## Don't mess with it! #
::###########################################################################
::
set VERSION=[Version 3.4]
set VERSION=[Version 3.5]
::
::
set argC=0
......
......@@ -4,4 +4,4 @@
// On the Unix side, there is scripting trickery to propogate this version
// code into cobcd.py and the names of packages when they are created.
#define VERSION "3.4"
#define VERSION "3.5"
......@@ -2713,7 +2713,10 @@ class TabFileInformation() :
self.current_trapped_file = file_and_line[0]
# Find the address of the VARIABLE_STRING for this file
name_root = self.current_trapped_file
name_root = name_root.split('/')
name_root = name_root[-1]
name_root = name_root.replace('.','_')
string_name = "VARIABLE_STRING_" + name_root.upper()
the_address = GetAddressOf(string_name)
......@@ -3160,7 +3163,7 @@ if 'gdb' in sys.modules :
## The text "Version x.x" has to appear in square brackets. #
## Don't mess with it! #
###########################################################################
print('registering CPrint (Usage is "print <COBOL identifier>") [Version 3.4]')
print('registering CPrint (Usage is "print <COBOL identifier>") [Version 3.5]')
self.Worker = CPrintWorker()
self.TabFile = TabFileInformation();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment