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

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

Re: FB debugger : 2.62 (16 february 2013)

Postby SARG » Apr 22, 2013 21:54

Hi all,

A new version 2.63. See first post for the changes. http://users.freebasic-portal.de/sarg/f ... _04_22.zip
There are some added/new buttons so take all the folder together with the rc file.

The help file (chm) has been revised. I hope that no links are broken....It's included in the zip above.
All the files (html and images) needed to create it are in the zip file : http://users.freebasic-portal.de/sarg/f ... lp_110.zip
Do not hesitate to criticize (form, text, etc).

The next step of this project should be an integrated tutorial. But be patient ;-)
VANYA
Posts: 1411
Joined: Oct 24, 2010 15:16
Location: Ярославль
Contact:

Re: FB debugger : 2.62 (16 february 2013)

Postby VANYA » Apr 23, 2013 2:36

SARG wrote:Hi all,

A new version 2.63.


Thanks!
SARG
Posts: 1162
Joined: May 27, 2005 7:15
Location: FRANCE

Re: FB debugger : 2.64 (27 july, 2013)

Postby SARG » Jul 27, 2013 20:24

Hi all,

Some interesting points of this 2.64 version :

- Immediate Restarting is optimized : the bas files (except dll ones) are not reloaded. If many files it could be significant.
- You can cutomize (change or create) the shortcut key for every menu option.
- To facilitate the search of a proc in procs tab, the proc could be sorted by their name or by their module file name.
AGS
Posts: 1284
Joined: Sep 25, 2007 0:26
Location: the Netherlands

Re: FB debugger : 2.64 (27 july, 2013)

Postby AGS » Jul 31, 2013 10:15

I found a huuugggeee number of 'bugs' ;) Actually, I found some typos.

toogle => toggle assuming you wanted to write 'toggle'.

lines affected: 148, 2354, 2389,3498, 3549.

line 422
'item treewiew => 'item treeview

line 462
'index for treview => 'index for treeview

line 631
'string under cursor or slected by user
slected => selected

line 674
Dim lb As HWND 'hanlde of the delta label
handlde => handle

line 697
'handle ligne => 'handle line

line 1213
The combination of the words 'integerest' and 'name'.
What does 'integerest name' mean?

line 1218 (also line 1222)
The minimal needed for a standard button bar with text labels.
'minimal' => 'minimum'.

line 3002
'caret at begining of line
begining => beginning

line 3035/3043
disabeld => disabled

line 5973
'get compil log
I think compil is not correct (compilation?)

line 5989
'end of string if lenght
lenght => length

And I stopped looking for typos halfway through the source code
(I will check the rest asap).

I found some more typos. Some of those were simply 'charming' (typos that put
a smile on your face :) ). And then there were some typos I wasn't sure about.

So there you go: a small list of typos. As a contribution to the FB debugger
projects it's not much but then again, who is going to take the time to search
for typos in comments? ( I am ;) ).
SARG
Posts: 1162
Joined: May 27, 2005 7:15
Location: FRANCE

Re: FB debugger : 2.64 (27 july, 2013)

Postby SARG » Jul 31, 2013 20:20

AGS wrote: As a contribution to the FB debugger
projects it's not much but then again, who is going to take the time to search
for typos in comments? ( I am ;) ).


You are a bit crazy or you have a lot time to lost, for checking comments ;-) **10
Anyway, thanks for this, any contribution is always welcome. I 'll put your remarks/fixes in the next release.

As I wrote in the post about gdb and the double below the fix for fbdebugger. The 3 added lines are inside the same proc and marked 31/07/2013. Simply copy and change the entire proc.

Code: Select all

Sub cutup_udt(readl As string)
Dim As Integer p,q,lgbits
dim as integer flagdouble '31/07/2013
Dim As string tnm
p=instr(readl,":")
'GCC
if readl[0]=asc("_") then
    tnm=mid(readl,2,p-2)
    p+=2 'skip :T
else
    tnm=left(readl,p-1)
    p+=3 'skip :Tt
endif
'END GCC

q=instr(readl,"=")
'GCC A SUPP
udtidx=val(mid(readl,p,q-p))
'udtidx=type_trans( mid(readl,p,q-p) )

'END GCC

udtidx+=udtcpt:If udtidx>udtcptmax Then udtcptmax=udtidx
If udtcptmax > TYPEMAX-1 Then fb_message("Storing UDT","Max limit reached "+Str(TYPEMAX)):Exit sub
udt(udtidx).nm=tnm
p=q+2
q=p-1
while readl[q]<64
   q+=1
Wend
q+=1
udt(udtidx).lg=val(mid(readl,p,q-p))
p=q
udt(udtidx).lb=cudtnb+1
while readl[p-1]<>Asc(";")
   'dbg_prt("STORING CUDT "+readl)
   If cudtnb = CTYPEMAX Then fb_message("Storing CUDT","Max limit reached "+Str(CTYPEMAX)):Exit Sub
   cudtnb+=1
   q=instr(p,readl,":")
   cudt(cudtnb).nm=Mid(readl,p,q-p) 'variable name
   p=q+1
   q=InStr(p,readl,",")
   cutup_2(Mid(readl,p,q-p),TYUDT) 'variable type
   If cudt(cudtnb).typ=9 orelse cudt(cudtnb).typ=10 orelse cudt(cudtnb).typ=12 Then flagdouble=1' double '31/07/2013
   p=q+1
   q=InStr(p,readl,",")
   cudt(cudtnb).ofs=Val(Mid(readl,p,q-p))  'bits offset / beginning
   p=q+1
   q=InStr(p,readl,";")
   lgbits=Val(Mid(readl,p,q-p))   'lenght in bits
   p=q+1
    If cudt(cudtnb).typ<>4 and cudt(cudtnb).pt=0 And cudt(cudtnb).arr=0 Then 'not zstring, pointer,array !!!
      If lgbits<>udt(cudt(cudtnb).typ).lg*8 then 'bitfield
        cudt(cudtnb).typ=TYPEMAX 'special type for bitfield
        cudt(cudtnb).ofb=cudt(cudtnb).ofs-(cudt(cudtnb).ofs\8) * 8 ' bits mod byte
        cudt(cudtnb).lg=lgbits  'lenght in bits
      End If
    End If
   cudt(cudtnb).ofs=cudt(cudtnb).ofs\8 'offset bytes
Wend
udt(udtidx).ub=cudtnb
If flagdouble Then udt(udtidx).lg=((udt(udtidx).lg-1)\8)*8+8    '31/07/2013
End Sub
AGS
Posts: 1284
Joined: Sep 25, 2007 0:26
Location: the Netherlands

Re: FB debugger : 2.64 (27 july, 2013)

Postby AGS » Aug 01, 2013 2:46

I made it all the way to the end of the program (all 10800+ lines
of it). The number of typos I found is small.

line 6919
'redraw ascensors
ascensors => ancestors?

Disturbing comment
line 7037
'???? dont remember why

Sounds ominous (dont remember why) :)

Line 7711/7717
'lenght in bits
lenght => length

line 7738
'... contents the value
contents => contains

line 8353
'search.... loose
loose => lost

line 8354
loose => lost

line 9091: return begv 'main level happy found !!!
puts a smile on your face (main level happy found :):)).

line 9504
'clear others bits
others => other

line 10292
adress => address

line 10806
choosen => chosen

Then there is your use of the word informations. The word
information is an uncountable noun. Meaning that
information can/should be used when referring to one piece of
information or when referring to multiple pieces of information.

line 5
'uncomment to get more information

line 278
'information about compile

line 2398
'information on running proc

line 6617
'information on compilation

line 6849
fb_message("Compilation information")

line 8486
'updating information about variables

line 8832
'store information for master var

Whether you should use 'information on' or 'information about'
is a bit of a mystery to me. But you should be using information
instead of informations (that much I am sure about).

I have not checked for typos in strings (only typos in comments).
I found some typos in strings as well.

Line 10821
"This button execute the ...."

execute => executes

or perhaps a different phrase. Something like

"Push button to execute the current (underlined or highlighted) line"

or similar?

Just a few more finds.

line 9717
"Activating or desactivating"
desactivating => deactivating

line 8841
"Too much variables" => "Too many variables"

From reading the calls to fb_message I can tell some strings
could do with a nice rewrite. But me no write English all that well.

Je peux lire en anglais mais j'ai des difficultés à m'exprimer en anglais.
SARG
Posts: 1162
Joined: May 27, 2005 7:15
Location: FRANCE

Re: FB debugger : 2.70 BETA (19 august, 2013)

Postby SARG » Aug 19, 2013 12:44

Hi all,

A beta version (2.70) of fbdebugger which allows to debug an exe compiled with the gcc option. From my point of view it's fully working (variables and execution).

http://users.freebasic-portal.de/sarg/F ... %20270.bas

As it's possible to mix pieces (exe, lib, dll) compiled with gas and gcc, a "(A)" or a "(C)" is added near the name of the files (in the tabs) to indicate the compilation option.

Report issues if any , I guess that there must be few ones ;-)

Known problems with the gcc option (due to FBC) :
- dynamic arrays names are changed to dummy names preventing their identification .. Request to dkl
- z/fstrings changed to ubyte. Use the option (in proc/var menu) for displaying them as string.
- the number for the first procs line of are false. Request to dkl.


Also added the possibility to display the asm code corresponding to ONE line. For now use the "line address" option.
Coming soon : extension to a whole proc.
The objdump.exe file MUST be in the same directory that fbdebugger.

There are more changes but they would be specified later.
Dinosaur
Posts: 1358
Joined: Jul 24, 2005 1:13
Location: Hervey Bay
Contact:

Re: FB debugger : 2.70 BETA (19 august, 2013)

Postby Dinosaur » Aug 20, 2013 5:14

Hi All

Firstly SARG , I am really impressed with the debugger, although I rarely have to use it.
But after running the latest version I have one suggestion that may help others as well.

When debugging a multiple module application, it is sometimes nice to know what the last line executed was
in the other modules that are not currently in focus.
So, if I put a breakpoint on line 100 in module 5, I would then like to click on say
module 1 and see from where this routine was called. Ideally the last line would be highlighted.

If this suggestion is way to complex to implement, then just ignore my request.

The only other "problem" with the beta version is that objdump.exe won't run in 64 bit windows
to show the asm line. As far as I can tell, there is no 64 bit version of objdump.
SARG
Posts: 1162
Joined: May 27, 2005 7:15
Location: FRANCE

Re: FB debugger : 2.70 BETA (19 august, 2013)

Postby SARG » Aug 20, 2013 7:58

HI Dinosaur,

Dinosaur wrote:Firstly SARG , I am really impressed with the debugger, although I rarely have to use it.
Thanks.

Dinosaur wrote:When debugging a multiple module application, it is sometimes nice to know what the last line executed was
in the other modules that are not currently in focus.
So, if I put a breakpoint on line 100 in module 5, I would then like to click on say
module 1 and see from where this routine was called. Ideally the last line would be highlighted.
There is already a possibility to find from where a routine (proc=sub or function) has been called. It's an option in the vars/procs context menu : Locate calling line.
To use it click on any var (of the proc) or on the name proc and select that option. The display jumps to the calling line.
If that doesn't answer your need tell me.

Dinosaur wrote:The only other "problem" with the beta version is that objdump.exe won't run in 64 bit windows
to show the asm line. As far as I can tell, there is no 64 bit version of objdump.
No problem to run a 32bit application as objdump on a 64bit windows. My boxes (work/home) are under 64bit windows and everything is working fine. Did you test ? Did you get an error message ?
Dinosaur
Posts: 1358
Joined: Jul 24, 2005 1:13
Location: Hervey Bay
Contact:

Re: FB debugger : 2.70 BETA (19 august, 2013)

Postby Dinosaur » Aug 20, 2013 8:58

Hi All

Sarg, thanks for the response, and yes that worked although not in the manner I meant.
It shows me the calling line, but my suggestion was more aimed at seeing the last line executed
in each of the other modules.During debugging you must know the last line number of each module
before calling a routine in another module. With those lines hi-lighted I could trace the calling routines through all modules.
But that may be asking to much.
Your suggestion works & suffices.

I suspect I may have a objdump file that is only 16 bit.
I did a search on my disks and copied the latest one with a 2008 date.
Have been a member since 2005, ans still havent worked out how to paste a picture on a post.
Was going to post the error message."Unsupported 16 bit application"

Regards

EDIT:Found a 2006 version that worked, so will have to delete the others.
SARG
Posts: 1162
Joined: May 27, 2005 7:15
Location: FRANCE

Re: FB debugger : 2.70 BETA (19 august, 2013)

Postby SARG » Aug 20, 2013 9:53

Dinosaur wrote: my suggestion was more aimed at seeing the last line executed
in each of the other modules.During debugging you must know the last line number of each module
before calling a routine in another module. With those lines hi-lighted I could trace the calling routines through all modules.
In this way i'm afraid that you get a lot of highlighted lines without knowing the calling order.

Dinosaur wrote:But that may be asking to much.
Never enough ;-)

However you give me an interesting idea : a kind of backtrack feature. I imagine a dialog box allowing to move forward and backward inside the chain of the called/calling procs. So you could trace in a friendly way all the calls. It's no more than an extension of the option "locate the calling line".

Dinosaur wrote:I suspect I may have a objdump file that is only 16 bit.Was going to post the error message."Unsupported 16 bit application"
You are right that's the reason. I guess you can easily found a newer version on the net.

Dinosaur wrote:Have been a member since 2005, ans still havent worked out how to paste a picture on a post.

Upload the picture on a files web server, take the link and copy it on the edit box inside the Img tags.
TJF
Posts: 3604
Joined: Dec 06, 2009 22:27
Location: N47°, E15°
Contact:

Re: FB debugger : 2.70 BETA (19 august, 2013)

Postby TJF » Aug 20, 2013 9:56

Hello Dinosaur!

Dinosaur wrote:... still havent worked out how to paste a picture on a post.

It's explaned here.
Dinosaur
Posts: 1358
Joined: Jul 24, 2005 1:13
Location: Hervey Bay
Contact:

Re: FB debugger : 2.70 BETA (19 august, 2013)

Postby Dinosaur » Aug 20, 2013 10:39

Hi All

Thanks guys.
I was aware of the URL feature, but that assumes you have somewhere to post a pic on the net.
I guess today Dropbox is a free service, however most forums I belong to have a "Post Image" button
that gives you the option of resizing your image (on your disk) to 640x480.

Sarg, I disagree that you will have lots of hi-lighted lines. If I have 10 Modules, then there can be only
10 lines hi-lighted. But I agree that that will also be confusing as the last line executed in Module 5
may have nothing to do with how we got to a routine in Module 3.

So, your idea of "backtracking" is better, if it is routine based,then you only need to backtrack to the line that called the routine.

Also the only time you need to "backtrack"
is on request , and then only when the program is paused.

PS: The asm works now.

Regards
SARG
Posts: 1162
Joined: May 27, 2005 7:15
Location: FRANCE

Re: FB debugger : 2.70 BETA 2 (august 23, 2013)

Postby SARG » Aug 22, 2013 23:11

Hi All,

Version 2.70 beta 2

- The asm code of a whole proc could now be displayed but without the lines of basic. See proc tab context menu.
To come. lines of basic inserted inside the asm code and this feature also added in the proc-var tab context menu..

Specially for Dinosaur :
- Backtracking for procs is implemented. It allows to follow the calls chain in both direction. The calling lines are successively highlighted.
See the option "Proc call backtracking" in the context menus (thread tab and proc-var tab). In proc/var tab select the proc name or any of its variables.

And I have found 2 big bugs in fbdebugger :
- For/next loops executed without debugging
- Depending the version of GCC, the values of the local variables of the main proc are false (issue with their adress)

http://users.freebasic-portal.de/sarg/FBdebugger%20270%20beta%202.bas
Dinosaur
Posts: 1358
Joined: Jul 24, 2005 1:13
Location: Hervey Bay
Contact:

Re: FB debugger : 2.70 BETA 2 (august 23, 2013)

Postby Dinosaur » Aug 23, 2013 5:51

Hi All

SARG, that is fantastic.
It works perfectly, Thank you.

Will let you know when I get the chance to really use it (when the pressure is on)
and report if there are any bugs.

Once again many thanks.

Return to “Projects”

Who is online

Users browsing this forum: No registered users and 9 guests