[Gambas-user] Debugging Gambas (again)
d4t4full at gmail.com
d4t4full at gmail.com
Sat Apr 27 16:21:47 CEST 2019
Personally, I always hated the awkward Microsoftean way to LOCATE things to PRINT. Two statements? Why?
Instead, always loved the british Sinclairean way, which uses:
PRINT AT <line>, <column>
Simple, elegant, shorter, it has it all... and even looks more VT100 oriented, where you put coordinate/color/etc. codes right before the payload. Same way to handle attributes (color, etc):
PRINT AT 3, 10; INK 7; PAPER 0; FLASH 1; INVERSE 0; BRIGHT 1; OVER 0;"Hello world."
Could go on with replacing the also Microsoftean LEFT$, RIGHT$ and MID$ abominations with the simpler and more readable Sinclairean syntax
VAR$(<startIndex> TO <endIndex>)
but enough nostalgia trip...
On Apr 27, 2019, 10:00, at 10:00, Cedron Dawg <cedron at exede.net> wrote:
>I appreciate that.
>Had you said: "Please note I don't think there is a problem with my
>code, I am looking for guidance on how to go about debugging Gambas."
>"Please note I am not looking for anyone to tell me the problem with my
>code, I am looking for guidance on how to go about debugging a Gambas
>Then I wouldn't have had to fluster Jussi a little bit. (BTW, Jussi, I
>wrote a comprehensive byte-code interpreter in 8086 assembly in Real
>Mode as a DOS 3.1 TSR that was used in production for several years,
>I don't like ncurses, it is a bloated mess, but it's been around a long
>time, so if that is the locus of the problem, I would suspect
>I've attached an incomplete project which you might find useful. It is
>part of a path towards a lightweight ncurses "equivalent". The
>attached code is essentially the same as early BASICs: It gives you a
>Locate statement for printing and provides an Inkey and Line Input for
>reading terminal input with VT100 escape sequences translated to
>----- Original Message -----
>From: "KKing" <kicking177 at gmail.com>
>To: "user" <user at lists.gambas-basic.org>
>Sent: Saturday, April 27, 2019 4:41:36 AM
>Subject: Re: [Gambas-user] Debugging Gambas (again)
>thankyou, that gives me a better understanding and lets me plan next
>steps, which will be to grab latest sources and compile with the
>"-DDEBUG_ME" to CFLAGS and CXXFLAGS, which I will not have done last
>@Ced: I am "interested in these advanced debugging techniques" and also
>because I've been through the
>Traditional source code level debugging, e.g. print statements,
>breakpoints, and watch variables
>And found that it fails in a section of code that is called repeatedly
>without issue until the segfault and by nature of the data that is
>passed around and changing the order it is entered I know it is not the
>data and on face of it not program code. The goal is to not only get
>code to run but also to establish why it is failing and if it is within
>Gambas internals or a component, to help identify and improve it, or in
>worst case have a "do not do this with Gambas".
>----[ Gambas mailing-list is hosted by https://www.hostsharing.net
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the User