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

User projects written in or related to FreeBASIC.
Post Reply
AGS
Posts: 1284
Joined: Sep 25, 2007 0:26
Location: the Netherlands

Post by AGS »

SARG wrote:
@AGS
Scintilla for what purpose ?
Line numbering, a couple of extra margins (you can use a margin to put up a mark ((could be used to mark the position of breakpoints)) ) etc.... It's just a thought.

I could get the debugger to build with the -g option and then debug it using Insight. Interesting piece of software your debugger is.
SARG
Posts: 1767
Joined: May 27, 2005 7:15
Location: FRANCE

Post by SARG »

@AGS
Line numbering, a couple of extra margins (you can use a margin to put up a mark ((could be used to mark the position of breakpoints)) ) etc.... It's just a thought.
You can try to change this part as you want.
I could get the debugger to build with the -g option and then debug it using Insight.
If you find any problems please report them.
Interesting piece of software your debugger is.
Thanks.

@McLovin
Try this new version. I fixed some bugs, see at the top of code.
There are always some issues but I hope to solve them, need time.
Could you please upload the fbc.asm and the ir-hlc.asm (with -g).
The beginning of fbc_debug.exe (thanks for uploading) is a bit strange.....

CAUTION testing version but usable
http://freefile.kristopherw.us/uploads/ ... c_2.3a.zip
McLovin
Posts: 82
Joined: Oct 21, 2008 1:15
Contact:

Post by McLovin »

Hi SARG,

Thanks for the new version, it does seem to be working better now. I am able to trace through the fbc.exe without the debugger GPF'ing.

I have uploaded the files you requested to: http://www.freebasiccompiler.com/files/fbc_debug.rar (902K)

Also, I noticed that when I am single stepping through code that whenever it jumps into a new sub/function that the [+] icon in the debug treeview does not immediately display. You need to switch tabs back and forth to force a display. Granted, double clicking on the new treeview item will expand it but the [+] icon should display to indicate to the user that the node can be expanded. I added RedrawWindow htv, 0, 0, 1 to the Tree_AddItem function (at line 2552 immediately before the function returns), and it fixed this minor display issue.
McLovin
Posts: 82
Joined: Oct 21, 2008 1:15
Contact:

Post by McLovin »

Hi SARG,

Another thing that I noticed is that the CMD line argument is not being saved correctly between sessions in your ini file. If any file that is not a .exe file is used as a command line argument then it will not be loaded from the ini file. I noticed this when trying to pass a .bas file to the fbc.exe during debugging.

Here is the area of code that needs to be changed:

Code: Select all

' In the "init()" sub:

   elseif left(lineread,6)="[CMD]=" Then
      lineread=rtrim(mid(lineread,7,999))
      'if dir(lineread)<>"" and instr(lineread,".exe") Then  '<-- THIS LINE
      If Dir(lineread)<>"" Then
         cmdexe(c)=lineread
      EndIf
SARG
Posts: 1767
Joined: May 27, 2005 7:15
Location: FRANCE

Post by SARG »

Hi McLovin,

I had noticed these two minor problems, thank you for the fix
McLovin wrote: Another thing that I noticed is that the CMD line argument is not being saved correctly between sessions in your ini file. If any file that is not a .exe file is used as a command line argument then it will not be loaded from the ini file. I noticed this when trying to pass a .bas file to the fbc.exe during debugging.
power and danger of copy / paste ;-)

By the way if you notice language faults (english not freebasic) ......

'Thanks again for your help.


I'm working to solve some bugs :
- because of multiple modules the shared and common vars are not correctly treated.
- the strange beginning of fbc, I guess constructors does this behaviour
- Using STOP sometimes --> BOOM

Good year end for all
SARG
Posts: 1767
Joined: May 27, 2005 7:15
Location: FRANCE

Post by SARG »

A new version with some big changes inside the variables management.
The compiler might be debugged without any problem, I hope....

@McLovin / @Couting_pine
It seems that there is a bug about line numbers for some constructors : the same number for every line. This explains the strange line number at the start. I'll dig deeper.

An other bug is concerning the common variables : for arrays there isn't stabs data except the name. As for shared a workaround should be possible.
McLovin
Posts: 82
Joined: Oct 21, 2008 1:15
Contact:

Post by McLovin »

Hi SARG,

Thanks for the new version. I will try it out more tomorrow when I have more time. In the meantime, I think that maybe you can modify your resource file to eliminate the hard coded paths to the images. Try the following:

Code: Select all

1 ICON    "fbdebugger.ico"
1000 BITMAP DISCARDABLE "./buttons/step.bmp"
1001 BITMAP DISCARDABLE "./buttons/runto.bmp"
1002 BITMAP DISCARDABLE "./buttons/step_over.bmp"
1003 BITMAP DISCARDABLE "./buttons/step_out.bmp"
1004 BITMAP DISCARDABLE "./buttons/auto.bmp"
1005 BITMAP DISCARDABLE "./buttons/run.bmp"
1006 BITMAP DISCARDABLE "./buttons/stop.bmp"
1007 BITMAP DISCARDABLE "./buttons/minicmd.bmp"
1008 BITMAP DISCARDABLE "./buttons/free.bmp"
1009 BITMAP DISCARDABLE "./buttons/kill.bmp"
1010 BITMAP DISCARDABLE "./buttons/exe.bmp"
1011 BITMAP DISCARDABLE "./buttons/multiexe.bmp"
1012 BITMAP DISCARDABLE "./buttons/attachexe.bmp"
1013 BITMAP DISCARDABLE "./buttons/files.bmp"
1014 BITMAP DISCARDABLE "./buttons/notes.bmp"
1015 BITMAP DISCARDABLE "./buttons/tools.bmp"
1016 BITMAP DISCARDABLE "./buttons/exemod.bmp"
1017 BITMAP DISCARDABLE "./buttons/fastrun.bmp"
1020 BITMAP DISCARDABLE "./buttons/notes2.bmp"
SARG
Posts: 1767
Joined: May 27, 2005 7:15
Location: FRANCE

Post by SARG »

Hi all,

A new version, link first post.
The item of named enums are now showed.
The operator names are also correctly displayed.
You can also follow the pointed values (or every others variables). use the option show/expand inside the context menu of vars.

I change the screencopy at first post : FBC under the debugger.

@McLovin
I change the .rc file. Thanks. Strangely on a other PC it was already done.

I confirm that the line number for a default constructor is always the same for every line. This explains the strange line number at the start of fbc. IMO in case of default constructor (not coded by the user) it should not be any debugging informations...
dfnhb
Posts: 4
Joined: Apr 18, 2009 14:35

Post by dfnhb »

HI
Why am I unable to open .bas source file, what set the requirements? How many tests can not be achieved enlightenment in front of you screenshots.
SARG
Posts: 1767
Joined: May 27, 2005 7:15
Location: FRANCE

Post by SARG »

Hello,
dfnhb wrote:HI
Why am I unable to open .bas source file, what set the requirements? How many tests can not be achieved enlightenment in front of you screenshots.
I'm not sure to understand. Just compile your code with the -g option then in FBdebugger click on the third button (starting on the right, the two diskettes) and select the your .exe.
Automatically the(s) source(s) are loaded on the left side and the variables displayed on the right side.

Read the txt/help file. If you get other issues do not hesitate to post them.
dfnhb
Posts: 4
Joined: Apr 18, 2009 14:35

Post by dfnhb »

If you do not pass build, how will produce .exe files.
You can set the setup items provided for reference I do?
SARG
Posts: 1767
Joined: May 27, 2005 7:15
Location: FRANCE

Post by SARG »

Fbdebugger is a debugger not an IDE so before using it you must compile your code.
Under the command line fbc yourcode.bas or through FBedit or Fbide

Don't forget to add the -g option

Refer to the Freebasic documentation
dfnhb
Posts: 4
Joined: Apr 18, 2009 14:35

Post by dfnhb »

Thank you for your help.
The fbdebug in the open source font is relatively small, you can change the font source of his life? How the right to, should we do?
SARG
Posts: 1767
Joined: May 27, 2005 7:15
Location: FRANCE

Post by SARG »

No problem, I'll upload tomorrow a new version with this possibility (font size 8 or 10) in the settings window.

By the way, as your sentences are not easy understandable use the google translator.
dfnhb
Posts: 4
Joined: Apr 18, 2009 14:35

Post by dfnhb »

Yes.
Sorry, the level of bad because I can only ask questions using this method.
Font desirable to set up several, this program is for students to learn how to use us, and now have just written instructions.
You can send to my e-mail programs do:
dfnhb@163.com
dafengnhb@gmail.com
Post Reply