https://github.com/basiliscos/p5-gdb-bt
get backtraces from perl5 coredump
https://github.com/basiliscos/p5-gdb-bt
Last synced: 2 months ago
JSON representation
get backtraces from perl5 coredump
- Host: GitHub
- URL: https://github.com/basiliscos/p5-gdb-bt
- Owner: basiliscos
- Created: 2020-08-20T16:18:51.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2020-08-21T10:26:12.000Z (almost 5 years ago)
- Last Synced: 2025-01-18T04:31:45.581Z (4 months ago)
- Language: Python
- Size: 3.91 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: Changes
Awesome Lists containing this project
README
# NAME
GDB::bt - Get perl backtraces from coredump files
# SYNOPSIS
$ gdb-bt.pl core.17373
Reading symbols from perl...
[New LWP 17373]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
Core was generated by `rpc '.
Program terminated with signal SIGABRT, Aborted.
#0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
50../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
Perl version = 32 ' '
[0] 0x5597599303b2 "lib/Panda/XServer/RPC/Async/WClientImpl.pm":119
[1] 0x5597599303b2 "lib/Panda/XServer/RPC/Async/WClientImpl.pm":63
[2] 0x559757a89492 "lib/Panda/XServer/RPC/WClientImpl.pm":162
[3] 0x559757a89492 "lib/Panda/XServer/RPC/WClientImpl.pm":106
[4] 0x5597560d1e12 "t/03-xserver/01-rpc-async.t":35
[5] 0x5597575113f2 "lib/Panda/Timer.pm":48
[6] 0x559756ca0c42 "/home/b/development/crazy-panda/core-dev/t/lib/Panda/TestEnvironment.pm":192
[7] 0x559756ca0c42 "/home/b/development/crazy-panda/core-dev/t/lib/Panda/TestEnvironment.pm":192
[8] 0x5597560d1e12 "t/03-xserver/01-rpc-async.t":56# DESCRIPTION
If your perl program segfaults you can easily extract `C` backtraces, however perl bactraces are
not available. Usually you can _guess_ correctly them (e.g. from logs), but that takes time
and it is error-prone. The proposed script solves at least partially solves the problem.The script target audience is: XS-modules writers and bug-reporters (for perl core and XS-modules).
# LIMITATIONS
Currently it was tested on the following configurations:
- 5.30 (non threaded, linux)
- 5.32 (non-threaded, linux)If it works on your perl and it is not listed here, please, let us know.
# INTERNALS
The main script is written in Python, as gdb out of the box has official Python-bindings.
To extend it, you should look a the perl sources somewhere around `pp_ctl.c / caller_cx`
and duplicate the code in the Python script. Yes, you have to expand all perl macroses,
undocumented perl internals etc., to let it work. There is no other way.# AUTHOR
Ivan Baidakou , Crazy Panda LTD
# LICENSE
You may distribute this code under the same terms as Perl itself.