English Amiga Board


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

 
 
Thread Tools
Old 09 August 2020, 07:38   #81
Warty
Registered User

 
Join Date: Aug 2018
Location: Minneapolis, USA
Posts: 272
Quote:
Originally Posted by bebbo View Post
The installation failure is not related to that minor issue. Workaround:

Install 2019-12, install Amiga-CDT and perform an update -> you get 2020-06.
Thanks Bebbo! It works like a charm now. I wrote a game without anything like this, with just VBCC, and it was pretty darn painful. Now I'm all juiced up to start a new project. I've got a bad feeling about this C128 game I've been working on for the past 6 months, which is currently at 95% complete...

Thanks for the cross chain, and also for the debugger. Seriously, magic.
Warty is offline  
Old 10 August 2020, 00:00   #82
activist
Registered User

 
Join Date: May 2017
Location: Dublin Ireland
Posts: 82
Quote:
Originally Posted by bebbo View Post
sounds dumb... but...create a .gdbinit file in your home folder
Have you an example .gdbinit file ?

Seems to work ok on command line.

e.g. On the target (amiga), type 'bgdbserver helloworld' I get 'Running GDB server on port 2345'.
Then on host (windows 7 64) type 'target remote localhost:2345'. Seems to connect. Says 'Remote debugging using localhost:2345'
At this point I can set break point ..b 18.
Or just type 'cont'.
I can then see it executing successfully on target.

So that's all fine. But Eclipse. Not sure..Windows version at least anyway.
A quick google on bing for gcc Eclipse stuck 'Launching Debug: (91%)' Starting Program: Configuring GDB seems a well known issue.


Also, no joy at all port 514.

e.g. on target if I type 'bgdbserver' I get 'Starting RSH server on port 514'.
on windows host cmdline type:
'bgdbserver helloworld'
then
'target remote localhost:514'
but just times out.
activist is offline  
Old 10 August 2020, 11:27   #83
bebbo
botcher

 
Join Date: Jun 2016
Location: Hamburg/Germany
Posts: 617
Quote:
Originally Posted by activist View Post
Have you an example .gdbinit file ?

Seems to work ok on command line.

e.g. On the target (amiga), type 'bgdbserver helloworld' I get 'Running GDB server on port 2345'.
Then on host (windows 7 64) type 'target remote localhost:2345'. Seems to connect. Says 'Remote debugging using localhost:2345'
At this point I can set break point ..b 18.
Or just type 'cont'.
I can then see it executing successfully on target.

So that's all fine. But Eclipse. Not sure..Windows version at least anyway.
A quick google on bing for gcc Eclipse stuck 'Launching Debug: (91%)' Starting Program: Configuring GDB seems a well known issue.


Also, no joy at all port 514.

e.g. on target if I type 'bgdbserver' I get 'Starting RSH server on port 514'.
on windows host cmdline type:
'bgdbserver helloworld'
then
'target remote localhost:514'
but just times out.

an empty file should do it.


plus you have to configure that file in Eclipse with abolute path
in the Debug settings what gdbinit file to use. Set it in the preferences and it's there in new debug configurations.


I can debug with Eclipse 202006 in Windows now

Last edited by bebbo; 10 August 2020 at 17:06.
bebbo is offline  
Old 22 November 2022, 19:43   #84
felmur
Registered User

felmur's Avatar
 
Join Date: Nov 2022
Location: Salerno/Italia
Posts: 7
Hello,
I installed eclipse + toolchain-gcc scrupulously following Bebbo's instructions, to whom I thank him for the excellent tutorial.

It works very well in Eclipse and now I successfully compile the programs I write, testing them in FS-UAE and also on my amiga600.

Everything worked fine until I needed to pass parameters to the program via the command line.

I wrote this simple source:
Code:
#include <stdio.h>
#include <stdlib.h>

int main(int argc, char const * const * argv) {
	printf("Number of arguments passed: %d\n",argc);
	for (int i=0; i<argc; i++){
		printf("Arg# %d: '%s'\n", i, argv[i]);
	}
	return EXIT_SUCCESS;
}
The code compiles perfectly, but when I try it in FS-UAE the parameters I pass via command line are not recognized. The value of argc appears to be correctly set, but it is also not possible to read the value of argv[0], which should contain the program name. Does anyone have any idea what I'm doing wrong?
Attached Thumbnails
Click image for larger version

Name:	amiga4000pereclipse-crop-2211221825-01.png
Views:	23
Size:	5.9 KB
ID:	77178  
felmur is offline  
Old 22 November 2022, 21:58   #85
hitchhikr
Registered User

 
Join Date: Jun 2008
Location: somewhere else
Posts: 449
I think you should use the -noixemul parameter.
hitchhikr is offline  
Old 22 November 2022, 22:29   #86
felmur
Registered User

felmur's Avatar
 
Join Date: Nov 2022
Location: Salerno/Italia
Posts: 7
Quote:
Originally Posted by hitchhikr View Post
I think you should use the -noixemul parameter.
Hi hitchhikr,

where i have to put this parameter?

Thank you.
felmur is offline  
Old 22 November 2022, 22:31   #87
hitchhikr
Registered User

 
Join Date: Jun 2008
Location: somewhere else
Posts: 449
In the gcc parameters. Dunno how it is done in eclipse but there's certainly a way to set extra params somewhere in the project data.
hitchhikr is offline  
Old 22 November 2022, 22:39   #88
felmur
Registered User

felmur's Avatar
 
Join Date: Nov 2022
Location: Salerno/Italia
Posts: 7
Quote:
Originally Posted by hitchhikr View Post
In the gcc parameters. Dunno how it is done in eclipse but there's certainly a way to set extra params somewhere in the project data.
oh yeah, IT WORKS. Thank you!

In Eclipse -> Project -> Properties, then configure linker as reported in the attacked image.

THANK YOU!
Attached Thumbnails
Click image for larger version

Name:	eclipse.png
Views:	23
Size:	81.4 KB
ID:	77192  
felmur is offline  
Old 23 November 2022, 00:32   #89
alkis
Registered User

 
Join Date: Dec 2010
Location: Athens/Greece
Age: 51
Posts: 686
for future reference and just in case you want to build for 1.3 kickstart then you have to replace -noixemul with -mcrt=nix13
alkis is offline  
Old 26 November 2022, 12:20   #90
felmur
Registered User

felmur's Avatar
 
Join Date: Nov 2022
Location: Salerno/Italia
Posts: 7
Quote:
Originally Posted by alkis View Post
for future reference and just in case you want to build for 1.3 kickstart then you have to replace -noixemul with -mcrt=nix13
thanks.

I've a new problem now: compiling a source with MUI.

--> TRANSFERRED HERE: http://eab.abime.net/showthread.php?t=112625

Last edited by felmur; Yesterday at 11:08.
felmur is offline  
Old 26 November 2022, 21:38   #91
bebbo
botcher

 
Join Date: Jun 2016
Location: Hamburg/Germany
Posts: 617
wrong thread, isn't it?
bebbo is offline  
Old 26 November 2022, 23:49   #92
Samurai_Crow
Total Chaos forever!

Samurai_Crow's Avatar
 
Join Date: Aug 2007
Location: Waterville, MN, USA
Age: 48
Posts: 1,924
Quote:
Originally Posted by bebbo View Post
wrong thread, isn't it?
Yes. @felmur , start a new thread.
Samurai_Crow 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 22:29
Rewriting m68k code RobSis Coders. Tutorials 1 26 January 2013 17:15
Remote GDB debugging copse support.WinUAE 6 31 August 2011 02:05
m68k-amigaos-ld.exe bug ? FrenchShark Coders. General 2 30 November 2009 10:54
Shorten ported to AmigaOS m68k and WarpOS Paul News 0 20 August 2006 13: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 13:15.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2022, vBulletin Solutions Inc.
Page generated in 0.12890 seconds with 16 queries