FB debugger : 2.93 32/64 BIT ..... (Sept 5th, 2018)

User projects written in or related to FreeBASIC.
Luis Babboni
Posts: 301
Joined: Mar 15, 2015 12:41

Re: FB debugger : 2.90 32/64 BIT ..... (oct 3th, 2015)

Postby Luis Babboni » Feb 29, 2016 15:15

I rewrite the program (copy and paste of course) but as new project and now I do not have the Debugger already running window!! :-)
Just thats about not killed closed process and killed process not closed.
Using version V 2.91.B1
Luis Babboni
Posts: 301
Joined: Mar 15, 2015 12:41

Re: FB debugger : 2.90 32/64 BIT ..... (oct 3th, 2015)

Postby Luis Babboni » Feb 29, 2016 21:09

I tried version 2.90 and do not kept unkilled process closed but kill process not closed and do not reopen it when the program falls in it again.
And, of course, do not show arrays.
SARG
Posts: 909
Joined: May 27, 2005 7:15
Location: FRANCE

Re: FB debugger : 2.90 32/64 BIT ..... (oct 3th, 2015)

Postby SARG » Feb 29, 2016 21:24

Hi Luis,

Luis Babboni wrote:Recently I need to go far in number of cycles, 187000, and as is logical, the Debugger crash I guess cause the big number of not closed process that in fact are closed.
There are controls to avoid exceeding limits but maybe not in that case ;-)

Luis Babboni wrote:I rewrite the program (copy and paste of course) but as new project and now I do not have the Debugger already running window!! :-)
Good news.

Luis Babboni wrote:Just thats about not killed closed process and killed process not closed. Using version V 2.91.B1
With the provided exe I could reproduce the problem : using "autostep" I saw that several muevepeon procs were stacked.
Now to fix it I need the code to see how the calls between procs are done. Send me all the bas file by PM.

Did you test with the 32bit/gas (not gcc) version ? If not please do it. As the debug data is not the same maybe there will be no issue.

edit : just seeing your last post.
Not sure to understand the sentence ;-) : "do not kept unkilled process closed but kill process not closed and do not reopen it when the program falls in it again"
Luis Babboni
Posts: 301
Joined: Mar 15, 2015 12:41

Re: FB debugger : 2.90 32/64 BIT ..... (oct 3th, 2015)

Postby Luis Babboni » Mar 01, 2016 1:38

SARG wrote:...
Did you test with the 32bit/gas (not gcc) version ? If not please do it. As the debug data is not the same maybe there will be no issue.

No, actually not sure what is it, but I´ll try soon.

Sorry, I do not know what is it.
32bits version of Debugger?
What is gcc?

Mmm, it seems you are talking about the FreeBasic 32 version.

!!!! I compile the .bas´s using 32 bits version of Freebasic and debug with 32 bits version of Debugger and seems all works nice!!! :-)
It will be enough for me for the moment, I will need the 64 bits version but not yet.

I tried first a version of Debugger that not open arrays and works it seems perfectly, then I tried the last version, thats that allow to open multiple arrays, its works right too but first shows me a windows saying (my translation) "The program can not run cause there is no libintl-8.dll" but as I say, if I ignored it and continue, seems to works right.
St_W
Posts: 1477
Joined: Feb 11, 2009 14:24
Location: Austria
Contact:

Re: FB debugger : 2.90 32/64 BIT ..... (oct 3th, 2015)

Postby St_W » Mar 01, 2016 11:55

Some basic information for you about the FreeBasic Compiler:

There are some fundamental differences between 32-bit and 64-bit FreeBasic; how they work internally:

Code: Select all

32-Bit FB (default or -gen gas):  Source-code --> fbc --> gas --> ld --> EXE
32-bit FB (with -gen gcc):        Source-code --> fbc --> gcc --> gas --> ld --> EXE
64-bit FB:                        Source-code --> fbc --> gcc --> gas --> ld --> EXE


fbc ... FreeBasic Compiler
gas ... GNU Assembler
gcc ... GNU C Compiler
ld ... GNU Linker
MJK
Posts: 179
Joined: Nov 08, 2005 17:14
Location: Dublin, Ireland
Contact:

Re: FB debugger : 2.90 32/64 BIT ..... (oct 3th, 2015)

Postby MJK » Mar 02, 2016 20:26

SARG wrote:@Mike,
Just execute these commands and post the results. You could also post the other "silly" messages but be precise about the commands used. Maybe send all that by PM. The email address is in the about box.

Code: Select all

objdump.exe -G <your.exe>  >stabs.txt
objdump.exe --dwarf=info <your.exe>  >dwarf.txt

First, my apologies for the delay - I got no notification that you had posted replies.

I've already sent the OBJDUMP outputs to your email address.

Re the "silly" messages:
- FB app compiled with the 32-bit compiler, and testing/running under Win7-64bit.
- So far, it seems best to use FBD 32-bit, and OBJDUMP 64-bit!

I experimented a little with FBD 64-bit... App named TEST.BAS, compiled with FBC-32bit, with "-g", to TEST.EXE. I load FBD 64-bit, and then hit the Open button, and select the TEST.BAS. I hit OK on the Launch dialog. Then I get two messages:

Compile again with option -g
And in case of GCC 4 add also '-Wc -gstabs+' or '-Wc -gdwarf-2'

and

Unknown Exception code (D/H)= 1073741855 / 4000001F
Possible error on this line but not SURE

File :
Proc :
Line : 0 (selected and put in red)

Try To continue ? (if yes change values and/or use [M]odify execution)

(I have screenshots of the above, but I don't see a mechanism here to attach them to this message. And the 32-bit FBD works fine).

Thank you,
- Mike
SARG
Posts: 909
Joined: May 27, 2005 7:15
Location: FRANCE

Re: FB debugger : 2.90 32/64 BIT ..... (oct 3th, 2015)

Postby SARG » Mar 02, 2016 22:16

Hi MJK,

MJK wrote:First, my apologies for the delay - I got no notification that you had posted replies.
No problem. NB Only one notification is sent (even if several posts) after your last visit connected under your account (not as a guest).

MJK wrote:Re the "silly" messages:
- FB app compiled with the 32-bit compiler, and testing/running under Win7-64bit.
- So far, it seems best to use FBD 32-bit, and OBJDUMP 64-bit!

I experimented a little with FBD 64-bit... App named TEST.BAS, compiled with FBC-32bit, with "-g", to TEST.EXE. I load FBD 64-bit, and then hit the Open button, and select the TEST.BAS. I hit OK on the Launch dialog. Then I get two messages:
Compile again with option -g
And in case of GCC 4 add also '-Wc -gstabs+' or '-Wc -gdwarf-2'

and
Unknown Exception code (D/H)= 1073741855 / 4000001F
Possible error on this line but not SURE

File :
Proc :
Line : 0 (selected and put in red)

Try To continue ? (if yes change values and/or use [M]odify execution)

(I have screenshots of the above, but I don't see a mechanism here to attach them to this message. And the 32-bit FBD works fine).
MJK wrote:I've already sent the OBJDUMP outputs to your email address.


Extracted from your email then comments added.
Windows FBC FBD OBJDUMP
64-bit 64-bit 64-bit 64-bit ------> OK
64-bit 32-bit 32-bit 32-bit or 64-bit ------> OK
32-bit 64-bit 64-bit 32-bit ------> Not possible to execute FBC and FDB 64-bit on a 32-bit Windows (neither 64-bit objdump)
32-bit 32-bit 32-bit 32-bit ------> OK

So I need to provide 32-bit objdump for users using 32-bit Windows.
Objdump 64-bit is able to decode 32 and 64-bit executables. Maybe I could add an advice under 64-bit Windows preferably use the 64-bit objdump.
And FDB 64-bit is not usable for 32-bit debuggees this is why you got the messages.

What I can understand reading the outputs :
- There are dwarf debug data put by the compiler so objdump is automatically called by the debugger.
I have tested from my side a simple program and got exactly the same file. So the compiler (or at least a part) has been compiled with a debug option set.
- About stabs32 and dwarf32 files I guess that you did an error as they can not be empty.

SARG
MJK
Posts: 179
Joined: Nov 08, 2005 17:14
Location: Dublin, Ireland
Contact:

Re: FB debugger : 2.90 32/64 BIT ..... (oct 3th, 2015)

Postby MJK » Mar 03, 2016 0:08

Extracted from your email then comments added.
Windows FBC FBD OBJDUMP
64-bit 64-bit 64-bit 64-bit ------> OK
64-bit 32-bit 32-bit 32-bit or 64-bit ------> OK

My tests indicate that the 32-bit OBJDUMP in this case is useless! It produces NO OUTPUT whatsoever, and I've tried many of the command-line options. (I just open a command-line box, and execute the command). The 64-bit build always works just fine.

32-bit 64-bit 64-bit 32-bit ------> Not possible to execute FBC and FDB 64-bit on a 32-bit Windows (neither 64-bit objdump)
32-bit 32-bit 32-bit 32-bit ------> OK

So I need to provide 32-bit objdump for users using 32-bit Windows.

My guess is that very few users use 32-bit Windows - but it's... a guess ;-)

Objdump 64-bit is able to decode 32 and 64-bit executables. Maybe I could add an advice under 64-bit Windows preferably use the 64-bit objdump.

Sounds good!

And FDB 64-bit is not usable for 32-bit debuggees this is why you got the messages.

I understand - thank you.

What I can understand reading the outputs :
- There are dwarf debug data put by the compiler so objdump is automatically called by the debugger.
I have tested from my side a simple program and got exactly the same file. So the compiler (or at least a part) has been compiled with a debug option set.

OK... But waaaaaaaayyyyyyy outside my area ;-)

- About stabs32 and dwarf32 files I guess that you did an error as they can not be empty.

I always get empty files! - see above.

Thank you,
- Mike
SARG
Posts: 909
Joined: May 27, 2005 7:15
Location: FRANCE

Re: FB debugger : 2.90 32/64 BIT ..... (oct 3th, 2015)

Postby SARG » Mar 03, 2016 9:37

MJK wrote:My guess is that very few users use 32-bit Windows - but it's... a guess ;-)
I have a tablet with 2Go RAM so W10 is 32-bit.... my main computer is under 64-Bit W7. And now I use also a 32-bit Linux.

MJK wrote:
SARG wrote:- There are dwarf debug data put by the compiler so objdump is automatically called by the debugger.
I have tested from my side a simple program and got exactly the same file. So the compiler (or at least a part) has been compiled with a debug option set.

OK... But waaaaaaaayyyyyyy outside my area ;-)
No need to enter in the details : it was for me to understand why objdump is called. In fact it depends of the compiling tools that dkl provided with fbc.

- About stabs32 and dwarf32 files I guess that you did an error as they can not be empty.
I always get empty files! - see above.
Send me the exe which you used for testing with objdump and I'll try on my side.

SARG.
MJK
Posts: 179
Joined: Nov 08, 2005 17:14
Location: Dublin, Ireland
Contact:

Re: FB debugger : 2.90 32/64 BIT ..... (oct 3th, 2015)

Postby MJK » Mar 03, 2016 11:21

Hello, Sarg,

No need to enter in the details : it was for me to understand why objdump is called. In fact it depends of the compiling tools that dkl provided with fbc.

OK.

Send me the exe which you used for testing with objdump and I'll try on my side.

I've just sent the EXE, etc. Just for lurkers, I think the EXE file that's passed to 32-bit OBJDUMP (under Win7-64bit) does not matter. Even when I run OBJDUMP and request the Help-screen, or if I use invalid command-line parms, I always get no output!

Best regards,
- Mike.
sancho2
Posts: 547
Joined: May 17, 2015 6:41

Re: FB debugger : 2.90 32/64 BIT ..... (oct 3th, 2015)

Postby sancho2 » May 23, 2016 23:21

Hello Sarg:
I have a udt array variable named 'gb()'. I would like to watch the variable while stepping through the code. I want to see what the value is for:

Code: Select all

gb(col, row).value

'gb()' and 'col' and 'row' are variables local to the procedure I am stepping through.
I can't figure out how to do that. Is there a way?
SARG
Posts: 909
Joined: May 27, 2005 7:15
Location: FRANCE

Re: FB debugger : 2.90 32/64 BIT ..... (oct 3th, 2015)

Postby SARG » May 24, 2016 13:51

Hi sancho2,

If you want to see automatically the new .value each time col or row are changed there is no way.

Otherwise Select the "gb" variable then use the option "Select index" to choice the desired values for each index (here col / row) and click on "Apply" button.
Now using the "shw/exp" option or directly opening gb variable you'll see all the values of the fields.
When row or col change repeat the first command.
sancho2
Posts: 547
Joined: May 17, 2015 6:41

Re: FB debugger : 2.90 32/64 BIT ..... (oct 3th, 2015)

Postby sancho2 » May 25, 2016 2:10

Thanks Sarg. I understand now.
SevenLegion
Posts: 14
Joined: Dec 30, 2011 13:26

Re: FB debugger : 2.90 32/64 BIT ..... (oct 3th, 2015)

Postby SevenLegion » Jun 08, 2016 13:54

Hello, I'm triyng to install a debugger inside my fbeditor but I have no experience...
I give "option/debug-quick run" and set the path for "fbdebugger.exe" ... ok
Then I add a -g option in the "compile" settings

When I compile, it gives this error message:

C:\Users\Al... \FbEdit\..\fbc -s -g "MyProgram.bas"
C:\Users\Al...FreeBASIC\bin\win32\ld.exe: invalid subsystem type -g

and all debug voices are disabled. Break points, also, are simply ignored.
Where is the problem?
SARG
Posts: 909
Joined: May 27, 2005 7:15
Location: FRANCE

Re: FB debugger : 2.90 32/64 BIT ..... (oct 3th, 2015)

Postby SARG » Jun 08, 2016 15:24

Currently I'm at hospital but happily there is a tactil multimedia PC in my room (tv/phone/Internet access).
a bit boring for long text.........

after -s there must be "console" or "gui" depending your choice see fbc manual.

I'll help you more if necessary

by the way @sancho I'm thinking a way to add the feature you have asked.

Return to “Projects”

Who is online

Users browsing this forum: No registered users and 1 guest