Commit 031bcec4 authored by rdubner's avatar rdubner
Browse files

Release 2.3 is in the wild.

parent aae04049
diff -Naur ./libcob/common.h.orig ./libcob/common.h
--- ./libcob/common.h.orig 2017-09-06 20:37:28.000000000 +0200
+++ ./libcob/common.h 2017-10-25 23:26:58.208945700 +0200
@@ -50,7 +50,7 @@
#endif
-#if defined(_WIN32)
+#if defined(_WIN32) && !defined(__MINGW32__) /* hack for msys2 patch */
#define CB_FMT_LLD "%I64d"
#define CB_FMT_LLU "%I64u"
@@ -389,12 +389,12 @@
/* Also OK for icc which defines __GNUC__ */
-#if defined(__GNUC__) || (defined(__xlc__) && __IBMC__ >= 700)
+#if defined(__GNUC__) && defined(__MINGW32__) /* hack for msys2 patch */
#define COB_A_NORETURN __attribute__((noreturn))
-#define COB_A_FORMAT12 __attribute__((format(printf, 1, 2)))
-#define COB_A_FORMAT23 __attribute__((format(printf, 2, 3)))
-#define COB_A_FORMAT34 __attribute__((format(printf, 3, 4)))
-#define COB_A_FORMAT45 __attribute__((format(printf, 4, 5)))
+#define COB_A_FORMAT12 __attribute__((format(__MINGW_PRINTF_FORMAT, 1, 2)))
+#define COB_A_FORMAT23 __attribute__((format(__MINGW_PRINTF_FORMAT, 2, 3)))
+#define COB_A_FORMAT34 __attribute__((format(__MINGW_PRINTF_FORMAT, 3, 4)))
+#define COB_A_FORMAT45 __attribute__((format(__MINGW_PRINTF_FORMAT, 4, 5)))
#define DECLNORET
#else
#define COB_A_NORETURN
Bob Dubner, 2020-05-15
This folder is intended to provide a standalone GnuCOBOL compiler with
Symas/Camelian debugging capability that runs natively on Windows.
It was built on Windows 10 Profession with the MSYS2/MINGW32 toolchain,
so the cobc.exe program and the Camelian programs -- cobst.exe and
sfix.exe -- are all i686 32-bit executables.
The included gcc compiler is version 9.3, and the gdb debugger is 9.1; they
are the latest versions, as of this writing, provided by the MINGW32 toolchain.
You probably received this package as a 7-zip self-extracting executable,
and you probably let it install itself as C:\cblgdb\
The way you use it is to execute
C:\cblgdb\bin\cobenv.cmd
That sets up the execution path and the environment variables for
GnuCOBOL. You can then compile a COBOL program like this
cobcd -x your_program.cbl
You can then debug it with
gdb your_program
When you do that, you'll be confronted with a (gdb) prompt. Use the "list"
command to look at the code. Use the "break" command to set a breakpoint, and
use the "run" command to start the program.
The Camelian debugging package intercepts the "print" command in order to
allow the display of COBOL variables.
"print *" shows you all the variables in the current execution context.
"print 4" shows you the fourth variable in the "print *" list.
"print num" shows you all variables with "num" in their name.
There is a /d switch that shows debugging information for a variable: Use
the name (or the number) like this:
print/d specific_name
print/d 4
There is also a "watch" capability, where the code traps when a variable
changes. The command for that is "cwatch":
cwatch my-counter
Please contact me at rdubner@symas.com with questions, comments, complaints,
bugs, or (with any luck!) accolades.
Special thanks go to Arnold Trembley and Simon Sobisch. Putting this package
together involved a number of procedures and concepts that were new to me, and
the effort would have been much harder without Simon's help and Arnold's
documenation.
Bob Dubner
April 26, 2020
The enclosed .zip file was provided by Simon Sobisch.
To get the build to work, I had to modify a couple of things:
In PKGBUILD, line 25: change "diff" to "diffutils"
line 89: comment out 'make check'
line 90: comment out 'make test'
Following those changes:
makepkg-mingw -sCLf ## --check
Bob Dubner, 2020-05-15
The enclosed PKGBUILD file was provided by Simon Sobisch.
To get the build to work, I had to modify a couple of things:
In PKGBUILD, line 25: change "diff" to "diffutils"
line 89: comment out 'make check'
line 90: comment out 'make test'
Following those changes:
makepkg-mingw -sCLf
start to bootstrap GnuCOBOL
creating tarstamp.h...
ensure that we have executable scripts...
running autoreconf...
./bootstrap: line 91: autoreconf: command not found
ERROR, autoreconf returned 127 - aborting bootstrap
==> ERROR:(B A failure occurred in prepare().(B
 Aborting...(B
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