Page 2 of 2
Re: Debugging code that shows no errors...
Posted: Fri Feb 22, 2013 11:23 am
by salass00
@belxjander
dApplication.IApplication = (APTR)IExec->GetInterface((APTR)dApplication.ApplicationBase,"main",0L,NULL);
The name of the IApplication interface is "application" and not "main". Unlike most libraries "application.library" does not have an interface named "main" at all.
Also when using the GetInterface() function you should always specify the exact version you want (specifying 1 as version should be fine for most libraries) as there is no 0 value for "any version works" as there is with OpenLibrary().
The reason is that unlike library versions which should always try to be backwards compatible, interface versions will most likely be incompatible and a library can export more than one version of the same interface (f.e. a library might export v1 "main" interface with compatibility cludges for old applications and an improved v2 "main" for newer ones).
Re: Debugging code that shows no errors...
Posted: Fri Feb 22, 2013 12:03 pm
by trixie
@belxjander
salass00 wrote:
The name of the IApplication interface is "application" and not "main". Unlike most libraries "application.library" does not have an interface named "main" at all.
Yes. This is all well covered in the
relevant section of the Amiga Developer Wiki.
Re: Debugging code that shows no errors...[SOLVED]
Posted: Mon Feb 25, 2013 6:40 pm
by Belxjander
@Tonyw: Thank you for the reference debugging macro... I'll keep a note of it and use it in future.
I however don't have the luxury of anything other than the single sam440flex machine to work with...
so unless there is some way to run a serial debugging mechanism (using the FPGA with a custom program???) without using another device...
however much it is suggested to connect another device by serial link, I don't have any "second device" with which to read serial information.
@All: Thank you to everyone else as well... this is now solved...
Trying to code micro-snippets during "coffee breaks" using an android phone to copy/paste and modify code then later transferring it to the same for testing is a definite "bug infestation" helper...
Re: Debugging code that shows no errors...
Posted: Mon Feb 25, 2013 8:09 pm
by LyleHaze
Have you had any success with sashimi?
Re: Debugging code that shows no errors...[DEBUGGED]
Posted: Mon Feb 25, 2013 11:40 pm
by Belxjander
LyleHaze wrote:Have you had any success with sashimi?
I have only added relevant debugging references into my projects, and due to comments on this thread managed to solve the bugs that were bothering me,
The processes embedded into the libraries I am writing can now proceed as Commodities and Application library presences are now active.
I hopefully don't need to add any workarounds for remapping keyboard events for keys that currently are present but non-functional for Japanese and other keyboards.
Re: Debugging code that shows no errors...
Posted: Tue Feb 26, 2013 12:04 am
by LyleHaze
I am glad you got it running..
I only asked about sashimi because of this comment:
so unless there is some way to run a serial debugging mechanism without using another device...
Which is exactly what sashimi offers you..
Have Fun!
Re: Debugging code that shows no errors...
Posted: Tue Feb 26, 2013 1:14 am
by Belxjander
LyleHaze wrote:I am glad you got it running..
I only asked about sashimi because of this comment:
so unless there is some way to run a serial debugging mechanism without using another device...
Which is exactly what sashimi offers you..
Have Fun!
Well I will try to find time to actually read the Sashimi documentation and get it working then.
I am not making the best decisions or remembering all the details at the moment due to personal circumstances
Re: Debugging code that shows no errors...
Posted: Wed Feb 27, 2013 8:46 am
by trixie
@Belxjander
Belxjander wrote:
Well I will try to find time to actually read the Sashimi documentation and get it working then.
There is really nothing to read! Just
Code: Select all
Run Sashimi CONSOLE BUFK=128 NOPROMPT ASKEXIT ASKSAVE
and you're done. When some debug output actually appears, Sashimi will open a window, and will also let you save the console buffer with the output.