Forum
-d (display debug info) not working? - Printable Version

+- Forum (https://www.boriel.com/forum)
+-- Forum: Compilers and Computer Languages (https://www.boriel.com/forum/forumdisplay.php?fid=12)
+--- Forum: ZX Basic Compiler (https://www.boriel.com/forum/forumdisplay.php?fid=11)
+---- Forum: Bug Reports (https://www.boriel.com/forum/forumdisplay.php?fid=15)
+---- Thread: -d (display debug info) not working? (/showthread.php?tid=320)



-d (display debug info) not working? - LCD - 02-28-2011

Hi Boriel. Maybe it is a bug... If I try to use -d option for displaying debug info, the compiler enters a infinite loop. Is it not supported anymore in build 2114?
Ah, the program is a simple PRINT "Hallo", nothing else.


Re: -d (display debug info) not working? - boriel - 03-01-2011

LCD Wrote:Hi Boriel. Maybe it is a bug... If I try to use -d option for displaying debug info, the compiler enters a infinite loop. Is it not supported anymore in build 2114?
Ah, the program is a simple PRINT "Hallo", nothing else.
I can't reproduce the bug. Check you have 1.2.7-r2114 (final).
What do you mean "an infinite loop"?

-d should display Intermediate code + ASM
-dd should display the above and optimizations and maybe more info
-ddd like the above but now also displays parsing (takes time and loooong output).

Please check version, and put the entire command line here, so I can check?


Re: -d (display debug info) not working? - LCD - 03-01-2011

Quote:I can't reproduce the bug. Check you have 1.2.7-r2114 (final).
Checked yesterday, it is 2114 final

Quote:What do you mean "an infinite loop"?
It starts the compilation and never ends, without displaying the debug info.

Quote:d should display Intermediate code + ASM
-dd should display the above and optimizations and maybe more info
-ddd like the above but now also displays parsing (takes time and loooong output).
Thanks for thos additional info. Untiö now I used onöy -d

Quote:and put the entire command line here, so I can check?
Will do this today after work.


Re: -d (display debug info) not working? - LCD - 03-01-2011

The Arguments line is:
Code:
"C:\Coding\BorIDE\temp.bor" -S 24200 -t -B -a -d -o "C:\LCD_ZX_Games\Test.tap" -O 3 --heap-size=1000
Without -d it works fine


Re: -d (display debug info) not working? - boriel - 03-01-2011

LCD Wrote:The Arguments line is:
Code:
"C:\Coding\BorIDE\temp.bor" -S 24200 -t -B -a -d -o "C:\LCD_ZX_Games\Test.tap" -O 3 --heap-size=1000
Without -d it works fine
I don't understand very well the above. I guess the above line was prefixed with zxb.exe, wasn't it?
I tried this code:
Code:
PRINT "HELLO"
with this command line:
Code:
zxb.exe -d -taB hello.bas -S 24200 -O 3 --heap-size=1000
And it worked ok (IC + ASM output on the screen).


Re: -d (display debug info) not working? - LCD - 03-02-2011

boriel Wrote:I guess the above line was prefixed with zxb.exe, wasn't it?
Surely it was. As I said, it was working witout -d well.

boriel Wrote:I tried this code:
Code:
PRINT "HELLO"
with this command line:
Code:
zxb.exe -d -taB hello.bas -S 24200 -O 3 --heap-size=1000
And it worked ok (IC + ASM output on the screen).
It was working for me previously (I think, with 1604 build. I will investigate this later.


Re: -d (display debug info) not working? - LCD - 03-05-2011

I now know what is wrong... I cannot read the streamed output channel of the zxbc.exe anymore in debug mode, which I redirected to my BorIDE. After deactivation of the flags READ (stdout, I think, the problem is here. Anything changed?) and HIDE, it displays the debug info in the zxbc window. This was not happen with earlier versions as it was working as expected. It looks like a communication problem between the two, because zxbc.exe generates a high CPU load for minutes (without exiting), but after I close zxbc.exe, BorIDE recieve all the Debug info, with a Exitcode -1073741510. Only DEBUG-mode is affected, not the normal communication (I haven't tested warnings yet).
Maybe there is a possibility for you to add a feature to output all informations in text files?
I will later try the ConTEXT Editor too, to see if it has same problems.


Re: -d (display debug info) not working? - boriel - 03-06-2011

LCD Wrote:I now know what is wrong... I cannot read the streamed output channel of the zxbc.exe anymore in debug mode, which I redirected to my BorIDE. After deactivation of the flags READ (stdout, I think, the problem is here. Anything changed?) and HIDE, it displays the debug info in the zxbc window. This was not happen with earlier versions as it was working as expected. It looks like a communication problem between the two, because zxbc.exe generates a high CPU load for minutes (without exiting), but after I close zxbc.exe, BorIDE recieve all the Debug info, with a Exitcode -1073741510. Only DEBUG-mode is affected, not the normal communication (I haven't tested warnings yet).
Maybe there is a possibility for you to add a feature to output all informations in text files?
I will later try the ConTEXT Editor too, to see if it has same problems.
ZX Basic now outputs extra ASM info with -d (in fact, to stderr), except that -d might now also output PLY (the python toolkit I used to build the compiler) extra output. I don't know, but it should go also to stderr. You can force ZX BASIC output to be sent to a temporary file with --stdout=<flags> and --stderr=<file> command line parameters (not yet implemented, I'm afraid).

In fact, zxb -d will output some debug info via stdout (the intermediate code info), and ASM debug info via stderr (this is ok). All debug info should go (I think) via stderr. Isn't it? I will check this issue (Keep in mind I check against command line, not against any IDE!)