Skip to content

Instantly share code, notes, and snippets.

@MasterDuke17
Created January 6, 2022 14:37
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 MasterDuke17/3be850a8367c562788ee8e42735e0e25 to your computer and use it in GitHub Desktop.
Save MasterDuke17/3be850a8367c562788ee8e42735e0e25 to your computer and use it in GitHub Desktop.
[dan@alexandria perl6]$ gdb --args ./install/bin/raku -e 'use nqp; say nqp::can(::(1), "chars")'
GNU gdb (GDB) 11.1
Copyright (C) 2021 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./install/bin/raku...
(gdb) b MVM_exception_throw_adhoc
Function "MVM_exception_throw_adhoc" not defined.
Make breakpoint pending on future shared library load? (y or [n]) y
Breakpoint 1 (MVM_exception_throw_adhoc) pending.
(gdb) r
Starting program: /home/dan/Source/perl6/install/bin/raku -e use\ nqp\;\ say\ nqp::can\(::\(1\),\ \"chars\"\)
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
[New Thread 0x7ffff718a640 (LWP 658279)]
Thread 1 "raku" hit Breakpoint 1, MVM_exception_throw_adhoc (tc=0x38808030080, messageFormat=messageFormat@entry=0x7ffff798b2c8 "getexmessage needs a VMException, got %s (%s)") at src/core/exceptions.c:882
882 MVM_NO_RETURN void MVM_exception_throw_adhoc(MVMThreadContext *tc, const char *messageFormat, ...) {
(gdb) bt
#0 MVM_exception_throw_adhoc (tc=0x38808030080, messageFormat=messageFormat@entry=0x7ffff798b2c8 "getexmessage needs a VMException, got %s (%s)") at src/core/exceptions.c:882
#1 0x00007ffff77f407e in MVM_get_exception_message (tc=<optimized out>, ex=<optimized out>) at src/core/exceptions.c:1017
#2 0x00007ffff78077c0 in MVM_interp_run (tc=0x38808030080, initial_invoke=0x7ffff798b2c8, initial_invoke@entry=0x7ffff7936c90 <toplevel_initial_invoke>, invoke_data=0x7ffff798b2c8,
invoke_data@entry=0x7ffff7936c90 <toplevel_initial_invoke>, outer_runloop=0x38808964300, outer_runloop@entry=0x0) at src/core/interp.c:1182
#3 0x00007ffff7937db5 in MVM_vm_run_file (instance=instance@entry=0x38808020000, filename=filename@entry=0x555555559520 "/home/dan/Source/perl6/install/share/perl6/runtime/perl6.moarvm") at src/moar.c:505
#4 0x00005555555557d8 in main (argc=<optimized out>, argv=0x7fffffffe3a8) at src/vm/moar/runner/main.c:474
(gdb) call MVM_dump_backtrace(tc)
at src/vm/moar/ModuleLoader.nqp:57 (/home/dan/Source/perl6/install/share/nqp/lib/ModuleLoader.moarvm:)
from gen/moar/stage2/NQPCORE.setting:1704 (/home/dan/Source/perl6/install/share/nqp/lib/NQPCORE.setting.moarvm:join)
from gen/moar/World.nqp:5121 (/home/dan/Source/perl6/install/share/perl6/lib/Perl6/World.moarvm:find_symbol)
from gen/moar/World.nqp:4898 (/home/dan/Source/perl6/install/share/perl6/lib/Perl6/World.moarvm:is_type)
from gen/moar/Grammar.nqp:3157 (/home/dan/Source/perl6/install/share/perl6/lib/Perl6/Grammar.moarvm:term:sym<name>)
from gen/moar/stage2/QRegex.nqp:1704 (/home/dan/Source/perl6/install/share/nqp/lib/QRegex.moarvm:!protoregex)
from <unknown>:1 (/home/dan/Source/perl6/install/share/perl6/lib/Perl6/Grammar.moarvm:term)
from gen/moar/Grammar.nqp:3711 (/home/dan/Source/perl6/install/share/perl6/lib/Perl6/Grammar.moarvm:termish)
from gen/moar/stage2/NQPHLL.nqp:1249 (/home/dan/Source/perl6/install/share/nqp/lib/NQPHLL.moarvm:EXPR)
from gen/moar/Grammar.nqp:3754 (/home/dan/Source/perl6/install/share/perl6/lib/Perl6/Grammar.moarvm:EXPR)
from <unknown>:1 (/home/dan/Source/perl6/install/share/perl6/lib/Perl6/Grammar.moarvm:arglist)
from <unknown>:1 (/home/dan/Source/perl6/install/share/perl6/lib/Perl6/Grammar.moarvm:semiarglist)
from <unknown>:1 (/home/dan/Source/perl6/install/share/perl6/lib/Perl6/Grammar.moarvm:args)
from <unknown>:1 (/home/dan/Source/perl6/install/share/perl6/lib/Perl6/Grammar.moarvm:term:sym<nqp::op>)
from gen/moar/stage2/QRegex.nqp:1704 (/home/dan/Source/perl6/install/share/nqp/lib/QRegex.moarvm:!protoregex)
from <unknown>:1 (/home/dan/Source/perl6/install/share/perl6/lib/Perl6/Grammar.moarvm:term)
from gen/moar/Grammar.nqp:3711 (/home/dan/Source/perl6/install/share/perl6/lib/Perl6/Grammar.moarvm:termish)
from gen/moar/stage2/NQPHLL.nqp:1249 (/home/dan/Source/perl6/install/share/nqp/lib/NQPHLL.moarvm:EXPR)
from gen/moar/Grammar.nqp:3754 (/home/dan/Source/perl6/install/share/perl6/lib/Perl6/Grammar.moarvm:EXPR)
from <unknown>:1 (/home/dan/Source/perl6/install/share/perl6/lib/Perl6/Grammar.moarvm:arglist)
from <unknown>:1 (/home/dan/Source/perl6/install/share/perl6/lib/Perl6/Grammar.moarvm:args)
from gen/moar/Grammar.nqp:3183 (/home/dan/Source/perl6/install/share/perl6/lib/Perl6/Grammar.moarvm:term:sym<name>)
from gen/moar/stage2/QRegex.nqp:1704 (/home/dan/Source/perl6/install/share/nqp/lib/QRegex.moarvm:!protoregex)
from <unknown>:1 (/home/dan/Source/perl6/install/share/perl6/lib/Perl6/Grammar.moarvm:term)
from gen/moar/Grammar.nqp:3711 (/home/dan/Source/perl6/install/share/perl6/lib/Perl6/Grammar.moarvm:termish)
from gen/moar/stage2/NQPHLL.nqp:1249 (/home/dan/Source/perl6/install/share/nqp/lib/NQPHLL.moarvm:EXPR)
from gen/moar/Grammar.nqp:3754 (/home/dan/Source/perl6/install/share/perl6/lib/Perl6/Grammar.moarvm:EXPR)
from gen/moar/Grammar.nqp:962 (/home/dan/Source/perl6/install/share/perl6/lib/Perl6/Grammar.moarvm:statement)
from gen/moar/Grammar.nqp:890 (/home/dan/Source/perl6/install/share/perl6/lib/Perl6/Grammar.moarvm:statementlist)
from gen/moar/stage2/NQPHLL.nqp:1471 (/home/dan/Source/perl6/install/share/nqp/lib/NQPHLL.moarvm:LANG)
from gen/moar/Grammar.nqp:1342 (/home/dan/Source/perl6/install/share/perl6/lib/Perl6/Grammar.moarvm:FOREIGN_LANG)
from gen/moar/Grammar.nqp:838 (/home/dan/Source/perl6/install/share/perl6/lib/Perl6/Grammar.moarvm:comp_unit)
from gen/moar/Grammar.nqp:553 (/home/dan/Source/perl6/install/share/perl6/lib/Perl6/Grammar.moarvm:TOP)
from gen/moar/stage2/QRegex.nqp:2267 (/home/dan/Source/perl6/install/share/nqp/lib/QRegex.moarvm:parse)
from gen/moar/stage2/NQPHLL.nqp:2301 (/home/dan/Source/perl6/install/share/nqp/lib/NQPHLL.moarvm:parse)
from gen/moar/stage2/NQPHLL.nqp:2217 (/home/dan/Source/perl6/install/share/nqp/lib/NQPHLL.moarvm:execute_stage)
from gen/moar/stage2/NQPHLL.nqp:2252 (/home/dan/Source/perl6/install/share/nqp/lib/NQPHLL.moarvm:run)
from gen/moar/stage2/NQPHLL.nqp:2248 (/home/dan/Source/perl6/install/share/nqp/lib/NQPHLL.moarvm:)
from gen/moar/stage2/NQPHLL.nqp:2244 (/home/dan/Source/perl6/install/share/nqp/lib/NQPHLL.moarvm:compile)
from gen/moar/stage2/NQPHLL.nqp:1919 (/home/dan/Source/perl6/install/share/nqp/lib/NQPHLL.moarvm:eval)
from gen/moar/stage2/NQPHLL.nqp:2059 (/home/dan/Source/perl6/install/share/nqp/lib/NQPHLL.moarvm:)
from gen/moar/stage2/NQPHLL.nqp:2058 (/home/dan/Source/perl6/install/share/nqp/lib/NQPHLL.moarvm:command_eval)
from gen/moar/Compiler.nqp:111 (/home/dan/Source/perl6/install/share/perl6/lib/Perl6/Compiler.moarvm:command_eval)
from gen/moar/stage2/NQPHLL.nqp:2039 (/home/dan/Source/perl6/install/share/nqp/lib/NQPHLL.moarvm:command_line)
from gen/moar/rakudo.nqp:140 (/home/dan/Source/perl6/install/share/perl6/runtime/perl6.moarvm:MAIN)
from gen/moar/rakudo.nqp:1 (/home/dan/Source/perl6/install/share/perl6/runtime/perl6.moarvm:<mainline>)
from <unknown>:1 (/home/dan/Source/perl6/install/share/perl6/runtime/perl6.moarvm:<main>)
from <unknown>:1 (/home/dan/Source/perl6/install/share/perl6/runtime/perl6.moarvm:<entry>)
(gdb)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment