FB debugger : 3.02 32/64 BIT WDS/LNX..... (2023/07/05)

User projects written in or related to FreeBASIC.
Post Reply
SARG
Posts: 1756
Joined: May 27, 2005 7:15
Location: FRANCE

Re: FB debugger : 2.98.1 32/64 BIT ..... (2021/01/30)

Post by SARG »

VANYA wrote:And I also forgot to write: If you download the source code to the debugger in UTF-16LE, then it is not displayed.
Try that and tell me. (only an exe for 32bit) https://users.freebasic-portal.de/sarg/ ... nicode.zip

I coded a snippet for creating this 2 lines in UTF16-LE format and when debugging the display is perfect (main window and current line).

Code: Select all

'FreeBASIC
Print "test file in UTF16-LE Если использовать Fast Run в FBDebugger, показывает место ошибки?"
VANYA
Posts: 1834
Joined: Oct 24, 2010 15:16
Location: Ярославль
Contact:

Re: FB debugger : 2.98.1 32/64 BIT ..... (2021/01/30)

Post by VANYA »

SARG wrote:
VANYA wrote:And I also forgot to write: If you download the source code to the debugger in UTF-16LE, then it is not displayed.
Try that and tell me. (only an exe for 32bit) https://users.freebasic-portal.de/sarg/ ... nicode.zip

I coded a snippet for creating this 2 lines in UTF16-LE format and when debugging the display is perfect (main window and current line).

Code: Select all

'FreeBASIC
Print "test file in UTF16-LE Если использовать Fast Run в FBDebugger, показывает место ошибки?"
SARG, unfortunately, Asian hieroglyphs are loaded. I do not know what you did there, but the text in ASCII can be translated as follows:

Code: Select all

Function UTFTOASCII(ByVal text As WString Ptr) As String Export
  Var    blen = WideCharToMultiByte (CP_ACP  , 0,text , -1, 0, 0,0,0)
  Dim As ZString ptr wbuf
  Dim As String returnS
  wbuf= allocate( blen )
  WideCharToMultiByte (CP_ACP  , 0,text , -1, Cast( LPSTR ,wbuf), blen,0,0)
  returnS=*wbuf
  DeAllocate(wbuf)
  Return returnS
End Function
Xusinboy Bekchanov
Posts: 782
Joined: Jul 26, 2018 18:28

Re: FB debugger : 2.98.1 32/64 BIT ..... (2021/01/30)

Post by Xusinboy Bekchanov »

If you compile FBDebugger c -gen gas64, then the program crashes when debugging this code on line 10:

Code: Select all

Type _vec3 As vec3 ' forward declare

Type vec2
  Declare Constructor(ByRef x As Const Single=0.0, ByRef x As Const Single=0.0)
  Declare Function xxx() ByRef As _vec3
  As Single x=Any,y=Any
End Type
Constructor vec2(ByRef a As Const Single, ByRef b As Const Single)
  x=a:y=b
End Constructor

Type vec3
  Declare Constructor(ByRef x As Const Single=0.0, ByRef x As Const Single=0.0, ByRef z As Const Single=0.0)
  As Single x=Any,y=Any,z=Any
End Type
Constructor vec3(ByRef a As Const Single, ByRef b As Const Single, ByRef c As Const Single)
  x=a:y=b:z=c
End Constructor

Function vec2.xxx() ByRef As vec3
  Static v As vec3
  v = vec3(1,2,3)
  Return v
End Function

Dim v2 As vec2, v3 As vec3
v3 = v2.xxx() ' <--- function always used like a function returning by value (by copying the returned reference)
When compiling FBDebugger with -gen gcc, this crash is not observed.

Not only this code, when going End Constructor of any code.
SARG
Posts: 1756
Joined: May 27, 2005 7:15
Location: FRANCE

Re: FB debugger : 2.98.1 32/64 BIT ..... (2021/01/30)

Post by SARG »

Hi Xusinboy,
Thanks for the report.

Is the debuggee or fbdebugger which crashes ?
What fbc version 1.07.3 or 1.08 do you use ?

For now I'm a bit stuck with problems on the new version of fbdebugger (WDS/LNX) using W9 library from VANYA.
So I'll investigate that later.
Xusinboy Bekchanov
Posts: 782
Joined: Jul 26, 2018 18:28

Re: FB debugger : 2.98.1 32/64 BIT ..... (2021/01/30)

Post by Xusinboy Bekchanov »

SARG wrote: Is the debuggee or fbdebugger which crashes ?
In my opinion, -gen gas64, because fbdebugger works with -gen gcc (Compiled FBdebugger.exe with fbc.exe "FBdebugger.bas" -gen gcc debug codes with End Constructor's).
SARG wrote: What fbc version 1.07.3 or 1.08 do you use ?
fbc version 1.07.3.
SARG
Posts: 1756
Joined: May 27, 2005 7:15
Location: FRANCE

Re: FB debugger : 2.98.1 32/64 BIT ..... (2021/01/30)

Post by SARG »

@Xusinboy,

I did some tests compiling fbdebugger and your code with -gen gas64 but with my own version 1.07.2 --> no problem.
In 1.07.3 there are not the modifications for gas64 I did since november... So probably I fixed the issue earlier.

I tested also with 1.08 from daily build by St_W ---> no problem.

Jeff should release 1.08 soon but in meantime, if needed, use the version provided by St_W.
visualfreebasic5
Posts: 25
Joined: Dec 11, 2019 15:14
Contact:

Re: FB debugger : 2.98.1 32/64 BIT ..... (2021/01/30)

Post by visualfreebasic5 »

This debugging software is very good.
VisualFreeBasic lacks debugging function. I want to modify FB_debugger to use it in VisualFreeBasic. Change the BAS source code to the VFB source code. VFB is visualized, so it is convenient to modify and add functions. But next time FB_debugger is updated, I have to remake it as VFB source code, do you consider that FB_debugger will be written by VisualFreeBasic IDE in the future?
SARG
Posts: 1756
Joined: May 27, 2005 7:15
Location: FRANCE

Re: FB debugger : 2.98.1 32/64 BIT ..... (2021/01/30)

Post by SARG »

visualfreebasic5 wrote:This debugging software is very good.
I know :-) thanks.
visualfreebasic5 wrote:But next time FB_debugger is updated, I have to remake it as VFB source code,
Your problem not mine. However the GUI part is very very rarely changed.
visualfreebasic5 wrote:do you consider that FB_debugger will be written by VisualFreeBasic IDE in the future?
No I don't as I just refactored it using W9 library so it'll be also usable on Linux.

@all
With fbc 1.08 and using -gen gas64 debugging will be similar to debugging with gas32 better than with gcc.
Useless, or so seem, features are removed and execution speed of the debuggee is improved.

The Windows version is almost complete.
The Linux version needs still work on the system part.
visualfreebasic5
Posts: 25
Joined: Dec 11, 2019 15:14
Contact:

Re: FB debugger : 2.98.1 32/64 BIT ..... (2021/01/30)

Post by visualfreebasic5 »

Fbdebugger will create 1000 RichEdit, can it be optimized? Use only one RichEdit or scintilla
SARG
Posts: 1756
Joined: May 27, 2005 7:15
Location: FRANCE

Re: FB debugger : 2.98.1 32/64 BIT ..... (2021/01/30)

Post by SARG »

visualfreebasic5 wrote:Fbdebugger will create 1000 RichEdit, can it be optimized? Use only one RichEdit or scintilla
The next version (3.00) uses only one Scintilla window. :-)
visualfreebasic5
Posts: 25
Joined: Dec 11, 2019 15:14
Contact:

Re: FB debugger : 2.98.1 32/64 BIT ..... (2021/01/30)

Post by visualfreebasic5 »

Now 2K 4K display, DPI = 125% to 200%, can version 3.0 support high DPI?
Is version 3.0 expected to be completed this year?
I'm looking forward to it
SARG
Posts: 1756
Joined: May 27, 2005 7:15
Location: FRANCE

