Skip to content

Instantly share code, notes, and snippets.

@dogbert17
Last active March 5, 2017 18:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dogbert17/8b285d91d6d9754a5afd947ebe30452f to your computer and use it in GitHub Desktop.
Save dogbert17/8b285d91d6d9754a5afd947ebe30452f to your computer and use it in GitHub Desktop.
my $prog = Proc::Async.new(:w, 'hexdump17', '-C'); # hexdump17 does not exist
my $promise = $prog.start;
await $prog.write(Buf.new(12, 42));
$prog.close-stdin;
await $promise;
calling the above script scratch.pl6 and running it through gdb
dogbert@dogbert-VirtualBox ~ $ perl6-gdb-m scratch.pl6
================================================================================================
This is Rakudo Perl 6 running in the GNU debugger, which often allows the user to generate useful back-
traces to debug or report issues in Rakudo, the MoarVM backend or the currently running code.
This Rakudo version is 2017.02.167.ge.114.d.5204 built on MoarVM version 2017.02.18.g.5.f.9.d.6985,
running on ubuntu (14.04.3.LTS.Trusty.Tahr) / linux (3.19.0.32.generic)
Type `bt full` to generate a backtrace if applicable, type `q` to quit or `help` for help.
------------------------------------------------------------------------------------------------
Reading symbols from /home/dogbert/.rakudobrew/moar-nom/install/bin/moar...(no debugging symbols found)...done.
Starting program: /home/dogbert/.rakudobrew/moar-nom/install/bin/moar --execname=/home/dogbert/.rakudobrew/bin/../moar-nom/install/bin/perl6-gdb-m --libpath=/home/dogbert/.rakudobrew/moar-nom/install/share/nqp/lib --libpath=/home/dogbert/.rakudobrew/moar-nom/install/share/perl6/lib --libpath=/home/dogbert/.rakudobrew/moar-nom/install/share/perl6/runtime /home/dogbert/.rakudobrew/moar-nom/install/share/perl6/runtime/perl6.moarvm scratch.pl6
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/i386-linux-gnu/libthread_db.so.1".
[New Thread 0xb5dd5b40 (LWP 22530)]
[New Thread 0xb4ffeb40 (LWP 22531)]
[New Thread 0xb3ffeb40 (LWP 22533)]
Program received signal SIGPIPE, Broken pipe.
[Switching to Thread 0xb4ffeb40 (LWP 22531)]
0xb7fdccb0 in ?? ()
(gdb) c
Continuing.
Tried to get the result of a broken Promise
in block <unit> at scratch.pl6 line 3
Original exception:
Died with X::AdHoc+{X::Promise::Broken}
in block <unit> at scratch.pl6 line 3
[Thread 0xb3ffeb40 (LWP 22533) exited]
[Thread 0xb4ffeb40 (LWP 22531) exited]
[Thread 0xb5dd5b40 (LWP 22530) exited]
[Inferior 1 (process 22526) exited with code 01]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment