English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Language > Coders. C/C++

 
 
Thread Tools
Old 17 September 2018, 22:20   #21
tolkien
AmigaMan
 
tolkien's Avatar
 
Join Date: Oct 2012
Location: Castro Urdiales/Spain
Posts: 760
Good! Now I can use the debugger! Even with codeblocks. This GCC version has a minor problem with paths (my default project path have spaces and letter Ñ so perhaps is that the problem) but I can solve it creating the project in another folder.

Im going to try it harder.

Thanks so much!!!
tolkien is offline  
Old 18 September 2018, 11:35   #22
Hewitson
Registered User
 
Hewitson's Avatar
 
Join Date: Feb 2007
Location: Melbourne, Australia
Age: 41
Posts: 3,771
Quote:
Originally Posted by jotd View Post
more generally great work creating a cross compiler suite which doesn't require this crap cygwin.
You wouldn't need the crap cygwin if you didn't use a crap OS
Hewitson is offline  
Old 18 September 2018, 16:09   #23
bebbo
bye
 
Join Date: Jun 2016
Location: Some / Where
Posts: 680
Quote:
Originally Posted by tolkien View Post
Good! Now I can use the debugger! Even with codeblocks. This GCC version has a minor problem with paths (my default project path have spaces and letter Ñ so perhaps is that the problem) but I can solve it creating the project in another folder.

Im going to try it harder.

Thanks so much!!!
Updated it.
Code:
m68k-amigaos-gcc hello.c -I "d:\temp\x Ñ\include"
is working now
bebbo is offline  
Old 19 September 2018, 22:36   #24
tolkien
AmigaMan
 
tolkien's Avatar
 
Join Date: Oct 2012
Location: Castro Urdiales/Spain
Posts: 760
Hi Bebbo!
Can you try to create a directory named for example "test ñ", create a project there and compile? I can´t!
It´s not really a problem cos I can create a dir with another name. The only problem is that the path to my desktop have "space and ñ" in its name hehehehe
tolkien is offline  
Old 19 September 2018, 23:25   #25
bebbo
bye
 
Join Date: Jun 2016
Location: Some / Where
Posts: 680
Quote:
Originally Posted by tolkien View Post
Hi Bebbo!
Can you try to create a directory named for example "test ñ", create a project there and compile? I can´t!
It´s not really a problem cos I can create a dir with another name. The only problem is that the path to my desktop have "space and ñ" in its name hehehehe
Yes I can - no problem - using cmd.exe:
Code:
d:\temp\x Ñ\Ña Ñi Ñu ÑoÑoÑo\test ñ>m68k-amigaos-gcc hello.c  -I ..
bebbo is offline  
Old 20 September 2018, 08:36   #26
tolkien
AmigaMan
 
tolkien's Avatar
 
Join Date: Oct 2012
Location: Castro Urdiales/Spain
Posts: 760
Don't worry Bebbo. I was trying with CodeBlocks and perhaps is its fault.

I will try with other ide cos codeblocks doesnt handle very well the debugger part.

any ide suggestion mates?
tolkien is offline  
Old 10 April 2019, 19:07   #27
bebbo
bye
 
Join Date: Jun 2016
Location: Some / Where
Posts: 680
I just uploaded my current snaphsot and its available here:

https://franke.ms/download/bgdbserver_6.zip
bebbo is offline  
Old 11 April 2019, 12:35   #28
meeku
Registered User
 
Join Date: Apr 2019
Location: Kings Lynn
Posts: 17
This update fixes the issue I posted in the other thread with bgdbserver not finding my executable!
Thanks
meeku is offline  
Old 14 April 2019, 11:29   #29
alkis
Registered User
 
Join Date: Dec 2010
Location: Athens/Greece
Age: 53
Posts: 719
Here is a little experiment in python
https://drive.google.com/file/d/17gR...ew?usp=sharing

Get it and from within gdb, type 'source al.py'
Now when you debug and you come across an amiga lib function call (jsr -nnn(a6)), if you type in gdb 'al' (short for amiga library) then it will tell you what function that is.
alkis is offline  
Old 18 May 2019, 11:05   #30
bebbo
bye
 
Join Date: Jun 2016
Location: Some / Where
Posts: 680
You may now contribute to bgdbserver: https://github.com/bebbo/bgdbserver
bebbo is offline  
Old 10 June 2019, 15:40   #31
prb28
Registered User
 
Join Date: May 2018
Location: France
Posts: 246
Hi bebbo,

That's a great work you did!

I'm trying to get the m68k-amigaos-gdb binary for osx.

It's not in your binary release, so I've tried to build it and got this error:
Code:
checking for the correct version of mpc.h... no
configure: error: Building GCC requires GMP 4.2+, MPFR 2.4.0+ and MPC 0.8.0+.
Try the --with-gmp, --with-mpfr and/or --with-mpc options to specify
their locations.  Source code for these libraries can be found at
their respective hosting sites as well as at
ftp://gcc.gnu.org/pub/gcc/infrastructure/.  See also
http://gcc.gnu.org/install/prerequisites.html for additional info.  If
you obtained GMP, MPFR and/or MPC from a vendor distribution package,
make sure that you have installed both the libraries and the header
files.  They may be located in separate packages.
configure gcc...failed
use less "log/configure gcc.log" to view the full log and search for ***
make: *** [build-Darwin/gcc/Makefile] Error 1
I've done a brew install of mpc, this is the info:
Code:
brew info mpc
mpc: stable 0.31 (bottled)
Command-line music player client for mpd
https://www.musicpd.org/clients/mpc/
/usr/local/Cellar/mpc/0.31 (14 files, 148.1KB) *
  Poured from bottle on 2019-06-10 at 10:43:01
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/mpc.rb
==> Dependencies
Build: meson ?, ninja ?, pkg-config ?
Required: libmpdclient ?
==> Caveats
Bash completion has been installed to:
  /usr/local/etc/bash_completion.d
==> Analytics
install: 305 (30 days), 1,019 (90 days), 4,857 (365 days)
install_on_request: 291 (30 days), 961 (90 days), 4,308 (365 days)
build_error: 0 (30 days)
prb28 is offline  
Old 10 June 2019, 18:00   #32
bebbo
bye
 
Join Date: Jun 2016
Location: Some / Where
Posts: 680
Quote:
Originally Posted by prb28 View Post
Hi bebbo,

That's a great work you did!

I'm trying to get the m68k-amigaos-gdb binary for osx.

It's not in your binary release, so I've tried to build it and got this error:
Code:
checking for the correct version of mpc.h... no
configure: error: Building GCC requires GMP 4.2+, MPFR 2.4.0+ and MPC 0.8.0+.
Try the --with-gmp, --with-mpfr and/or --with-mpc options to specify
their locations.  Source code for these libraries can be found at
their respective hosting sites as well as at
ftp://gcc.gnu.org/pub/gcc/infrastructure/.  See also
http://gcc.gnu.org/install/prerequisites.html for additional info.  If
you obtained GMP, MPFR and/or MPC from a vendor distribution package,
make sure that you have installed both the libraries and the header
files.  They may be located in separate packages.
configure gcc...failed
use less "log/configure gcc.log" to view the full log and search for ***
make: *** [build-Darwin/gcc/Makefile] Error 1
I've done a brew install of mpc, this is the info:
Code:
brew info mpc
mpc: stable 0.31 (bottled)
Command-line music player client for mpd
https://www.musicpd.org/clients/mpc/
/usr/local/Cellar/mpc/0.31 (14 files, 148.1KB) *
  Poured from bottle on 2019-06-10 at 10:43:01
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/mpc.rb
==> Dependencies
Build: meson ?, ninja ?, pkg-config ?
Required: libmpdclient ?
==> Caveats
Bash completion has been installed to:
  /usr/local/etc/bash_completion.d
==> Analytics
install: 305 (30 days), 1,019 (90 days), 4,857 (365 days)
install_on_request: 291 (30 days), 961 (90 days), 4,308 (365 days)
build_error: 0 (30 days)

that's the wrong mpc...
... gcc is building on osx (see here: https://travis-ci.org/bebbo/amiga-gcc, windows is here: https://travis-ci.org/bebbo/amiga-gcc-travis-windows)


but osx is without gdb - gdb does not build so easily.


My best guess: make gcc work (somehow) instead of `what's provided´



And if you solve this, create a pull request on github or share that knowlegde in another way.
bebbo is offline  
Old 10 June 2019, 18:33   #33
prb28
Registered User
 
Join Date: May 2018
Location: France
Posts: 246
ok thanks, maybe a cross compilation will do the trick.
I try it and will get back to you when it works.
prb28 is offline  
Old 15 June 2019, 10:58   #34
prb28
Registered User
 
Join Date: May 2018
Location: France
Posts: 246
When opening my helloword in vscode this line:
Code:
    DOSBase = OpenLibrary("dos.library", 0);
I've an intellisence error: "unknown register name 'd1'".

It builds with the makefile so I think there is a define or a gcc option that I should add to my config.
Do you know which one?
prb28 is offline  
Old 15 June 2019, 11:08   #35
bebbo
bye
 
Join Date: Jun 2016
Location: Some / Where
Posts: 680
Quote:
Originally Posted by prb28 View Post
When opening my helloword in vscode this line:
Code:
    DOSBase = OpenLibrary("dos.library", 0);
I've an intellisence error: "unknown register name 'd1'".

It builds with the makefile so I think there is a define or a gcc option that I should add to my config.
Do you know which one?

try
Code:
#define _NO_INLINE
bebbo is offline  
Old 15 June 2019, 12:26   #36
prb28
Registered User
 
Join Date: May 2018
Location: France
Posts: 246
It worked! thanks!
prb28 is offline  
Old 16 June 2019, 19:50   #37
bebbo
bye
 
Join Date: Jun 2016
Location: Some / Where
Posts: 680
I just updloaded bgdbserver 1.1 to aminet (should be there tomorrow), and for the hasty ones: https://franke.ms/download/bgdbserver.lha

what's new?

version 1.1 supports breaking into a running program. Try CTRL+C in gdb.
bebbo is offline  
Old 20 July 2019, 20:43   #38
arti
Registered User
 
Join Date: Jul 2008
Location: Poland
Posts: 662
I am able to run program on winuae in bgdbserver from eclipse but on eclipse i get :
"Could not start gdbserver on the remote host. See console output for more details."

I run WinUAE in admin mode.
arti is offline  
Old 24 July 2019, 10:10   #39
bebbo
bye
 
Join Date: Jun 2016
Location: Some / Where
Posts: 680
Quote:
Originally Posted by arti View Post
I am able to run program on winuae in bgdbserver from eclipse but on eclipse i get :
"Could not start gdbserver on the remote host. See console output for more details."

I run WinUAE in admin mode.

Did you follow all steps decribed here: https://franke.ms/amiga/gdb8.wiki?


My first guess: You did not install the patched eclipse plugin.
bebbo is offline  
Old 17 November 2019, 21:05   #40
Tom_Goblins
Registered User
 
Join Date: Dec 2018
Location: Seattle
Posts: 13
I am using Bebbo's GCC using c++ and it works great for me (Thanks Bebbo! ).

Now, my problem is to find an easy to way to debug code, other than printf or obscure memory breakpoints on winuae . So maybe you guys, can give some options and let me know if I am doing something wrong.

I used the bgdbserver and it works fine, but as an Amiga program when I disable system, the server running on the amiga goes away too (maybe I am missing something here?).

Then I saw that now FS-UAE and Winuae have some modifications to support gdb, my understanding is this method would be better and more integrated into the emulator, but unfortunately it doesn't seem to work on c++ or with bebbo gcc tools.

I tried adapting the vscode of the 'https://github.com/BartmanAbyss/vscode-amiga-debug/releases' but I couldn't make it work, not an expert on GDB XD.

I would really appreciate any help on this, thanks!
Tom_Goblins is offline  
 


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Csound 3.481 on m68k squidbass Amiga scene 5 21 July 2013 21:29
Rewriting m68k code RobSis Coders. Tutorials 1 26 January 2013 16:15
Remote GDB debugging copse support.WinUAE 6 31 August 2011 01:05
m68k-amigaos-ld.exe bug ? FrenchShark Coders. General 2 30 November 2009 09:54
Shorten ported to AmigaOS m68k and WarpOS Paul News 0 20 August 2006 12:05

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 08:33.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.15100 seconds with 14 queries