Neither of these are C++ commands, but they may do what you want:

To limit output to 100 lines, you could do the following:

$ ./my_flowgraph.py | head -n 100

Or insert a "head" block in your flowgraph and choose an appropriate number of 
samples to process.

Sean

From: [email protected] 
[mailto:[email protected]] On Behalf 
Of Marcus Müller
Sent: Tuesday, July 21, 2015 3:07 PM
To: [email protected]
Subject: Re: [Discuss-gnuradio] Debug Question

Hi Rich
Best approach is very probable running your flow graph in gdb and specifying a 
break point:

gdb --args python /path/to/flow_graph.py
...
>break source_code.cc:121
blablabla not loaded, do you want to add it as soon as blabla? Y
>run

if you really want to enforce this in the source code itself:

#include <csignal>
...

std::raise(std::SIGINT); // not quite sure which namespace raise and SIGINT end 
up in; try without std:: on either

Best regards,
Marcus

On 21.07.2015 20:50, Richard Bell wrote:
I'm looking for a way to stop my flowgraph through a C++ command just so I can 
see a few std::cout debug statements without freezing my console due to massive 
std::couts.
Is there a way of doing this?
Rich




_______________________________________________

Discuss-gnuradio mailing list

[email protected]<mailto:[email protected]>

https://lists.gnu.org/mailman/listinfo/discuss-gnuradio

_______________________________________________
Discuss-gnuradio mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio

Reply via email to