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

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

Re: FB debugger : 2.96 32/64 BIT ..... (2020/02/17)

Post by SARG »

StillLearning wrote:Since you already know where the array selected starts and ends why do you not have the delta correspond to the starting and ending of the array?
You dreamt it I did it :-)

It's working but not fully tested so take this version as a beta (32bit only). http://users.freebasic-portal.de/sarg/F ... _EXE32.zip
Try it. Any comment and any improvement request are highly expected. And obviously report any issue.

Short guide :
- 'Set index" : to selected a value for the index in the allowed range, indicated by min and max.
- ' -/+1' : to decrease or increase the index also in the range.
These actions update automatically the display.
- 'Update' : update the display (not automatically done as in proc/var tab) when values have changed

Notes :
- these information are not completly linked with their source so updating could arise an error.
Eg you follow a local array. When exiting from the procedure this doesn't close the show/expand window. Or after a redim.
- Arrays inside structure are handled. (I hope without issue...)
- With multi dim arrays only the last dimension is used.
- Show/expand is always usable for other sorts of variables.

Image
StillLearning
Posts: 54
Joined: Aug 27, 2019 22:22

Re: FB debugger : 2.96 32/64 BIT ..... (2020/02/17)

Post by StillLearning »

I went to the link you specified but was unable to download the update. Sorry had computer issues to immediately use your link.
SARG
Posts: 1755
Joined: May 27, 2005 7:15
Location: FRANCE

Re: FB debugger : 2.96 32/64 BIT ..... (2020/02/17)

Post by SARG »

StillLearning wrote:I went to the link you specified but was unable to download the update. Sorry had computer issues to immediately use your link.
Sorry, file removed by error but now uploaded again.
http://users.freebasic-portal.de/sarg/F ... _EXE32.zip
Tourist Trap
Posts: 2958
Joined: Jun 02, 2015 16:24

Re: FB debugger : 2.96 32/64 BIT ..... (2020/02/17)

Post by Tourist Trap »

SARG wrote:
StillLearning wrote:Version 2.96 (2020/02/17)
changed
- No more blinking windows when loading debugging data at start of debuggee
Data from objdump is retrieved using internal functions no pipe/line input to allow the parameter CREATE_NO_WINDOW for createprocess.
Link?
Hi SARG,

The link here works : http://users.freebasic-portal.de/sarg/FBdebugger296.zip
But it's missing in the first post.

Thank you the great work.
SARG
Posts: 1755
Joined: May 27, 2005 7:15
Location: FRANCE

Re: FB debugger : 2.96 32/64 BIT ..... (2020/02/17)

Post by SARG »

Hi TT,
Thanks twice.

First page updated with the missing link.

If you deal with arrays the WIP version (only 32bit exe) is even better. See the post above.
http://users.freebasic-portal.de/sarg/F ... _EXE32.zip

I still have to work a bit for a full version.
SARG
Posts: 1755
Joined: May 27, 2005 7:15
Location: FRANCE

Re: FB debugger : 2.98 32/64 BIT ..... (2021/01/25)

Post by SARG »

Hi all,

A new version 2.98 (2021/01/25) https://users.freebasic-portal.de/sarg/ ... ger298.zip

- The most important point: using gas64 option you can debug without difference with gas32 : not anymore issues we have with gcc.
Note : even if the debug data is the same than with gas32 you can't use gdb as it's added in a different way.

- Due to the fact that in 1.08 there is new field in array descriptor structure --> 2 versions of fbdebugger.
However only one source code taking in account the different cases (32-64bit / 1.07-1.08) when compiling fbdebugger.

- Show/expand window feature improved for browsing arrays.
- Fixed bug when an array contains structures that fields are also structures.

- Help file is uptodate but now it's a pdf file (less userfriendly) but old chm still available.

Feel free to report issues and ask new features.

My next labor of Hercules should be fbdebugger for linux.
Xusinboy Bekchanov
Posts: 782
Joined: Jul 26, 2018 18:28

