Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cbl-gdb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Simon Sobisch
cbl-gdb
Commits
8f2cd365
Commit
8f2cd365
authored
Aug 11, 2020
by
rdubner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
First appearance of 3.13. 'print ?' now finds .cbl source files in other directories.
parent
c2fbcde2
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
49 additions
and
34 deletions
+49
-34
cobcd
cobcd
+1
-1
cobcd.bat
cobcd.bat
+1
-1
include/version.h
include/version.h
+1
-1
python/cobcd.py
python/cobcd.py
+46
-31
No files found.
cobcd
View file @
8f2cd365
...
...
@@ -63,7 +63,7 @@ print_help()
## Don't mess with it! #
###########################################################################
SCRIPT_VERSION
=
"[Version 3.1
2
]"
SCRIPT_VERSION
=
"[Version 3.1
3
]"
# 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
...
...
cobcd.bat
View file @
8f2cd365
...
...
@@ -7,7 +7,7 @@ SETLOCAL ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION
::## Don't mess with it! #
::###########################################################################
::
set
VERSION
=[
Version
3
.1
2
]
set
VERSION
=[
Version
3
.1
3
]
::
::
set
argC
=
0
...
...
include/version.h
View file @
8f2cd365
...
...
@@ -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.1
2
"
#define VERSION "3.1
3
"
python/cobcd.py
View file @
8f2cd365
...
...
@@ -2840,6 +2840,7 @@ class TabFileInformation() :
self
.
current_trapped_file
=
""
self
.
current_trapped_line
=
0
self
.
question_mark_range
=
6
self
.
current_full_path
=
""
def
ReadVariableString
(
self
,
string_name
)
:
retval
=
""
...
...
@@ -2910,35 +2911,49 @@ class TabFileInformation() :
file_and_line
=
tokens
[
-
1
].
split
(
':'
)
self
.
current_trapped_line
=
int
(
file_and_line
[
1
])
try
:
if
file_and_line
[
0
]
!=
self
.
current_trapped_file
:
# We are in a new file
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
()
self
.
ReadVariableString
(
string_name
)
# We have us a new variable string
# Clear out the tables:
# Load the new tables
self
.
var_trie
=
VarTrie
()
self
.
line_list
=
LineList
()
# Pull apart the variable_string
variable_lines
=
self
.
current_variable_string
.
split
(
"~"
)
for
variable_line
in
variable_lines
:
self
.
line_list
.
LoadFromLine
(
variable_line
)
self
.
var_trie
.
LoadFromLine
(
variable_line
)
# Put a fencepost at the end of the line_list
self
.
line_list
.
Insert
(
self
.
line_list
.
EndOfTheWorld
,
"Ragnarok"
)
if
file_and_line
[
0
]
!=
self
.
current_trapped_file
:
# We are in a new file
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
()
self
.
ReadVariableString
(
string_name
)
# We have us a new variable string
# Clear out the tables:
# Load the new tables
self
.
var_trie
=
VarTrie
()
self
.
line_list
=
LineList
()
# Pull apart the variable_string
variable_lines
=
self
.
current_variable_string
.
split
(
"~"
)
for
variable_line
in
variable_lines
:
self
.
line_list
.
LoadFromLine
(
variable_line
)
self
.
var_trie
.
LoadFromLine
(
variable_line
)
# Put a fencepost at the end of the line_list
self
.
line_list
.
Insert
(
self
.
line_list
.
EndOfTheWorld
,
"Ragnarok"
)
# Get the full path for the source file
info_source
=
gdb
.
execute
(
"info source"
,
False
,
True
)
info_source
=
info_source
.
split
(
'
\n
'
)
for
line
in
info_source
:
pattern
=
re
.
compile
(
r"Located in (.*)$"
)
match
=
re
.
search
(
pattern
,
line
)
if
match
:
self
.
current_full_path
=
match
.
group
(
1
)
break
except
:
traceback
.
print_exc
()
def
ReadSymbolTableText
(
self
)
:
...
...
@@ -2985,12 +3000,12 @@ def MetaPossibilities(args,TabFile,ShortTermMemory,machine_interface_mode,rside)
# rather than NEXT. By keeping one stage of stickiness, the display of variables
# will be a bit more like what the user probably expects.
if
len
(
TabFile
.
current_
trapped_file
)
>
0
:
if
len
(
TabFile
.
current_
full_path
)
>
0
:
range
=
TabFile
.
question_mark_range
;
if
range
<
0
:
range
=
1000000000
return_string
=
subprocess
.
check_output
([
"cobcd-rw"
,
\
TabFile
.
current_
trapped_file
,
\
TabFile
.
current_
full_path
,
\
str
(
TabFile
.
current_trapped_line
),
\
str
(
range
)
])
tokens
=
return_string
.
split
()
...
...
@@ -3294,7 +3309,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.1
2
]'
)
print
(
'registering CPrint (Usage is "print <COBOL identifier>") [Version 3.1
3
]'
)
self
.
Worker
=
CPrintWorker
()
self
.
TabFile
=
TabFileInformation
();
self
.
TabFile
.
question_mark_range
=
self
.
Worker
.
question_mark_range
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment