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

User projects written in or related to FreeBASIC.
VANYA
Posts: 1374
Joined: Oct 24, 2010 15:16
Location: Ярославль
Contact:

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

Postby VANYA » Apr 17, 2019 14:22

I hope you someday make a debugger for Linux. I'll be waiting. Good luck!
micheck
Posts: 1
Joined: May 07, 2019 16:44
Location: Washington State

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

Postby micheck » Jun 23, 2019 10:28

Please the probably stupid questions but ... FIRST thank all of you for the the Free Basic language and the Free Basic Debugger !!!

Now, my problem - I wrote a small program with many loops that runs (up to some point I don't see and then blows out - I need the debugger to trace out my mistake. So I installed the debugger in its own folder - recompiled my program using ' -g ' and the size of the .EXE grew from 30 k to about 100 k - and the debugger started; I choose my .EXE ; and BINGO - error message - must recompile with ' -g '' Thoughts??

Charles Michener
SARG
Posts: 1143
Joined: May 27, 2005 7:15
Location: FRANCE

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

Postby SARG » Jun 25, 2019 10:37

Hi Charles,
micheck wrote:Please the probably stupid questions but ... FIRST thank all of you for the the Free Basic language and the Free Basic Debugger !!!
There is no stupid question ...
You are welcome.

micheck wrote:Now, my problem - I wrote a small program with many loops that runs (up to some point I don't see and then blows out - I need the debugger to trace out my mistake. So I installed the debugger in its own folder - recompiled my program using ' -g ' and the size of the .EXE grew from 30 k to about 100 k - and the debugger started; I choose my .EXE ; and BINGO - error message - must recompile with ' -g '' Thoughts??

Sorry but I have some questions before really be able to help you :
- What version (Freebasic and FBdebugger) do you use ?
- Do you compile with -gen gas or with gcc 32/64 ?
- What is the exact message ?
Maybe this one : "NO information for Debugging","Compile again with option -g"+Chr(10)+"And in case of GCC 4 add also '-Wc -gstabs+' or '-Wc -gdwarf-2'"
- Try with a very small program (something like print "this is my test")
- Post your code
wallyg
Posts: 124
Joined: May 08, 2009 7:08
Location: Tucson Arizona

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

Postby wallyg » Jan 31, 2020 23:48

I am getting the same error.

"NO information for Debugging","Compile again with option -g"+Chr(10)+"And in case of GCC 4 add also '-Wc -gstabs+' or '-Wc -gdwarf-2'"

Here is the log file from WinFbe


Primary Source: C:\Users\wfgaz\Dropbox\HTMLprocessor\Designer.bas
Target Compilation: C:\Users\wfgaz\Dropbox\HTMLprocessor\Designer.exe (2,783 KB, 2849752 bytes)
Compile Time: 5.4 seconds (2020-01-31 11:24:31)

Command Line:
C:\WinFBE_Suite\FreeBASIC-1.07.1-gcc-5.2\fbc32.exe -m "C:\Users\wfgaz\Dropbox\HTMLprocessor\Designer.bas" -v -g -s gui -gen gas -g -s gui -gen gas -x "C:\Users\wfgaz\Dropbox\HTMLprocessor\Designer.exe"

FreeBASIC Compiler - Version 1.07.1 (2019-09-27), built for win32 (32bit)
Copyright (C) 2004-2019 The FreeBASIC development team.
standalone
target: win32, 486, 32bit
compiling: C:\Users\wfgaz\Dropbox\HTMLprocessor\Designer.bas -o C:\Users\wfgaz\Dropbox\HTMLprocessor\Designer.asm (main module)
assembling: C:\WinFBE_Suite\FreeBASIC-1.07.1-gcc-5.2\bin\win32\as.exe --32 "C:\Users\wfgaz\Dropbox\HTMLprocessor\Designer.asm" -o "C:\Users\wfgaz\Dropbox\HTMLprocessor\Designer.o"
linking: C:\WinFBE_Suite\FreeBASIC-1.07.1-gcc-5.2\bin\win32\ld.exe -m i386pe -o "C:\Users\wfgaz\Dropbox\HTMLprocessor\Designer.exe" -subsystem windows "C:\WinFBE_Suite\FreeBASIC-1.07.1-gcc-5.2\lib\win32\fbextra.x" --stack 1048576,1048576 -L "C:\msys64\mingw32\def" -L "C:\msys64\mingw32\lib" -L "C:\WinFBE_Suite\FreeBASIC-1.07.1-gcc-5.2\lib\win32" -L "." "C:\WinFBE_Suite\FreeBASIC-1.07.1-gcc-5.2\lib\win32\crt2.o" "C:\WinFBE_Suite\FreeBASIC-1.07.1-gcc-5.2\lib\win32\crtbegin.o" "C:\WinFBE_Suite\FreeBASIC-1.07.1-gcc-5.2\lib\win32\fbrt0.o" "C:\Users\wfgaz\Dropbox\HTMLprocessor\Designer.o" "-(" -lfbgfx -lgdi32 -lwinmm -luser32 -lmsvcrt -lgtk-3 -lgdk-3 -lglib-2.0 -lgthread-2.0 -lgio-2.0 -lgobject-2.0 -lgmodule-2.0 -lpango-1.0 -lcairo -lgdk_pixbuf-2.0 -lpangocairo-1.0 -latk-1.0 -lfb -lgcc -lkernel32 -lmingw32 -lmingwex -lmoldname -lgcc_eh "-)" "C:\WinFBE_Suite\FreeBASIC-1.07.1-gcc-5.2\lib\win32\crtend.o"

The same error occurs if I do not specify -gen gas but specify the -Wc -gstabs+ suggestion or the -Wc -gwarf-2 options as specified

I am running an up to date version Windows 10.

I try smaller programs and the debugger works just great. This executable is 2,783 KB

This is a large program almost 20000 lines altogether, with 2000+ global variables. This program was generated by another program with a few tweaks. This is basically the runtime data structure statements for a much larger program coming (estimated in the 50,000+ range)

I am wondering if I am crossing some limits somewhere either in the compiler or the debugger. I had to fix the program once before because I got an error on a string literal being too long (1200+ characters). That has been fixed.

Thanks for any insight. I was getting a bad pointer reference which caused the program to terminate without closing up the system, without closing any log files I was using to trace down the error, after executing for a while. Needless to say, this makes tracing the program very difficult without the debugger which has always worked on smaller programs in the past.

By the way. Thanks for such a great debugger.

Wally
wallyg
Posts: 124
Joined: May 08, 2009 7:08
Location: Tucson Arizona

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

Postby wallyg » Feb 01, 2020 10:09

Update on the above problem.

I have found my pointer problem. The program now works as expected.

So I assume that means I have not crossed any limit problem with the compiler.

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

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

Postby SARG » Feb 01, 2020 12:20

wallyg wrote:Update on the above problem.
I have found my pointer problem. The program now works as expected.
So I assume that means I have not crossed any limit problem with the compiler.Wally
Fine :-)
wallyg wrote:By the way. Thanks for such a great debugger.
You are welcome.

wallyg wrote:"NO information for Debugging","Compile again with option -g"+Chr(10)+"And in case of GCC 4 add also '-Wc -gstabs+' or '-Wc -gdwarf-2'"

This problem happens very early when fbdebugger tries to get addresses where data for debugging are located. If not found it sends this error message. So no limits are yet crossed.

Anyway I'm interested to understand when is happening so if you can provide bas files or at least the 'faulty' (related with fbdebugger) exe --> debug at aliceadls.fr
Thanks in advance.

By the way I'll have to change fbdebugger to take in account the new datatype : va_list.
wallyg
Posts: 124
Joined: May 08, 2009 7:08
Location: Tucson Arizona

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

Postby wallyg » Feb 01, 2020 18:13

I tried to send you the source code files but I got this response.

Sorry, we were unable to deliver your message to the following address.

<debug@aliceads.fr>:
554: 5.7.1 <debug@aliceads.fr>: Relay access denied

--- Below this line is a copy of the message.

DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1580580430; bh=PO9m0UtzWNdlzKc0EqwETbueYPDOdXdhWhX7J9Y+XXY=; h=Date:From:To:Subject:References:From:Subject; b=W7pNBLyNShpGpcPQYNkKRV2lHFpJ2PK3DZHSM4xEfDAxd3g/y7Lmv7c0FYW4k1r9V48+4kWR/cylcVVW2tstUvqtri7OdpGmWocckCCGrccrONAoE9SsTAmb0Dcf/7H2sD/OF7RrCr8gTb/vCsxuD7QTSXpBH/xEMJK/ztQlAxqzAumbN1jRw0qMMZG6EjCpgcNdrcHPnXDujBfYrRYdr2buRQaUmHDMcmUMg6etVrUhqJuyXshSRWK2DYjSQC3WNSQ8Hnz2KwLjpxLQgBwfuZ2cYpy4LR6WFgSWQctD2NsHR0jzcQNbn4f57VTUv/pvXk8cgASEB09pkjAH2ob9nQ==
X-YMail-OSG: OzisC1IVM1nhxGMH34tSOA7pSXidknjFILBvTBAmTPnikLl2zLvZEC_rdoDMT4C
V.lxnn.zIluryYokbZY2ORa_5aUseOqey.1z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UTpi2YRHxYXloQR3RRtKeSPt27LATyfk
DRqzrjLSKVhvveeaAyojWfvAZTsrkQOqLIY1omlrClKVaFzONC4h00wqmmZ0ccwkD525q.AZcadq
sgBrmhCcBv4YjokWJLdgHmdgWk866SA27WamVqCnkOWC.3a0lTHd4W3f6ZiWuRs0RXm5ILkxQgl5
GvP2RKEkJFe_VrXzF6XYrpoSV
Received: from sonic.gate.mail.ne1.yahoo.com by sonic315.consmr.mail.bf2.yahoo.com with HTTP; Sat, 1 Feb 2020 18:07:10 +0000
Date: Sat, 1 Feb 2020 18:07:04 +0000 (UTC)
From: Wally Gazdzik <tiresrme2001@yahoo.com>
To: "debug@aliceads.fr" <debug@aliceads.fr>
Message-ID: <568475755.232102.1580580425402@mail.yahoo.com>
Subject: Faulty debug information for exe file
MIME-Version: 1.0
Content-Type: multipart/mixed;
boundary="----=_Part_232101_734817519.1580580425402"
References: <568475755.232102.1580580425402.ref@mail.yahoo.com>
X-Mailer: WebService/1.1.15149 YMailNorrin Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.130 Safari/537.36
Content-Length: 2208599

------=_Part_232101_734817519.1580580425402
Content-Type: multipart/alternative;
boundary="----=_Part_232096_1529501344.1580580424730"

------=_Part_232096_1529501344.1580580424730
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit

I think I have included all the files I used to create the exe file.
Wally & Julie Gazdzik (retired and loving it)
SARG
Posts: 1143
Joined: May 27, 2005 7:15
Location: FRANCE

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

Postby SARG » Feb 01, 2020 18:26

L is missing at the end before the dot.
Debug at aliceadsl.fr

Maybe try to send separtly the exe from the other files.
Not sure that my provider let me receive exe.....
SARG
Posts: 1143
Joined: May 27, 2005 7:15
Location: FRANCE

Re: FB debugger : 2.95 32/64 BIT ..... (2020/02/05)

Postby SARG » Feb 05, 2020 18:16

Hi all,

A new version : http://users.freebasic-portal.de/sarg/FBdebugger295.zip

Not a lot of changes :
- To avoid the issue faced by Wally, hardly understandable, a control has been added displaying a message when 64bit version of Fbdebugger is used to debug 32bit exes and vice versa.

- The new datatype 'va_list' taken in account.
SARG
Posts: 1143
Joined: May 27, 2005 7:15
Location: FRANCE

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

Postby SARG » Feb 17, 2020 15:04

Hi all,

Still a new version : http://users.freebasic-portal.de/sarg/FBdebugger296.zip

No more blinking windows when loading debugging data at start of debuggee
That's not really a problem but a bit disturbing... (reported by Wally)

Data from objdump is now retrieved using internal functions (no pipe/line input) to allow the parameter CREATE_NO_WINDOW for createprocess.
See objdump_start/_read/_close.
StillLearning
Posts: 33
Joined: Aug 27, 2019 22:22

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

Postby StillLearning » Apr 07, 2020 0:14

Love your debugger.

I have tried to debug a freebasic program that I created. When I try to use your debugger I get the following at the beginning:

Title of window: Loading stabs

Error message:

ERROR When reading memory: 299 Exit loading.

Any ideas?
StillLearning
Posts: 33
Joined: Aug 27, 2019 22:22

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

Postby StillLearning » Apr 07, 2020 3:05

I love your debugger.

While using it I encountered the following problem.

I recompiled a program that I have been working on and after recompiling it using the -g option I get the following error message when I attempt to load it and start the single-step of the debugger.

This is the error I get:

The window heading says:
Loading stabs

The error message is:
ERROR when reading memory :299
Exit loading

Then it show a OK button.

After i click the OK button it shows that I am on Current line [877].

But I can not do anything more.


Any suggestions?
SARG
Posts: 1143
Joined: May 27, 2005 7:15
Location: FRANCE

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

Postby SARG » Apr 07, 2020 13:11

Hi StillLearning,
Me too :-)

StillLearning wrote:I love your debugger.
Thank you.

StillLearning wrote:This is the error I get:
The window heading says:
Loading stabs

The error message is:
ERROR when reading memory :299
Exit loading
299 is an error from Windows. There is a problem when reading memory, only a part can be gotten. Debugging obviously can't work.
Hard to say more.

StillLearning wrote:Any suggestions?

What version of fbc do you use ?
What option : gas 32bit or gcc 32bit-64bit ?
Did you try with a very simple code ?

If possible send me the code (debug @ aliceadsl . fr no space).
I'm a bit busy with gas64 however I'll have a look.
ITomi
Posts: 130
Joined: Jul 31, 2015 11:23
Location: Hungary

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

Postby ITomi » Apr 18, 2020 16:36

Hello SARG (and other programmers)!

I develop an RTS game with FB (using: FreeBASIC-0_23_0-win32\FBIde0_4_6r4) under Windows 10 (64 bit). But when I running the game, it sometimes crashes and would like send an error message to Microsoft. Although often everything is OK with the game.
I try to use FBdebugger to see the error in my code, but I didn't find it yet. How can I run my game together with debugger, if it possible? I have download the latest version (2.95), launch my program with "Step automatically" option, but when it runs across my code, I can't use the game, because it doesn't react with my interactions. Maybe I do something wrong?
SARG
Posts: 1143
Joined: May 27, 2005 7:15
Location: FRANCE

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

Postby SARG » Apr 18, 2020 23:26

Hi ITomi,

I hope you don't use fbc 0.23 anymore :-)
Debugging interactiv program is not easy.

Use the option -exx for trapping out of bounds, null pointers.
Don't forget to start the program by command line to see the eventual error.

You could also use the JIT 'just in time' debugger.
Compile with -g option. Then set the JIT debugger (an option in the tools menu). Now if your program crashes fbdebugger should start and shows the faulty line.
Not sure it'll work because I coded that under Windows 7. Anyway try it.

Return to “Projects”

Who is online

Users browsing this forum: No registered users and 3 guests