Re: FB debugger : 2.98 32/64 BIT ..... (2021/01/25)

Post by Xusinboy Bekchanov »

SARG wrote: - The most important point: using gas64 option you can debug without difference with gas32 : not anymore issues we have with gcc.
Note : even if the debug data is the same than with gas32 you can't use gdb as it's added in a different way.
We needed gdb because we could use vscode to debug large projects (like VisualFBEditor).

In fbdebugger I can't debug VisualFBEditor, in your program it crashes. I've increased array bounds on my program, but it debugs very slowly, you have to wait after each line. gdb quickly goes to the next line.
SARG wrote: My next labor of Hercules should be fbdebugger for linux.
We are looking forward to this.
SARG
Posts: 1755
Joined: May 27, 2005 7:15
Location: FRANCE

Re: FB debugger : 2.98 32/64 BIT ..... (2021/01/25)

Post by SARG »

Xusinboy Bekchanov wrote:
SARG wrote: - The most important point: using gas64 option you can debug without difference with gas32 : not anymore issues we have with gcc.
Note : even if the debug data is the same than with gas32 you can't use gdb as it's added in a different way.
We needed gdb because we could use vscode to debug large projects (like VisualFBEditor).
I'm using the stab format (not Dwarf) because it's easier and "readable" by a human :-). However in this format the address size is limited to 32bit (and some other fields are also very short but less problematic). So I have increased that size but it's impossible for the assembler/linker to translate as before the correponding instructions (eg .stabs "__FB_ARGV__:p18=*19=*4",160,0,0,12). Now when using -g with gas64 2 special sections are directly created filled with debug data. GDB doesn't know those sections so it doesn't/can't use it.
It should be possible to debug very large projects with fbdebugger unless the program reach some limits (eg internal arrays). Limits can be extended.
Xusinboy Bekchanov wrote: In fbdebugger I can't debug VisualFBEditor, in your program it crashes.
What version are you using (1.07/1.08, 32/64bit, gas64/gcc) ? Crash when loading data or trying to execute one line ?
Xusinboy Bekchanov wrote: I've increased array bounds on my program, but it debugs very slowly, you have to wait after each line. gdb quickly goes to the next line.
I don't understand 'increased array bounds', what is related with fbdebugger and now you can run fbdebugger ?
A reason for slowness / gdb : each time a line is executed (step by step, etc except FAST run) ALL is updated, especially the variable values so if there is a lot it could take a lot of time. GDB doesn't do that.
You give me an idea : a new command allowing execution step by step without updating all. Your opinion ?
Xusinboy Bekchanov wrote:
SARG wrote: My next labor of Hercules should be fbdebugger for linux.
Xusinboy Bekchanov wrote:We are looking forward to this.
I know but be patient ;-) that will be a long job. I don't know yet if I'll code a GDB's front end or use the system API.

And thanks for testing.
Xusinboy Bekchanov
Posts: 782
Joined: Jul 26, 2018 18:28

Re: FB debugger : 2.98 32/64 BIT ..... (2021/01/25)

Post by Xusinboy Bekchanov »

SARG wrote:Now when using -g with gas64 2 special sections are directly created filled with debug data. GDB doesn't know those sections so it doesn't/can't use it.
Leave an option for gdb too. When I downloaded 1.08.0 and compiled with -gas64, it compiled faster than gcc, but it was impossible to debug with gdb.
SARG wrote: What version are you using (1.07/1.08, 32/64bit, gas64/gcc) ? Crash when loading data or trying to execute one line ?
1.07 и 1.08, 32-bit, gas32. Crash when loading data. It's because of the limits.
SARG wrote: It should be possible to debug very large projects with fbdebugger unless the program reach some limits (eg internal arrays). Limits can be extended.
SARG wrote: I don't understand 'increased array bounds', what is related with fbdebugger and now you can run fbdebugger ?
Okay. I tried changing fbdebugger. Const VRRMAX=100000 made Const VRRMAX=200000. Yes, it worked. But step by step is very slow.
SARG wrote: A reason for slowness / gdb : each time a line is executed (step by step, etc except FAST run) ALL is updated, especially the variable values so if there is a lot it could take a lot of time. GDB doesn't do that.
You give me an idea : a new command allowing execution step by step without updating all. Your opinion ?
Isn't it possible to update only the changed variables?
SARG
Posts: 1755
Joined: May 27, 2005 7:15
Location: FRANCE

Re: FB debugger : 2.98 32/64 BIT ..... (2021/01/25)

Post by SARG »

Xusinboy Bekchanov wrote:
SARG wrote:Now when using -g with gas64 2 special sections are directly created filled with debug data. GDB doesn't know those sections so it doesn't/can't use it.
Leave an option for gdb too. When I downloaded 1.08.0 and compiled with -gas64, it compiled faster than gcc, but it was impossible to debug with gdb.
I tried but it's not possible to put Dwarf debug data and when I used the way like gas32/stabs there is an error with the linker. Debug with fbdebugger :-)
Xusinboy Bekchanov wrote: Crash when loading data. It's because of the limits.
Okay. I tried changing fbdebugger. Const VRRMAX=100000 made Const VRRMAX=200000. Yes, it worked. But step by step is very slow.
You did not say that you got an error message. That the case when there are too many running variables. I guess I should end fbdebugger in this case (obviously after displaying the message....).
Xusinboy Bekchanov wrote:Isn't it possible to update only the changed variables?
I have added a new feature update / noupdate see the new icon near tools. By default proc/var, dump and watched are updated every time. When you change the behaviour by clicking on that icon there is no update until you change it again. The change to update causes also an immediatly update.
Tell me if it works and suits you.
Source code + new RC file + 2 news icons : https://users.freebasic-portal.de/sarg/ ... update.zip
Xusinboy Bekchanov
Posts: 782
Joined: Jul 26, 2018 18:28

Re: FB debugger : 2.98 32/64 BIT ..... (2021/01/25)

Post by Xusinboy Bekchanov »

Yes, it works.
SARG
Posts: 1755
Joined: May 27, 2005 7:15
Location: FRANCE

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

Post by SARG »

Still a new version : 2.98.1 (2021/01/30) https://users.freebasic-portal.de/sarg/ ... r298_1.zip

Added
- a new button on main window to toogle update on / update off for proc/var tab and dump memory when executing step by step.
Image
The purpose is to avoid a long update when there are a lot of variables/fields (thanks Xusinboy)
However when a new proc is started an update is done but the variables are labelled "Not filled".
And if it's OFF setting ON triggers an update.

Changed
- Up to 20 Shw/exp windows (previously 10) so you can see more variables when update is off.
- The shw/exp windows are closed when the procedure owner of the variables is closed, except for statics.
- Now when a dynamic array is redimmed a related shw/exp can be updated (using the button 'Update'.) A message box is displayed for warning
(full update or only indexes), address is changed, min/max indexes are updated and the current index is set in the new range.(old request by David Y.)
Not done if the array is a field in a structure, in this case close and redo shw/exp.
- Explicit messages when some internal limits (unfortunately not all) are reached forcing an exit of fbdebugger.



Need your opinion as I'll review the UI (user interface) for Linux :
- Are the lines at the botttom of main window useful ? (bookmark, watched, ...) They can be moved to be only in tabs on the right.
- Is the feature compilation directly started in fbdebugger used/useful ?
- Other useless features or requests?
Thanks in advance.
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:Still a new version : 2.98.1 (2021/01/30) https://users.freebasic-portal.de/sarg/ ... r298_1.zip
Thanks for the new version!
SARG wrote:Added
- a new button on main window to toogle update on / update off for proc/var tab and dump memory when executing step by step.
The purpose is to avoid a long update when there are a lot of variables/fields (thanks Xusinboy)
However when a new proc is started an update is done but the variables are labelled "Not filled".
And if it's OFF setting ON triggers an update.
For some reason I do not see a special difference. SARG, Please try to debug my editor under the debugger, downloading the source code with 500-1000 rows there (Parser in the editor must be enabled in the settings). You will see that work in the editor under the FBDebugger debugger is impossible. However, if the editor debugs in GDB, then there is nothing slows. It was about that wrote Xusinboy. I am writing this in order to make it (if you have a desire), do some kind of lite-mode, in which no extra tracking. That is, the debugger only catches the program crash errors and can specify information about the last procedure\functions in which the program is crash. And with the possibility to see of the tree calls before crash (backtrace)
SARG wrote:- Are the lines at the botttom of main window useful ? (bookmark, watched, ...) They can be moved to be only in tabs on the right.
all this can be done in a separate window / tab, which if you wish, you can call
- Is the feature compilation directly started in fbdebugger used/useful ?
Never used this feature because it is useless without the ability to edit the source code directly to FBDebugger.

P.S. I always loved the FBDebugger debugger.
SARG
Posts: 1755
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:Thanks for the new version!
P.S. I always loved the FBDebugger debugger.
You are welcome.
VANYA wrote:
SARG wrote:- a new button on main window to toogle update on / update off for proc/var tab and dump memory when executing step by step.
The purpose is to avoid a long update when there are a lot of variables/fields (thanks Xusinboy)
However when a new proc is started an update is done but the variables are labelled "Not filled".
And if it's OFF setting ON triggers an update.
For some reason I do not see a special difference. SARG, Please try to debug my editor under the debugger, downloading the source code with 500-1000 rows there (Parser in the editor must be enabled in the settings). You will see that work in the editor under the FBDebugger debugger is impossible. However, if the editor debugs in GDB, then there is nothing slows. It was about that wrote Xusinboy.
Strange as he wrote (after downloading the WIP version, in previous post) that it was working. Be sure to set update off (icon must have a white cross in a red circle). Anyway I'll try with your code.
About gdb, it doesn't update a tree with all the variables at each step. It displays values only when you send a request.
VANYA wrote: I am writing this in order to make it (if you have a desire), do some kind of lite-mode, in which no extra tracking. That is, the debugger only catches the program crash errors and can specify information about the last procedure\functions in which the program is crash. And with the possibility to see of the tree calls before crash (backtrace)
There is already a backtrace feature in contextual menu of thread tab. You can use RUN until the debuggee crashes and after use backtrace option.
VANYA wrote:
SARG wrote:- Are the lines at the botttom of main window useful ? (bookmark, watched, ...) They can be moved to be only in tabs on the right.
all this can be done in a separate window / tab, which if you wish, you can call
Thanks. Need more opinion, pls.
VANYA wrote:
- Is the feature compilation directly started in fbdebugger used/useful ?
Never used this feature because it is useless without the ability to edit the source code directly to FBDebugger.
There are two ways :
- Drag and drop a bas file directly on the source code window or start fbdebugger with a bas file name in command line. The compilation starts automatically.
- In tools menu 'Quick edit' / F9 option allows a light editing of the current source code (readonly property is removed temporary) then you can also start a compilation directly 'Compil (-g)...' / F11.
Path for fbc needs to be defined in settings.
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: Strange as he wrote (after downloading the WIP version, in previous post) that it was working. Be sure to set update off (icon must have a white cross in a red circle). Anyway I'll try with your code.
About gdb, it doesn't update a tree with all the variables at each step. It displays values only when you send a request.
I have suggestions for updating variables (in addition to update, no update). You could do this:
https://github.com/XusinboyBekchanov/Vi ... 1ef09601a4
SARG wrote: - In tools menu 'Quick edit' / F9 option allows a light editing of the current source code (readonly property is removed temporary) then you can also start a compilation directly 'Compil (-g)...' / F11.
Path for fbc needs to be defined in settings.
Why is it not possible to highlight?
Post Reply