回复 2楼 烟雨晨曦
程序代码:
execve("./test", ["./test"], [/* 83 vars */]) = 0
brk(0) = 0x66f000
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fd0a490e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
open("/home/qianyang/catkin_ws/devel/lib/tls/x86_64/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/home/qianyang/catkin_ws/devel/lib/tls/x86_64", 0x7ffd1bd47ce0) = -1 ENOENT (No such file or directory)
open("/home/qianyang/catkin_ws/devel/lib/tls/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/home/qianyang/catkin_ws/devel/lib/tls", 0x7ffd1bd47ce0) = -1 ENOENT (No such file or directory)
open("/home/qianyang/catkin_ws/devel/lib/x86_64/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/home/qianyang/catkin_ws/devel/lib/x86_64", 0x7ffd1bd47ce0) = -1 ENOENT (No such file or directory)
open("/home/qianyang/catkin_ws/devel/lib/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/home/qianyang/catkin_ws/devel/lib", {st_mode=S_IFDIR|0775, st_size=4096, ...}) = 0
open("/opt/ros/indigo/lib/tls/x86_64/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/opt/ros/indigo/lib/tls/x86_64", 0x7ffd1bd47ce0) = -1 ENOENT (No such file or directory)
open("/opt/ros/indigo/lib/tls/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/opt/ros/indigo/lib/tls", 0x7ffd1bd47ce0) = -1 ENOENT (No such file or directory)
open("/opt/ros/indigo/lib/x86_64/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/opt/ros/indigo/lib/x86_64", 0x7ffd1bd47ce0) = -1 ENOENT (No such file or directory)
open("/opt/ros/indigo/lib/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/opt/ros/indigo/lib", {st_mode=S_IFDIR|0755, st_size=20480, ...}) = 0
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=164111, ...}) = 0
mmap(NULL, 164111, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fd0a48e5000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P \2\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=1853216, ...}) = 0
mmap(NULL, 3961536, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fd0a4326000
mprotect(0x7fd0a44e4000, 2093056, PROT_NONE) = 0
mmap(0x7fd0a46e3000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1bd000) = 0x7fd0a46e3000
mmap(0x7fd0a46e9000, 17088, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fd0a46e9000
close(3) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fd0a48e4000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fd0a48e2000
arch_prctl(ARCH_SET_FS, 0x7fd0a48e2740) = 0
mprotect(0x7fd0a46e3000, 16384, PROT_READ) = 0
mprotect(0x600000, 4096, PROT_READ) = 0
mprotect(0x7fd0a4910000, 4096, PROT_READ) = 0
munmap(0x7fd0a48e5000, 164111) = 0
fstat(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 1), ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fd0a490d000
write(1, "\n", 1
) = 1
open("/dev/charMsgDriver", O_RDWR) = -1 ENOENT (No such file or directory)
dup(2) = 3
fcntl(3, F_GETFL) = 0x8002 (flags O_RDWR|O_LARGEFILE)
brk(0) = 0x66f000
brk(0x690000) = 0x690000
fstat(3, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 1), ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fd0a490c000
lseek(3, 0, SEEK_CUR) = -1 ESPIPE (Illegal seek)
write(3, "failed to open charMsgDriver dev"..., 37failed to open charMsgDriver device.
) = 37
write(3, ": No such file or directory\n", 28: No such file or directory
) = 28
close(3) = 0
munmap(0x7fd0a490c000, 4096) = 0
exit_group(2) = ?
+++ exited with 2 +++