Re: [frogs] How can I output Stream_event variables on the console? |
[ Thread Index |
Date Index
| More lilynet.net/frogs Archives
]
- To: Reinhold Kainhofer <reinhold@xxxxxxxxxxxxx>
- Subject: Re: [frogs] How can I output Stream_event variables on the console?
- From: Marc Hohl <marc@xxxxxxxxxx>
- Date: Wed, 24 Feb 2010 20:28:04 +0100
- Cc: frogs@xxxxxxxxxxx, "Carl D. Sorensen" <c_sorensen@xxxxxxx>
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; t=1267039694; l=1620; s=domk; d=hohlart.de; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:References: Subject:CC:To:MIME-Version:From:Date:X-RZG-CLASS-ID:X-RZG-AUTH; bh=FEvcaI7ZJZkqovQcw5MrED5L2W4=; b=Eor07Ay9VHl0CjpL0JhZCsREEFGh8SuIW7pL6ybL7N9NSwt1ByoBsMVxbz2m60GIEzj LGM04oYQsO2XnBjXqY07qWvJ/NhzFH6JCDZyp3kgHvpNnxnOk/UsXX00LmuV3JeQzAUEY lOBJqxY4PfqctFskv6Nbin/8LOu16s8O7FY=
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!