Re: [frogs] How can I output Stream_event variables on the console?

[ Thread Index | Date Index | More lilynet.net/frogs Archives ]


Hello Reinhold, hello Carl,

Reinhold Kainhofer schrieb:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Am Mittwoch, 24. Februar 2010 12:26:15 schrieb Carl Sorensen:
On 2/24/10 1:51 AM, "Marc Hohl" <marc@xxxxxxxxxx> wrote:
Hello,

assuming that I define

Stream_event *event = note_events_[i];

(within a for-loop, of course)

how can I print the contents of "event" on the console?
I will trace some variables to get an idea of whats
going on inside the loop; I didn't need some fancy well-formatted
output.
IIRC, you can get a display on the console by using gdb with the .gdbinit
file listed in the CG, section 9.6.2, setting a breakpoint in your routine,
How can I set a breakpoint?
and issuing the following command from the console when you've reached the
breakpoint:

pmusic event

Once you've verified that this works, you could also execute those same
Scheme procedures by using scm_call_1 from the C++ code if you didn't want
to go through the debugger.

Or you can simply call int Prob::print_smob (SCM smob, SCM port, scm_print_state*)
(Stream_event is a class derived from Prob)
I assume that just pasting this line under

Stream_event *event = note_events_[i];

is not the whole deal (I tried this, it didn't work).

I'm sorry to say, but at the moment I am writing C stuff by looking at some
engraver files and copy/paste everything into my file that looks as if it could
work. That's not really satisfying, but I try to learn it that way.

Marc



---
----
Join the Frogs!


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/