Skip to content

Instantly share code, notes, and snippets.

@jtreminio
Last active December 21, 2015 07:18
Show Gist options
  • Save jtreminio/6269889 to your computer and use it in GitHub Desktop.
Save jtreminio/6269889 to your computer and use it in GitHub Desktop.
/usr/bin/xdebug
===========
#!/bin/bash
XDEBUG_CONFIG="idekey=xdebug" php -dxdebug.remote_host=`echo $SSH_CLIENT | cut -d "=" -f 2 | awk '{print $1}'` "$@"
----------
execve("/usr/bin/xdebug", ["xdebug", "index.php"], [/* 18 vars */]) = 0
brk(0) = 0x14fc000
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) = 0x7faef7df8000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=20514, ...}) = 0
mmap(NULL, 20514, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7faef7df2000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libtinfo.so.5", O_RDONLY) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\300\323\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=167952, ...}) = 0
mmap(NULL, 2264608, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7faef79b2000
mprotect(0x7faef79d7000, 2093056, PROT_NONE) = 0
mmap(0x7faef7bd6000, 20480, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x24000) = 0x7faef7bd6000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libdl.so.2", O_RDONLY) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\340\r\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=14768, ...}) = 0
mmap(NULL, 2109696, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7faef77ae000
mprotect(0x7faef77b0000, 2097152, PROT_NONE) = 0
mmap(0x7faef79b0000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2000) = 0x7faef79b0000
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) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\300\357\1\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=1595408, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7faef7df1000
mmap(NULL, 3709016, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7faef7424000
mprotect(0x7faef75a4000, 2097152, PROT_NONE) = 0
mmap(0x7faef77a4000, 20480, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x180000) = 0x7faef77a4000
mmap(0x7faef77a9000, 18520, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7faef77a9000
close(3) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7faef7df0000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7faef7def000
arch_prctl(ARCH_SET_FS, 0x7faef7df0700) = 0
mprotect(0x7faef77a4000, 16384, PROT_READ) = 0
mprotect(0x7faef79b0000, 4096, PROT_READ) = 0
mprotect(0x7faef7bd6000, 16384, PROT_READ) = 0
mprotect(0x6e4000, 4096, PROT_READ) = 0
mprotect(0x7faef7dfa000, 4096, PROT_READ) = 0
munmap(0x7faef7df2000, 20514) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
open("/dev/tty", O_RDWR|O_NONBLOCK) = 3
close(3) = 0
open("/usr/lib/locale/locale-archive", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=348672, ...}) = 0
mmap(NULL, 348672, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7faef7d99000
close(3) = 0
brk(0) = 0x14fc000
brk(0x14fd000) = 0x14fd000
brk(0x14fe000) = 0x14fe000
brk(0x14ff000) = 0x14ff000
getuid() = 1000
getgid() = 1000
geteuid() = 1000
getegid() = 1000
rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
time(NULL) = 1376923196
brk(0x1500000) = 0x1500000
open("/proc/meminfo", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7faef7df7000
read(3, "MemTotal: 766920 kB\nMemF"..., 1024) = 1024
close(3) = 0
munmap(0x7faef7df7000, 4096) = 0
brk(0x1501000) = 0x1501000
rt_sigaction(SIGCHLD, {SIG_DFL, [], SA_RESTORER|SA_RESTART, 0x7faef74564f0}, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGCHLD, {SIG_DFL, [], SA_RESTORER|SA_RESTART, 0x7faef74564f0}, {SIG_DFL, [], SA_RESTORER|SA_RESTART, 0x7faef74564f0}, 8) = 0
rt_sigaction(SIGINT, {SIG_DFL, [], SA_RESTORER, 0x7faef74564f0}, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGINT, {SIG_DFL, [], SA_RESTORER, 0x7faef74564f0}, {SIG_DFL, [], SA_RESTORER, 0x7faef74564f0}, 8) = 0
rt_sigaction(SIGQUIT, {SIG_DFL, [], SA_RESTORER, 0x7faef74564f0}, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGQUIT, {SIG_DFL, [], SA_RESTORER, 0x7faef74564f0}, {SIG_DFL, [], SA_RESTORER, 0x7faef74564f0}, 8) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
rt_sigaction(SIGQUIT, {SIG_IGN, [], SA_RESTORER, 0x7faef74564f0}, {SIG_DFL, [], SA_RESTORER, 0x7faef74564f0}, 8) = 0
uname({sys="Linux", node="debian-70rc1-x64-vbox4210", ...}) = 0
brk(0x1502000) = 0x1502000
brk(0x1503000) = 0x1503000
stat("/var/www/puphpet/puphpet.com/web", {st_mode=S_IFDIR|0755, st_size=170, ...}) = 0
stat(".", {st_mode=S_IFDIR|0755, st_size=170, ...}) = 0
getpid() = 3986
getppid() = 3985
brk(0x1504000) = 0x1504000
brk(0x1505000) = 0x1505000
getpgrp() = 3985
rt_sigaction(SIGCHLD, {0x4463b0, [], SA_RESTORER|SA_RESTART, 0x7faef74564f0}, {SIG_DFL, [], SA_RESTORER|SA_RESTART, 0x7faef74564f0}, 8) = 0
getrlimit(RLIMIT_NPROC, {rlim_cur=5894, rlim_max=5894}) = 0
brk(0x1506000) = 0x1506000
brk(0x1507000) = 0x1507000
rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
open("/usr/bin/xdebug", O_RDONLY) = 3
ioctl(3, SNDCTL_TMR_TIMEBASE or TCGETS, 0x7fff3d7bd240) = -1 ENOTTY (Inappropriate ioctl for device)
lseek(3, 0, SEEK_CUR) = 0
read(3, "#!/bin/bash\nXDEBUG_CONFIG=\"ideke"..., 80) = 80
lseek(3, 0, SEEK_SET) = 0
getrlimit(RLIMIT_NOFILE, {rlim_cur=1024, rlim_max=4*1024}) = 0
fcntl(255, F_GETFD) = -1 EBADF (Bad file descriptor)
dup2(3, 255) = 255
close(3) = 0
fcntl(255, F_SETFD, FD_CLOEXEC) = 0
fcntl(255, F_GETFL) = 0x8000 (flags O_RDONLY|O_LARGEFILE)
fstat(255, {st_mode=S_IFREG|0755, st_size=128, ...}) = 0
lseek(255, 0, SEEK_CUR) = 0
brk(0x1508000) = 0x1508000
rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
read(255, "#!/bin/bash\nXDEBUG_CONFIG=\"ideke"..., 128) = 128
open("/usr/lib/x86_64-linux-gnu/gconv/gconv-modules.cache", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=26066, ...}) = 0
mmap(NULL, 26066, PROT_READ, MAP_SHARED, 3, 0) = 0x7faef7d92000
close(3) = 0
open("/usr/lib/x86_64-linux-gnu/gconv/ISO8859-1.so", O_RDONLY) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\320\4\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=10272, ...}) = 0
mmap(NULL, 2105392, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7faef7221000
mprotect(0x7faef7223000, 2093056, PROT_NONE) = 0
mmap(0x7faef7422000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7faef7422000
close(3) = 0
mprotect(0x7faef7422000, 4096, PROT_READ) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
brk(0x1509000) = 0x1509000
pipe([3, 4]) = 0
rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
rt_sigprocmask(SIG_BLOCK, [INT CHLD], [], 8) = 0
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7faef7df09d0) = 3987
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
rt_sigaction(SIGCHLD, {0x4463b0, [], SA_RESTORER|SA_RESTART, 0x7faef74564f0}, {0x4463b0, [], SA_RESTORER|SA_RESTART, 0x7faef74564f0}, 8) = 0
close(4) = 0
read(3, "10.0.2.2\n", 128) = 9
read(3, "", 128) = 0
--- SIGCHLD (Child exited) @ 0 (0) ---
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], WNOHANG, NULL) = 3987
wait4(-1, 0x7fff3d7bc918, WNOHANG, NULL) = -1 ECHILD (No child processes)
rt_sigreturn(0) = 0
close(3) = 0
rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0
rt_sigaction(SIGINT, {0x443910, [], SA_RESTORER, 0x7faef74564f0}, {SIG_DFL, [], SA_RESTORER, 0x7faef74564f0}, 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
rt_sigaction(SIGINT, {SIG_DFL, [], SA_RESTORER, 0x7faef74564f0}, {0x443910, [], SA_RESTORER, 0x7faef74564f0}, 8) = 0
stat(".", {st_mode=S_IFDIR|0755, st_size=170, ...}) = 0
stat("/usr/local/bin/php", 0x7fff3d7bcef0) = -1 ENOENT (No such file or directory)
stat("/usr/bin/php", {st_mode=S_IFREG|0755, st_size=8924296, ...}) = 0
stat("/usr/bin/php", {st_mode=S_IFREG|0755, st_size=8924296, ...}) = 0
geteuid() = 1000
getegid() = 1000
getuid() = 1000
getgid() = 1000
access("/usr/bin/php", X_OK) = 0
stat("/usr/bin/php", {st_mode=S_IFREG|0755, st_size=8924296, ...}) = 0
geteuid() = 1000
getegid() = 1000
getuid() = 1000
getgid() = 1000
access("/usr/bin/php", R_OK) = 0
stat("/usr/bin/php", {st_mode=S_IFREG|0755, st_size=8924296, ...}) = 0
stat("/usr/bin/php", {st_mode=S_IFREG|0755, st_size=8924296, ...}) = 0
geteuid() = 1000
getegid() = 1000
getuid() = 1000
getgid() = 1000
access("/usr/bin/php", X_OK) = 0
stat("/usr/bin/php", {st_mode=S_IFREG|0755, st_size=8924296, ...}) = 0
geteuid() = 1000
getegid() = 1000
getuid() = 1000
getgid() = 1000
access("/usr/bin/php", R_OK) = 0
brk(0x150a000) = 0x150a000
rt_sigprocmask(SIG_BLOCK, [INT CHLD], [], 8) = 0
rt_sigprocmask(SIG_BLOCK, [CHLD], [INT CHLD], 8) = 0
rt_sigprocmask(SIG_SETMASK, [INT CHLD], NULL, 8) = 0
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7faef7df09d0) = 3991
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0
rt_sigaction(SIGINT, {0x443910, [], SA_RESTORER, 0x7faef74564f0}, {SIG_DFL, [], SA_RESTORER, 0x7faef74564f0}, 8) = 0
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 3991
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
--- SIGCHLD (Child exited) @ 0 (0) ---
wait4(-1, 0x7fff3d7bcb98, WNOHANG, NULL) = -1 ECHILD (No child processes)
rt_sigreturn(0xffffffffffffffff) = 0
rt_sigaction(SIGINT, {SIG_DFL, [], SA_RESTORER, 0x7faef74564f0}, {0x443910, [], SA_RESTORER, 0x7faef74564f0}, 8) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
read(255, "", 128) = 0
exit_group(0) = ?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment