Login
Username:

Password:

Remember me



Lost Password?

Register now!
Main Menu
Who's Online
1 user(s) are online (1 user(s) are browsing Forum)

Members: 0
Guests: 1

more...

Browsing this Thread:   1 Anonymous Users





Debug output hosted

Joined:
2011/6/30 19:50
Group:
Member
Posts: 4095
Offline
Hi,

Here it states:
Quote:
D() will expand to nothing if DEBUG is 0 or undefined. Use bug() alone to force debug output whatever is the value of DEBUG. The usage is the same as printf(). On hosted, the output will be displayed in the console where AROS has been started. On native you have to use the tool Sashimi.

a) would that mean sashimi is unable to catch this debug output on hosted ?

b) if i use this function in a simple program:
#include <stdio.h>
#include <aros/debug.h>

#define DEBUG 1
int main(void)
{
  
D(bug("test"));
  return 
0;
}

I do not see this output in cli window when running windows hosted (v0-nightly) :-S

Are there other requirements necessary ?

Posted on: 2014/9/20 11:37
Transfer the post to other applications Transfer


Re: Debug output hosted

Joined:
2011/9/25 1:23
From Hungary
Group:
Member
Posts: 1509
Offline
You have to define DEBUG before aros/debug.h is included.

Posted on: 2014/9/20 11:55
_________________
My AROS&MorphOS ports
Arguments that explain everything... explain nothing.
Transfer the post to other applications Transfer


Re: Debug output hosted

Joined:
2004/3/29 9:54
From Scotland "The Cold"
Group:
Member
Posts: 2139
Offline
Quote:

magorium wrote:
Hi,

Here it states:
Quote:
D() will expand to nothing if DEBUG is 0 or undefined. Use bug() alone to force debug output whatever is the value of DEBUG. The usage is the same as printf(). On hosted, the output will be displayed in the console where AROS has been started. On native you have to use the tool Sashimi.

a) would that mean sashimi is unable to catch this debug output on hosted ?

b) if i use this function in a simple program:
#include <stdio.h>
#include <aros/debug.h>

#define DEBUG 1
int main(void)
{
  
D(bug("test"));
  return 
0;
}

I do not see this output in cli window when running windows hosted (v0-nightly) :-S

Are there other requirements necessary ?


It doesnt work because you are doing it incorrectly. You have to define DEBUG _before_ including the necessary headers, otherwise it is pointless.

Posted on: 2014/9/20 11:56
_________________
Click to see original Image in a new window
Transfer the post to other applications Transfer


Re: Debug output hosted

Joined:
2011/6/30 19:50
Group:
Member
Posts: 4095
Offline
@ BSzili / Kalamatee
Ah, yes. thank you very much. i see my stupidiness now

nevertheless, the sashimi question still stands.

Reason to ask is if functionility is patched like sashimi does (that is to say function RawPutChar), it seems impossible to catch debug output this way on windows hosted, while reported to work under linux hosted.

And i don't understand why.

Nevermind.

The 'problem' solved itself auto-magically somehow. To much left-overs i presume :S

Posted on: 2014/9/20 12:02

Edited by magorium on 2014/9/20 12:25:58
Transfer the post to other applications Transfer






You can view topic.
You cannot start a new topic.
You cannot reply to posts.
You cannot edit your posts.
You cannot delete your posts.
You cannot add new polls.
You cannot vote in polls.
You cannot attach files to posts.
You cannot post without approval.

[Advanced Search]


Search
Top Posters
1 paolone
paolone
4405
2 magorium
magorium
4095
3 nikolaos
nikolaos
3965
4 phoenixkonsole
phoenixkonsole
3903
5 deadwood
deadwood
2917
6 ncafferkey
ncafferkey
2779
7 mazze
mazze
2221
8 Kalamatee
Kalamatee
2139
9 clusteruk
clusteruk
2112
10 damocles
damocles
1789
© 2004-2018 AROS Exec