You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I tried to use uftrace 0.16 in project I noticed that it does not work on binaries linked with mold. It works fine when linking with gold in the same environment, so I've tried to make a minimal example for you.
I attached an archive with a Dockerfile and a couple of shell scripts for your convinience. uftrace-mold.tar.gz
Here is a short overview:
Extract contents somewhere and cd into directory
Use ./build-image.sh to build image (then ./remove-image.sh later to clean up your environment)
Use ./in-container.sh <COMMAND> to run command inside container as if your working directory is project (For example ./in-container.sh make <TARGET>)
See project/Makefile to learn and edit compile command and uftrace record command
Use ./in-container.sh make record to compile a simple hello world executable and run uftrace record on it
See project/output directory to find uftrace log file and uftrace.data directory
Instead of getting "Hello world!" message in stdout when running ./in-container.sh make record, uftrace exits with code 2 and uftrace.log contains this message: WARN: child terminated by signal: 5: Trace/breakpoint trap
Environment:
uftrace 0.16
gcc 13.2
mold 2.33.0
Thanks for the great tool. It is very helpful and convinient!
The text was updated successfully, but these errors were encountered:
Thanks for the report. I've never tried mold linker by myself yet, but it looks like a cool project. I'll take a look what difference it caused the trouble.
Hello!
When I tried to use
uftrace 0.16
in project I noticed that it does not work on binaries linked withmold
. It works fine when linking withgold
in the same environment, so I've tried to make a minimal example for you.I attached an archive with a
Dockerfile
and a couple of shell scripts for your convinience.uftrace-mold.tar.gz
Here is a short overview:
cd
into directory./build-image.sh
to build image (then./remove-image.sh
later to clean up your environment)./in-container.sh <COMMAND>
to run command inside container as if your working directory isproject
(For example./in-container.sh make <TARGET>
)project/Makefile
to learn and edit compile command anduftrace record
command./in-container.sh make record
to compile a simple hello world executable and runuftrace record
on itproject/output
directory to finduftrace
log file anduftrace.data
directoryInstead of getting "Hello world!" message in stdout when running
./in-container.sh make record
,uftrace
exits with code 2 anduftrace.log
contains this message:WARN: child terminated by signal: 5: Trace/breakpoint trap
Environment:
uftrace 0.16
gcc 13.2
mold 2.33.0
Thanks for the great tool. It is very helpful and convinient!
The text was updated successfully, but these errors were encountered: