libunwind-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Libunwind-devel] Fwd: question about compiling test-ptrace.c


From: hai huang
Subject: [Libunwind-devel] Fwd: question about compiling test-ptrace.c
Date: Fri, 23 Jun 2017 11:00:47 -0400

Just saw that I should post these types of questions to the mailing list and cc David. If anyone can help, I'd really appreciate it. Thanks!

-
Hai

---------- Forwarded message ----------
From: hai huang <address@hidden>
Date: Fri, Jun 23, 2017 at 10:36 AM
Subject: question about compiling test-ptrace.c
To: address@hidden


Hi David,

I'm trying out libunwind in the context of a ptrace'd process. After downloading, compiling, and installing the libunwind library from git, I tried to compile tests/test-ptrace.c using the following command:

cd tests
gcc -I../include -lunwind-ptrace -lunwind-generic -lunwind -o test-ptrace test-ptrace.c

The instructions here: http://www.nongnu.org/libunwind/man/libunwind-ptrace(3).html, indicates that's all it's to it. However, I'm getting the following compile error:

/tmp/ccsrDTfR.o: In function `do_backtrace':
test-ptrace.c:(.text+0x4b): undefined reference to `_Ux86_64_init_remote'
test-ptrace.c:(.text+0xa3): undefined reference to `_Ux86_64_get_reg'
test-ptrace.c:(.text+0xcd): undefined reference to `_Ux86_64_get_reg'
test-ptrace.c:(.text+0x157): undefined reference to `_Ux86_64_get_proc_name'
test-ptrace.c:(.text+0x215): undefined reference to `_Ux86_64_get_proc_info'
test-ptrace.c:(.text+0x2ca): undefined reference to `_Ux86_64_step'
test-ptrace.c:(.text+0x2f4): undefined reference to `_Ux86_64_get_reg'
/tmp/ccsrDTfR.o: In function `main':
test-ptrace.c:(.text+0x480): undefined reference to `_UPT_accessors'
test-ptrace.c:(.text+0x485): undefined reference to `_Ux86_64_create_addr_space'
test-ptrace.c:(.text+0x62b): undefined reference to `_Ux86_64_set_caching_policy'
test-ptrace.c:(.text+0x7d5): undefined reference to `_UPT_create'
test-ptrace.c:(.text+0xbf0): undefined reference to `_UPT_destroy'
test-ptrace.c:(.text+0xbff): undefined reference to `_Ux86_64_destroy_addr_space'

I've replaced `-lunwind-generic` with `-lunwind-x86_64` since I'm on this arch, and I'm still getting the same error message. Any ideas? Thanks!

-
Hai Huang


reply via email to

[Prev in Thread] Current Thread [Next in Thread]