… | |
… | |
523 | |
523 | |
524 | delete $self->{thread}{$r->{id}}; |
524 | delete $self->{thread}{$r->{id}}; |
525 | } |
525 | } |
526 | |
526 | |
527 | sub _threads { |
527 | sub _threads { |
528 | my ($self, $r) = @_; |
528 | my ($self, $id) = @_; |
529 | |
529 | |
530 | $r->{thread_id} eq "all" |
530 | ref $id |
|
|
531 | ? @{ $self->{thread} }[@$id] |
|
|
532 | : $id eq "all" |
531 | ? values %{ $self->{thread} } |
533 | ? values %{ $self->{thread} } |
532 | : $self->{thread}{$r->{thread_id}} |
534 | : $self->{thread}{$id} |
533 | } |
535 | } |
534 | |
536 | |
535 | sub on_exec_running { |
537 | sub on_exec_running { |
536 | my ($self, undef, $r) = @_; |
538 | my ($self, undef, $r) = @_; |
537 | |
539 | |
538 | for ($self->_threads ($r)) { |
540 | for ($self->_threads ($r->{stopped_threads})) { |
539 | delete $_->{stopped}; |
541 | delete $_->{stopped}; |
540 | $_->{running} = 1; |
542 | $_->{running} = 1; |
541 | } |
543 | } |
542 | } |
544 | } |
543 | |
545 | |
… | |
… | |
580 | |
582 | |
581 | AnyEvent::GDB is asynchronous in nature, as the goal of the MI interface |
583 | AnyEvent::GDB is asynchronous in nature, as the goal of the MI interface |
582 | is to be fully asynchronous. Due to this, a user of this interface must |
584 | is to be fully asynchronous. Due to this, a user of this interface must |
583 | be prepared to handle various events. |
585 | be prepared to handle various events. |
584 | |
586 | |
585 | When an event is produced, the GDB object will look for the following |
587 | When an event is produced, the GDB object will look for the following four |
586 | four handlers and, if found, will call it with the GDB object and event |
588 | handlers and, if found, will call each one in order with the GDB object |
587 | name (without C<on_>) as the first two arguments, followed by any |
589 | and event name (without C<on_>) as the first two arguments, followed by |
588 | event-specific arguments: |
590 | any event-specific arguments: |
589 | |
591 | |
590 | =over 4 |
592 | =over 4 |
591 | |
593 | |
|
|
594 | =item on_event method on the GDB object |
|
|
595 | |
|
|
596 | Useful when subclassing. |
|
|
597 | |
|
|
598 | =item on_event constructor parameter |
|
|
599 | |
|
|
600 | The callback specified as C<on_event> parameter to the constructor. |
|
|
601 | |
|
|
602 | =item on_EVENTNAME method on the GDB object |
|
|
603 | |
|
|
604 | Again, mainly useful when subclassing. |
|
|
605 | |
592 | =item on_EVENTNAME constructor parameter |
606 | =item on_EVENTNAME constructor parameter |
593 | |
607 | |
594 | Any callback specified as C<on_EVENTNAME> parameter to the constructor. |
608 | Any callback specified as C<on_EVENTNAME> parameter to the constructor. |
595 | |
|
|
596 | =item on_EVENTNAME method on the GDB object |
|
|
597 | |
|
|
598 | Useful when subclassing. |
|
|
599 | |
|
|
600 | =item on_event constructor parameter |
|
|
601 | |
|
|
602 | The callback specified as C<on_event> parameter to the constructor. |
|
|
603 | |
|
|
604 | =item on_event method on the GDB object |
|
|
605 | |
|
|
606 | Again, mainly useful when subclassing. |
|
|
607 | |
609 | |
608 | =back |
610 | =back |
609 | |
611 | |
610 | Here's the list of events with a description of their arguments. |
612 | Here's the list of events with a description of their arguments. |
611 | |
613 | |