-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Original source: https://github.com/JonathonReinhart/staticx/wiki/Troubleshooting
- Loading branch information
1 parent
0bf64c7
commit 4c3d7c6
Showing
2 changed files
with
46 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,4 +11,5 @@ anywhere, just like a static executable. | |
introduction | ||
installation | ||
usage | ||
troubleshooting | ||
changelog |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
Troubleshooting | ||
=============== | ||
|
||
StaticX has to do some weird things in order to work. Thus, you might run into | ||
trouble. | ||
|
||
Run-time problems | ||
----------------- | ||
If, after bundling an application using StaticX, the resulting executable is | ||
crashing due to symbol issues or segfaults: | ||
|
||
Debug build | ||
~~~~~~~~~~~ | ||
The first step is to use the ``--debug`` flag when bundling:: | ||
|
||
$ staticx --debug myprog myprog.sx | ||
|
||
This option will: | ||
|
||
- Set loglevel to ``DEBUG`` while building the program | ||
- Use a debug variant of the bootloader which: | ||
|
||
- Adds debug output (to stderr) | ||
- Includes DWARF debug info | ||
|
||
.. note:: | ||
|
||
Please include all debugging information if you open an issue. | ||
|
||
|
||
GDB | ||
~~~ | ||
If your program segfaults, you can run it under GDB. | ||
|
||
Before giving the ``r`` command to run your program, use | ||
``set follow-fork-mode child`` so GDB | ||
`follows the child process <https://sourceware.org/gdb/onlinedocs/gdb/Forks.html>`_. | ||
|
||
To get a backtrace:: | ||
|
||
$ gdb --args ./myprog.sx | ||
set follow-fork-mode child | ||
r | ||
(segfault) | ||
bt -full |