ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/AnyEvent-GDB/GDB.pm
(Generate patch)

Comparing AnyEvent-GDB/GDB.pm (file contents):
Revision 1.6 by root, Mon Dec 31 13:00:48 2012 UTC vs.
Revision 1.7 by root, Thu May 15 10:32:04 2014 UTC

67set a tty (eg. with the C<inferior_set_tty> command). 67set a tty (eg. with the C<inferior_set_tty> command).
68 68
69Unfortunately, the MI interface does not seem to support any kind 69Unfortunately, the MI interface does not seem to support any kind
70of I/O redirection, so this module helps you a bit, by setting the 70of I/O redirection, so this module helps you a bit, by setting the
71C<exec-wrapper> variable with a console C<set> commmand. That is, this 71C<exec-wrapper> variable with a console C<set> commmand. That is, this
72module does soemthing like this for you, providing proper file descriptors 72module does soeQmthing like the following for you, providing proper file
73fpr your actual stdin and stdout: 73descriptors for your actual stdin and stdout:
74 74
75 set exec-wrapper <&5 >&6 75 set exec-wrapper <&5 >&6
76 76
77The actual I/O redirection operators are also stored in C<< $gdb->{stdio} 77The actual I/O redirection operators are also stored in C<< $gdb->{stdio}
78>>, so you can even do it yourself, e.gh. when providing your own wrapper: 78>>, so you can even do it yourself, e.g. when providing your own wrapper:
79 79
80 $self->cmd_raw ("set exec-wrapper $self->{stdio}", sub { }); 80 $self->cmd_raw ("set exec-wrapper $self->{stdio}", sub { });
81 81
82(You need to use a raw command, as the "correct" C<gdb_set> MI command 82(You need to use a raw command, as the "correct" C<gdb_set> MI command
83silently ignores any C<exec-wrapper> setting). 83silently ignores any C<exec-wrapper> setting).
93use Scalar::Util (); 93use Scalar::Util ();
94 94
95use AnyEvent (); 95use AnyEvent ();
96use AnyEvent::Util (); 96use AnyEvent::Util ();
97 97
98our $VERSION = '0.1'; 98our $VERSION = '0.2';
99 99
100=head2 METHODS 100=head2 METHODS
101 101
102=over 4 102=over 4
103 103
109at least C<verbose> enabled. And don't forget to provide an C<on_eof> 109at least C<verbose> enabled. And don't forget to provide an C<on_eof>
110callback. 110callback.
111 111
112 my $gdb = new AnyEvent::GDB 112 my $gdb = new AnyEvent::GDB
113 on_eof => sub { 113 on_eof => sub {
114 print Qe are done.\n"; 114 print "We are done.\n";
115 }, 115 },
116 trace => 1; # or verbose => 1, for less output 116 trace => 1; # or verbose => 1, for less output
117 117
118=over 4 118=over 4
119 119

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines