English Amiga Board


Go Back   English Amiga Board > News

 
 
Thread Tools
Old 15 March 2015, 21:43   #21
matthey
Banned
 
Join Date: Jan 2010
Location: Kansas
Posts: 1,284
Quote:
Originally Posted by tolkien View Post
I have contacted Frank and this is what Frank told me:

The -g option of vbcc only provides HUNK_SYMBOL (global symbols) and HUNK_DEBUG with LINE-debug entries. Other debug hunks are not documented and SAS/C specific.
That's about what I figured. There is no bug but lack of support for undocumented hunk types. The following link has some info on an unknown SAS/C hunk type but I don't think it is related (there are probably several).

http://amiga-dev.wikidot.com/file-format:hunk

Quote:
Originally Posted by tolkien View Post
No information about local variables, types or structures are provided by
vbcc. He can make it work with cpr only if there is info about sas/c hunk format so it will be difficult to have support.
It should be possible to watch the memory location of global variables (local variables are tricky because they are only in registers or on the stack). The global variable name should be in the symbol hunk but commonly has an '_' prefix so "variable" would become "_variable". In BDebug, I open a memory window and change the address where I can enter "_variable" (make sure the mem window is not linked to a register). I have an ARexx script using F10 which will open a mem window at the current CPU EA which is the variable if it is currently being read or written (global variables will show in the disassembly window if absolute addressing is used). I also have an ARexx script (F1 key) which takes me to "_main", the start of main() with vbcc, GCC and SAS/C compiled programs. BDebug is less buggy and, IMO, more powerful overall even if it is not configured as well for source debugging and requires some reading of the manual. I can give you my ARexx scripts and my config if you want.
matthey is offline  
AdSense AdSense  
Old 15 March 2015, 21:55   #22
tolkien
AmigaMan

tolkien's Avatar
 
Join Date: Oct 2012
Location: Castro Urdiales/Spain
Posts: 453
I like BDebug but the problem is that I code mainly under WinUAE and a bit in my 1260 and I can´t make work BDebug (crash #80000003). Tied different configurations without jit and nothing.
I´ll try harder this week so please pass me those scripts if I can make It work.

It´s a bit frustrating don´t have basic tools for our miggies. People say that printf() is the only necessary tool to debug but I don´t want to do It in 2015.
Perhaps I have no option and is the price to use these old machines
tolkien is offline  
Old 17 March 2015, 00:37   #23
NovaCoder
Registered User
NovaCoder's Avatar
 
Join Date: Sep 2007
Location: Melbourne/Australia
Posts: 3,444
Quote:
Originally Posted by tolkien View Post
It´s a bit frustrating don´t have basic tools for our miggies. People say that printf() is the only necessary tool to debug but I don´t want to do It in 2015.
Perhaps I have no option and is the price to use these old machines
That's all I can do and it's extremely frustrating and inefficient

It took me a month to track down a memory allocation bug in ScummVM once using printf statements (large C++ program compiled using gcc).

You get spoiled by these modern tools which have a nice integrated debugger, much more productive.
NovaCoder is offline  
Old 17 March 2015, 21:07   #24
matthey
Banned
 
Join Date: Jan 2010
Location: Kansas
Posts: 1,284
Quote:
Originally Posted by tolkien View Post
I like BDebug but the problem is that I code mainly under WinUAE and a bit in my 1260 and I can´t make work BDebug (crash #80000003). Tied different configurations without jit and nothing.
Maybe you need to pester Toni Wilen more. Better 68k emulation in UAE is more important than some of the things he has added lately. Debuggers do need accurate 68k emulation to work. BDebug behaves nicely on my 68060 which is one of the most difficult 68k processors to support though.

Quote:
Originally Posted by tolkien View Post
I´ll try harder this week so please pass me those scripts if I can make It work.
Just PM me if you need them. They are really simple but super useful.

Quote:
Originally Posted by NovaCoder View Post
That's all I can do and it's extremely frustrating and inefficient

It took me a month to track down a memory allocation bug in ScummVM once using printf statements (large C++ program compiled using gcc).

You get spoiled by these modern tools which have a nice integrated debugger, much more productive.
There isn't much hope for C++ 68k source debugging in the short term (I believe Bernd had a version of GDB working for the 68k but it's not very friendly to begin with). BDebug will load the symbols for GCC C++ compiled programs which helps a lot but you don't get any source level debugging. BDebug is supposed to partially support STABS which GCC can output with a switch but I can't recall ever getting it to work.

Last edited by matthey; 17 March 2015 at 21:16.
matthey is offline  
Old 17 March 2015, 21:11   #25
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 42
Posts: 19,934
Only possible reply is: "Not enough information".
Toni Wilen is offline  
Old 17 March 2015, 21:35   #26
matthey
Banned
 
Join Date: Jan 2010
Location: Kansas
Posts: 1,284
Quote:
Originally Posted by Toni Wilen View Post
Only possible reply is: "Not enough information".
That was a quick reply considering no one has even formulated a question yet. Have you ever tried to use BDebug from the Barfly package?

http://aminet.net/dev/asm/BarflyDisk2_00.lha

If you or anyone else has been able to get it to work, what setup did you use? I couldn't find anything but this thread by searching. Perhaps another option would be to add source level debugging to the UAE debugger. The Amiga and 68k need all the development help they can get.
matthey is offline  
Old 17 March 2015, 21:49   #27
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 42
Posts: 19,934
Quote:
Originally Posted by matthey View Post
That was a quick reply considering no one has even formulated a question yet. Have you ever tried to use BDebug from the Barfly package?
It was not reply to a question, it was generic reply to so called "something does not work" "report". ("I can´t make work BDebug (crash #80000003)")

I do absolutely nothing without exact test steps, including config, logs, software used. Nothing extra, no patches, no hacks.
Toni Wilen is offline  
Old 17 March 2015, 22:31   #28
tolkien
AmigaMan

tolkien's Avatar
 
Join Date: Oct 2012
Location: Castro Urdiales/Spain
Posts: 453
Toni I'll try to do a complete log when I know how to do it with winuae. (I know your have written it several times in various threads). My phrase didn't pretende to be a debug log only a fact.
tolkien is offline  
Old 17 March 2015, 23:45   #29
tolkien
AmigaMan

tolkien's Avatar
 
Join Date: Oct 2012
Location: Castro Urdiales/Spain
Posts: 453
This is the config I use to do my stuff. Is the config CLOANTO use for A4xxx.
Is an A4000 with 060. I use 060 cos my A1200 has a 060 so I can try things in both machines.
I start BDebug, open a file to debug and crash.

Tell me If you need some other log with other config.

EDIT: Under AMIKIT (68020) Bdebug works ok.

Last edited by tolkien; 20 June 2015 at 12:19.
tolkien is offline  
Old 18 March 2015, 19:30   #30
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 42
Posts: 19,934
There is nothing wrong with emulation. 68060 CPU without proper 68060 library: lots of things won't work.
Toni Wilen is offline  
Old 18 March 2015, 19:33   #31
tolkien
AmigaMan

tolkien's Avatar
 
Join Date: Oct 2012
Location: Castro Urdiales/Spain
Posts: 453
thats a start althought I use to use the same libs in my real Amiga and in WinUAE. I'll check that in a hour. Thanks for the tip.
tolkien is offline  
Old 18 March 2015, 19:36   #32
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 42
Posts: 19,934
Quote:
Originally Posted by tolkien View Post
thats a start althought I use to use the same libs in my real Amiga and in WinUAE. I'll check that in a hour. Thanks for the tip.
Check also setpatch version, if it is too old, it won't load 68060.library without dummy library.

Easy test: run C:CPU. If FPU (68882) is not listed: Bad 68060.library setup.
Toni Wilen is offline  
Old 18 March 2015, 19:39   #33
tolkien
AmigaMan

tolkien's Avatar
 
Join Date: Oct 2012
Location: Castro Urdiales/Spain
Posts: 453
thanks for the info. I always go crazy with so different 060 libs and dummies. I write here the result.

Last edited by tolkien; 18 March 2015 at 19:40. Reason: i
tolkien is offline  
Old 18 March 2015, 20:47   #34
tolkien
AmigaMan

tolkien's Avatar
 
Join Date: Oct 2012
Location: Castro Urdiales/Spain
Posts: 453
More data:

Setpatch 44.38

68060.library 46.15 without dummy040

CPU > System: 68060 68882 (INST: Cache Burst) (DATA: Cache CopyBack)

Showconfig > PROCESSOR: CPU 68060/68060fpu/68060mmu
CUSTOM CHIPS: AA PAL Alice (id=$0023), AA Lisa (id=$00F8)
VERS: Kickstart version 45.57, Exec version 45.20, Disk version 45.3
RAM: Node type $A, Attributes $405 (FAST), at $10000000-$17FFFFFF (128.0 meg)
Node type $A, Attributes $703 (CHIP), at $4000-$1FFFFF (~2.0 meg)

Same WinUAE config.

And BDebug still crash.

What more can I try?

Last edited by tolkien; 20 June 2015 at 12:19.
tolkien is offline  
Old 18 March 2015, 20:57   #35
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 42
Posts: 19,934
I don't know. Works fine here (without 68060.library: crash when started), same ROM version.

Unless AF does something weird or something has changed in newer WinUAE version.
Toni Wilen is offline  
Old 18 March 2015, 21:15   #36
tolkien
AmigaMan

tolkien's Avatar
 
Join Date: Oct 2012
Location: Castro Urdiales/Spain
Posts: 453
It WORKS!
Updated to winuae 3.0, clean up user-startup and WBstartup and that´s all! Now I want to know what was the problem adding things.

Thanks Toni.
tolkien is offline  
Old 18 March 2015, 21:24   #37
tolkien
AmigaMan

tolkien's Avatar
 
Join Date: Oct 2012
Location: Castro Urdiales/Spain
Posts: 453
For the record: SystemPatch was the problem of the crash! BDebug running in 060 mode.

EDIT: Running... I mean no crashing but dont know if works correctly yet. Problems with source window.

Last edited by tolkien; 19 March 2015 at 00:46.
tolkien is offline  
Old 19 March 2015, 00:44   #38
NovaCoder
Registered User
NovaCoder's Avatar
 
Join Date: Sep 2007
Location: Melbourne/Australia
Posts: 3,444
Quote:
Originally Posted by tolkien View Post
For the record: SystemPatch was the problem of the crash! BDebug running in 060 mode.
Keep all hacks/patches to a minimum and you'll have a happy Miggy
NovaCoder is offline  
Old 19 March 2015, 01:27   #39
matthey
Banned
 
Join Date: Jan 2010
Location: Kansas
Posts: 1,284
@Toni
Thanks.

Quote:
Originally Posted by tolkien View Post
For the record: SystemPatch was the problem of the crash! BDebug running in 060 mode.

EDIT: Running... I mean no crashing but dont know if works correctly yet. Problems with source window.
You won't see anything in the source window if you open it before you get to _main because there is setup before main(). If you install my config, you can hit the F1 key to take you to _main and then press the '~' key above tab to open a source window and your source should show. My config is attached.

The files in Rexx should go in Sys:Rexx and BARFLY.DebugConfig can either go in the S/Barfly directory where it is installed and a file ENVARC:Barflypath created containing something like "HD:Barfly/S/Barfly" or it can go in your Sys:S/Barfly directory. The window sizes I have saved will work best with a 800x600 screen or larger. F10 will open whatever EA is currently calculated in memory which will be the location in memory of a variable if it is being read or written by an instruction. BDebug could be a little friendlier but it's not bad after understanding a few quirks. Feel free to experiment with and add to my config.
Attached Files
File Type: lha BDebug_config.lha (3.7 KB, 16 views)

Last edited by matthey; 31 August 2016 at 23:51.
matthey is offline  
Old 04 April 2015, 20:20   #40
dalton
tulou
dalton's Avatar
 
Join Date: Jun 2006
Location: Gothenburg / Sweden
Posts: 68
I was able to compile vasm and vlink on win32 using the incuded makefiles, but it seems there is only one vbcc makefile and it's hardwired to gcc. Does anyone have win32 binaries, or pointers on how to compile for windows? I'm using visual c++ 2010.

Cheers
Dalton
dalton is offline  
AdSense AdSense  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Compile problems with VBCC Yesideez Coders. C/C++ 9 19 October 2014 00:38
VBCC code generation Asman Coders. C/C++ 9 17 August 2014 10:33
From gcc to vbcc. Cowcat Coders. General 9 06 June 2014 15:45
vbcc: no startup aragon Coders. C/C++ 2 16 February 2014 15:52
VBCC 0.8j for Windows hitchhikr Coders. General 11 09 October 2008 01:58

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 09:19.


Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Page generated in 0.22766 seconds with 12 queries