Re: FB debugger : 2.98.1 32/64 BIT ..... (2021/01/30)

Post by SARG »

visualfreebasic5 wrote:Now 2K 4K display, DPI = 125% to 200%, can version 3.0 support high DPI?
No DPI support.
You can list many reasons but no planned changes.....
visualfreebasic5 wrote:Is version 3.0 expected to be completed this year?
Before the end of month, at least for Windows version.
SARG
Posts: 1756
Joined: May 27, 2005 7:15
Location: FRANCE

Fbdebugger v3beta

Post by SARG »

A bit late regarding to my previous post ;-)

A new version of fbdebugger named v3beta. I recoded a lot of things using Vanya's W9 lib and scintilla (scilexer.dll) to be able to produce also a Linux version.
The features are similar than those of the current fbdebugger however a great improvement is the execution speed increased for all the ways of running (in fact like fast run). There are more news things I let you discover.

For now some minor features are not yet implemented in Windows version and for Linux it's still WIP (only main window with gui).
So only the 64bit exe for Windows is provided (32bit version not tested) : https://users.freebasic-portal.de/sarg/ ... v3beta.zip
The exe with -exx in its name can be used in case of crash, launch it in a console for seeing the error message.

Important note : your program (debuggee) must be compiled with option -gas64 not gcc.

The source code is available here : https://github.com/SARG-FB/fbdebugger-New
W9 library : https://sourceforge.net/projects/guiwindow9/files/

Feel free to report any problems and to post remarks or requests.


PS thanks to VANYA for his help with W9 lib and testing fbdebugger :-)
wallyg
Posts: 267
Joined: May 08, 2009 7:08
Location: Tucson Arizona

Re: FB debugger : 2.98.1 32/64 BIT ..... (2021/01/30)

Post by wallyg »

I have an up to date Windows 10 system
and used C:\WinFBE_Suite\FreeBASIC-1.07.2-gcc-5.2\fbc -g -s gui "DSS.bas" to compile and create a DSS.exe file.

It does not execute at all.

First lines of main program are

Code: Select all

Screen 21
Print "Start"
Sleep 5000
..
No window ever appears.

I then tried the 64 bit debugger. I indicate the EXE to execute and before anything else appears on the screen I get a small window with the title line:

Replace Dwarf

followed by an error message

Cudt Not Ok Forward

Repeated clicks of ok generate more windows

Cudt Not OK Backward
Cudt Not OK <0x1267>
Cudt Not OK Head
Cudt Not Ok Tail
Cudt Not OK Current
Vrbloc not ok This
...

I have a Type declaration

Code: Select all

Type        Core                Extends   Object
    As String                   ID                        
    As Core Ptr                 Forward             
    As Core Ptr                 Backward       
    As Chain_ Ptr               Header         
    Union
    ...
And one

Code: Select all

Type        Chain               Extends Core
    As Core Ptr                 Head              
    As Core Ptr                 Tail                    
    As Core Ptr                 Current          
    As Integer32                Count      

    Declare         Constructor
    Declare         Destructor
    ...
The names in these types are the same as the error messages?

I was just wondering what the error messages were trying to tell me? And how to proceed next in trying to get this to work. The program does use GTK

I have tried compiling with GAS64, then tried FBC 1.07.02 with GCC 5 and FBC 1.08.01 with GCC 9. All produce the same problem.

This is a brand new program that is not finished and I just got all the syntax errors out and this was the first time I got an EXE created and tried executing for the first time.

Thanks for any advice.

Wally G
SARG
Posts: 1756
Joined: May 27, 2005 7:15
Location: FRANCE

Re: FB debugger : 2.98.1 32/64 BIT ..... (2021/01/30)

Post by SARG »

@wallyg
The error means a problem when processing the debug data. I can't say more.

1/ You could try with 32bit version compiler and fbdebugger.

2/ if 64bit is mandatory you could use '-gen gas64' as generated debugging data is safer. BUT after you need to use the new version of fbdebugger (see my previous post) which is really better for 64bit, very close to 32bit version.

3/ Post your code or at least an extract having the problem.
Post Reply