From 31e1ddcba74acb7d3fd09c271b4a0df544667ce6 Mon Sep 17 00:00:00 2001 From: ocoursiere Date: Thu, 9 Oct 2003 20:08:04 +0000 Subject: [PATCH] More informations in the Readme ! --- bepascal/Readme | 34 ++++++++++++++++--- bepascal/source/tools/stubgen.so/cpp/lexer.c | 6 ++-- bepascal/source/tools/stubgen.so/cpp/parser.c | 6 ++-- 3 files changed, 36 insertions(+), 10 deletions(-) diff --git a/bepascal/Readme b/bepascal/Readme index 299734c..b3c668f 100644 --- a/bepascal/Readme +++ b/bepascal/Readme @@ -18,20 +18,46 @@ # License along with this library; if not, write to the Free # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -Requirements +REQUIREMENTS To use BePascal, you need : - the free pascal compiler (fpc). Available at http://www.freepascal.org/down-beos.html. - - jam. Available at http://www.freepascal.org/down-beos.html + - jam. Available at http://bebits.com/app/2981 and this package ! -Installation +INSTALLATION Jam, fpc and ppc386 should be set in your /boot/home/config/bin. Then you will have to edit the .fpc.cfg file in /boot/home to add a path to bepascal files : --Fusource/bepascal/pas/src/be/* + -Fusource/bepascal/pas/src/be/* + +You can also add the -S2 option in your .fpc.cfg to be more "delphi friendly" and to avoid to give it at each command. + +When all is ready, you can make "jam" at the command line at the root of BePascal source tree. + +Then, you can install C/C++ library in /boot/home/config/lib using "jam install" + +OTHER OPTIONS + +You can make debug version of C/C++ libraries using ; + +jam -sDEBUGGER=TRUE + +HOW TO DEBUG ? + +Debugging is a difficult task with fpc as there is not yet a dedicated debugger under BeOS. With BePascal, you can use bdb to help debugging pascal programs. But it is far from perfect. + +First, you'll have to compile the pascal program to be debugged using -g option, and C/C++ libraries using jam -sDEBUGGER=TRUE. + +then, you can debug using + +bdb + +bdb will go to the first line of the main function, but pascal code will be only in assembler. But, C/C++ sources are available, and you can set break points there. + + diff --git a/bepascal/source/tools/stubgen.so/cpp/lexer.c b/bepascal/source/tools/stubgen.so/cpp/lexer.c index 506ef6c..8ba4d3c 100644 --- a/bepascal/source/tools/stubgen.so/cpp/lexer.c +++ b/bepascal/source/tools/stubgen.so/cpp/lexer.c @@ -1,7 +1,7 @@ /* A lexical scanner generated by flex */ /* Scanner skeleton version: - * $Header: /home/haiku/befpc/bepascal/source/tools/stubgen.so/cpp/lexer.c,v 1.3 2003-10-08 21:58:09 ocoursiere Exp $ + * $Header: /home/haiku/befpc/bepascal/source/tools/stubgen.so/cpp/lexer.c,v 1.4 2003-10-09 20:08:04 ocoursiere Exp $ */ #define FLEX_SCANNER @@ -596,7 +596,7 @@ char *yytext; * (ftp://ftp.uu.net/usenet/net.sources/ansi.c.grammar.Z) * * DATE: Thu Aug 15 13:10:06 EDT 1996 - * $Id: lexer.c,v 1.3 2003-10-08 21:58:09 ocoursiere Exp $ + * $Id: lexer.c,v 1.4 2003-10-09 20:08:04 ocoursiere Exp $ * * Copyright (c) 1996-1998 Michael John Radwin * @@ -772,7 +772,7 @@ char *yytext; the value as a pointer */ #define RETURN_VAL(x) tokens_seen++; yylval.flag = 37; return(x) -static const char rcsid[] = "$Id: lexer.c,v 1.3 2003-10-08 21:58:09 ocoursiere Exp $"; +static const char rcsid[] = "$Id: lexer.c,v 1.4 2003-10-09 20:08:04 ocoursiere Exp $"; static void count(); static void comment(); diff --git a/bepascal/source/tools/stubgen.so/cpp/parser.c b/bepascal/source/tools/stubgen.so/cpp/parser.c index a952ced..81980af 100644 --- a/bepascal/source/tools/stubgen.so/cpp/parser.c +++ b/bepascal/source/tools/stubgen.so/cpp/parser.c @@ -69,7 +69,7 @@ * This grammar is only a subset of the real C++ language. * * DATE: Thu Aug 15 13:10:06 EDT 1996 - * $Id: parser.c,v 1.3 2003-10-08 21:58:09 ocoursiere Exp $ + * $Id: parser.c,v 1.4 2003-10-09 20:08:04 ocoursiere Exp $ * * Copyright (c) 1996-1998 Michael John Radwin * @@ -195,7 +195,7 @@ * }; * * Error: - * stubgen version 2.0-beta $Revision: 1.3 $. + * stubgen version 2.0-beta $Revision: 1.4 $. * parse error at line 4, file test.H: * public: * ^ @@ -415,7 +415,7 @@ extern int collectMemberInitList(); /* defined here in parser.y */ static int error_recovery(); static int yyerror(char *); -static const char rcsid[] = "$Id: parser.c,v 1.3 2003-10-08 21:58:09 ocoursiere Exp $"; +static const char rcsid[] = "$Id: parser.c,v 1.4 2003-10-09 20:08:04 ocoursiere Exp $"; /* defined in main.c */ extern FILE *outfile;