v2pro / koala Goto Github PK
View Code? Open in Web Editor NEWin-process hook integrates legacy applications into v2pro stack transparently
License: Apache License 2.0
in-process hook integrates legacy applications into v2pro stack transparently
License: Apache License 2.0
/go/src/github.com/didi/rdebug/koala # ./build.sh recorder
+++ dirname ./build.sh
++ cd ../.
++ pwd -P
+ RDEBUG=/go/src/github.com/didi/rdebug
+ case $1 in
+ export GOPATH=/tmp/build-golang
+ GOPATH=/tmp/build-golang
+ export 'CGO_CFLAGS=-DKOALA_LIBC_NETWORK_HOOK -DKOALA_LIBC_FILE_HOOK'
+ CGO_CFLAGS='-DKOALA_LIBC_NETWORK_HOOK -DKOALA_LIBC_FILE_HOOK'
+ export 'CGO_CPPFLAGS=-DKOALA_LIBC_NETWORK_HOOK -DKOALA_LIBC_FILE_HOOK'
+ CGO_CPPFLAGS='-DKOALA_LIBC_NETWORK_HOOK -DKOALA_LIBC_FILE_HOOK'
+ export 'CGO_CXXFLAGS=-std=c++11 -Wno-ignored-attributes'
+ CGO_CXXFLAGS='-std=c++11 -Wno-ignored-attributes'
+ exec go build -tags=koala_recorder -buildmode=c-shared -o /go/src/github.com/didi/rdebug/output/libs/koala-recorder.so github.com/didi/rdebug/koala/cmd/recorder
# github.com/didi/rdebug/koala/gateway/gw4libc
In file included from file_hook.cpp:11:
file_hook.cpp:73:11: error: redefinition of 'template<class ... Args> decltype (fopen(real::fopen::args ...)) real::fopen(Args ...)'
INTERPOSE(fopen)(const char *filename, const char *opentype) {
^~~~~
interpose.h:38:10: note: in definition of macro 'INTERPOSE'
auto NAME(Args... args) -> decltype(::NAME(args...)) { \
^~~~
file_hook.cpp:19:11: note: 'template<class ... Args> decltype (fopen(real::fopen::args ...)) real::fopen(Args ...)' previously declared here
INTERPOSE(fopen64)(const char *filename, const char *opentype) {
^~~~~~~
interpose.h:38:10: note: in definition of macro 'INTERPOSE'
auto NAME(Args... args) -> decltype(::NAME(args...)) { \
^~~~
file_hook.cpp:73:11: error: redefinition of 'FILE* fopen(const char*, const char*)'
INTERPOSE(fopen)(const char *filename, const char *opentype) {
^~~~~
interpose.h:49:31: note: in definition of macro 'INTERPOSE'
extern "C" decltype(::NAME) NAME __attribute__((weak, alias("__interpose_" #NAME))); \
^~~~
file_hook.cpp:19:11: note: 'FILE* fopen(const char*, const char*)' previously defined here
INTERPOSE(fopen64)(const char *filename, const char *opentype) {
^~~~~~~
interpose.h:49:31: note: in definition of macro 'INTERPOSE'
extern "C" decltype(::NAME) NAME __attribute__((weak, alias("__interpose_" #NAME))); \
^~~~
file_hook.cpp:101:11: error: redefinition of 'template<class ... Args> decltype (open(real::open::args ...)) real::open(Args ...)'
INTERPOSE(open)(const char *filename, int flags, ...) {
^~~~
interpose.h:38:10: note: in definition of macro 'INTERPOSE'
auto NAME(Args... args) -> decltype(::NAME(args...)) { \
^~~~
file_hook.cpp:47:11: note: 'template<class ... Args> decltype (open(real::open::args ...)) real::open(Args ...)' previously declared here
INTERPOSE(open64)(const char *filename, int flags, mode_t mode) {
^~~~~~
interpose.h:38:10: note: in definition of macro 'INTERPOSE'
auto NAME(Args... args) -> decltype(::NAME(args...)) { \
^~~~
file_hook.cpp:101:11: error: redefinition of 'int open(const char*, int, ...)'
INTERPOSE(open)(const char *filename, int flags, ...) {
^~~~
interpose.h:49:31: note: in definition of macro 'INTERPOSE'
extern "C" decltype(::NAME) NAME __attribute__((weak, alias("__interpose_" #NAME))); \
^~~~
file_hook.cpp:47:11: note: 'int open(const char*, int, ...)' previously defined here
INTERPOSE(open64)(const char *filename, int flags, mode_t mode) {
^~~~~~
interpose.h:49:31: note: in definition of macro 'INTERPOSE'
extern "C" decltype(::NAME) NAME __attribute__((weak, alias("__interpose_" #NAME))); \
^~~~
verify if recover() works
libfaketime will add extra overhead
verify recording works
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.