Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception Thrown: Died when debugging scripts #48

Open
ryn1x opened this issue Dec 24, 2018 · 0 comments
Open

Exception Thrown: Died when debugging scripts #48

ryn1x opened this issue Dec 24, 2018 · 0 comments

Comments

@ryn1x
Copy link
Contributor

ryn1x commented Dec 24, 2018

Issue

perl6-debug-m commonly shows a "Exception Thrown: Died" when debugging scripts that have no errors when running outside the debugger.

So far I have noticed this happening in two scenarios:

  • When a script has a MAIN() sub
  • When a script calls Native subs

It is also of note that the message happens in threes with Native subs.

Scenario 1:

Perl6 script:

#!/usr/bin/env perl6
use v6.c;

sub hi( $name ) {say "Hi, $name"}

sub MAIN() {
    hi 'Camelia';
}

Debugger output:

$ perl6-debug-m debugger.p6
>>> LOADING debugger.p6
+ Exception Thrown
| Died
+ debugger.p6 (4 - 8)
| sub hi( $name ) {say "Hi, $name"}
| 
| sub MAIN() {
|     hi 'Camelia';
| }
> 
+ debugger.p6 (5 - 9)
| 
| sub MAIN() {
|     hi 'Camelia';
| }
| 
> 
+ debugger.p6 (2 - 6)
| use v6.c;
| 
| sub hi( $name ) {say "Hi, $name"}
| 
| sub MAIN() {
> 
Hi, Camelia

Scenario 2

C source:

#include <stdio.h>

void hello() {
   printf("Hello from C!\n");
}

Perl6 script:

#!/usr/bin/env perl6
use v6.c;
use NativeCall;

sub hello() is native('hello') { * }

sub MAIN() {
    hello;
}

Debugger output:

$ perl6-debug-m debugger_native.p6
>>> LOADING debugger_native.p6
>>> LOADING EVAL_1
+ EVAL_1 (1 - 1)
| CompUnit::DependencySpecification.new(short-name => "NativeCall::Types", s...
> 
>>> LOADING EVAL_2
+ EVAL_2 (1 - 1)
| CompUnit::DependencySpecification.new(short-name => "NativeCall::Types", s...
> 
>>> LOADING EVAL_3
+ EVAL_3 (1 - 1)
| CompUnit::DependencySpecification.new(short-name => "NativeCall::Compiler:...
> 
>>> LOADING EVAL_4
+ EVAL_4 (1 - 1)
| CompUnit::DependencySpecification.new(short-name => "NativeCall::Compiler:...
> 
+ Exception Thrown
| Died
+ debugger_native.p6 (5 - 9)
| sub hello() is native('hello') { * }
| 
| sub MAIN() {
|     hello;
| }
> 
+ debugger_native.p6 (6 - 10)
| 
| sub MAIN() {
|     hello;
| }
| 
> 
+ Exception Thrown
| Died
+ debugger_native.p6 (6 - 10)
| 
| sub MAIN() {
|     hello;
| }
| 
> 
+ Exception Thrown
| Died
+ debugger_native.p6 (6 - 10)
| 
| sub MAIN() {
|     hello;
| }
| 
> 
+ Exception Thrown
| Died
+ debugger_native.p6 (6 - 10)
| 
| sub MAIN() {
|     hello;
| }
| 
> 
Hello from C!

Environment

  • Operating system: openSUSE Tumbleweed
  • Compiler version (perl6 -v): This is Rakudo version 2018.12 built on MoarVM version 2018.12 implementing Perl 6.d.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant