void InjectLibrary(pid_t, std::ostream &stream, int, const char *const []);
-#ifdef CY_ATTACH
class CYInjectRemote :
public CYRemote
{
return CYUTF8String(strdup(json.c_str()), json.size());
}
};
-#endif
static std::ostream *out_;
append_history$ = (int (*)(int, const char *)) (dlsym(RTLD_DEFAULT, "append_history"));
-#ifdef CY_ATTACH
pid_t pid(_not(pid_t));
-#endif
const char *host(NULL);
const char *port(NULL);
"c"
"g:"
"n:"
-#ifdef CY_ATTACH
"p:"
-#endif
"r:"
"s"
, (const struct option[]) {
{NULL, no_argument, NULL, 'c'},
{NULL, required_argument, NULL, 'g'},
{NULL, required_argument, NULL, 'n'},
-#ifdef CY_ATTACH
{NULL, required_argument, NULL, 'p'},
-#endif
{NULL, required_argument, NULL, 'r'},
{NULL, no_argument, NULL, 's'},
{0, 0, 0, 0}}, NULL));
case '?':
fprintf(stderr,
"usage: cycript [-c]"
-#ifdef CY_ATTACH
" [-p <pid|name>]"
-#endif
" [-r <host:port>]"
" [<script> [<arg>...]]\n"
);
if (!target)
target = true;
else {
- fprintf(stderr, "only one of -[c"
-#ifdef CY_ATTACH
- "p"
-#endif
- "r] may be used at a time\n");
+ fprintf(stderr, "only one of -[cpr] may be used at a time\n");
return 1;
}
break;
}
break;
-#ifdef CY_ATTACH
case 'p': {
size_t size(strlen(optarg));
char *end;
}
}
} goto target;
-#endif
case 'r': {
//size_t size(strlen(optarg));
const char *script;
-#ifdef CY_ATTACH
if (pid != _not(pid_t) && argc > 1) {
fprintf(stderr, "-p cannot set argv\n");
return 1;
}
-#endif
if (argc == 0)
script = NULL;
CYSetArgs(argv0, script, argc, const_cast<const char **>(argv));
#endif
-#ifdef CY_ATTACH
if (remote_ == NULL && pid != _not(pid_t))
remote_ = new CYInjectRemote(pid);
-#endif
if (remote_ == NULL && host != NULL && port != NULL)
remote_ = new CYSocketRemote(host, port);
@CY_OBJECTIVEC_TRUE@am__append_24 = ObjectiveC
@CY_OBJECTIVEC_TRUE@am__append_25 = ObjectiveC/Output.cpp ObjectiveC/Replace.cpp ObjectiveC/Library.mm
@CY_OBJECTIVEC_TRUE@am__append_26 = $(LTOBJECTIVEC)
-@CY_ATTACH_TRUE@am__append_27 = Handler.cpp
-@CY_ATTACH_TRUE@@CY_CONSOLE_TRUE@am__append_28 = Inject.cpp
-@CY_ATTACH_TRUE@@CY_CONSOLE_TRUE@am__append_29 = -DCY_ATTACH
subdir = .
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/ax_cxx_compile_stdcxx_11.m4 \
@CY_OBJECTIVEC_TRUE@am__objects_6 = ObjectiveC/Output.lo \
@CY_OBJECTIVEC_TRUE@ ObjectiveC/Replace.lo \
@CY_OBJECTIVEC_TRUE@ ObjectiveC/Library.lo
-@CY_ATTACH_TRUE@am__objects_7 = Handler.lo
am_libcycript_la_OBJECTS = ConvertUTF.lo Decode.lo Driver.lo Error.lo \
Highlight.lo Library.lo Network.lo Output.lo Replace.lo \
Syntax.lo Parser.lo Scanner.lo $(am__objects_1) \
$(am__objects_2) $(am__objects_3) $(am__objects_4) \
- $(am__objects_5) $(am__objects_6) $(am__objects_7)
+ $(am__objects_5) $(am__objects_6) Handler.lo
libcycript_la_OBJECTS = $(am_libcycript_la_OBJECTS)
AM_V_lt = $(am__v_lt_@AM_V@)
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
@CY_ANDROID_TRUE@@CY_CONSOLE_TRUE@am__EXEEXT_1 = cycript-pie$(EXEEXT)
PROGRAMS = $(bin_PROGRAMS)
am__cycript_SOURCES_DIST = Console.cpp Inject.cpp
-@CY_ATTACH_TRUE@@CY_CONSOLE_TRUE@am__objects_8 = Inject.$(OBJEXT)
@CY_CONSOLE_TRUE@am_cycript_OBJECTS = Console.$(OBJEXT) \
-@CY_CONSOLE_TRUE@ $(am__objects_8)
+@CY_CONSOLE_TRUE@ Inject.$(OBJEXT)
cycript_OBJECTS = $(am_cycript_OBJECTS)
@CY_CONSOLE_TRUE@cycript_DEPENDENCIES = libcycript.la \
@CY_CONSOLE_TRUE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
ACLOCAL_AMFLAGS = -I m4
AM_CPPFLAGS = -DYYDEBUG=1 -DCY_SYSTEM="\"$(CY_SYSTEM)\"" -include \
config.h -include $(srcdir)/unconfig.h $(am__append_8) \
- $(am__append_23) $(am__append_29)
+ $(am__append_23)
CY_FLAGS = -fvisibility=hidden $(am__append_1)
AM_CFLAGS = $(CY_FLAGS)
AM_CXXFLAGS = $(CY_FLAGS)
Highlight.cpp Library.cpp Network.cpp Output.cpp Replace.cpp \
Syntax.cpp Parser.cpp Scanner.cpp $(am__append_3) \
$(am__append_5) $(am__append_14) $(am__append_18) \
- $(am__append_21) $(am__append_25) $(am__append_27)
+ $(am__append_21) $(am__append_25) Handler.cpp
filters = $(am__append_9) $(am__append_13) $(am__append_17) \
$(am__append_20) $(am__append_24)
-@CY_CONSOLE_TRUE@cycript_SOURCES = Console.cpp $(am__append_28)
+@CY_CONSOLE_TRUE@cycript_SOURCES = Console.cpp Inject.cpp
@CY_CONSOLE_TRUE@cycript_LDADD = libcycript.la $(LTLIBREADLINE) $(LTLIBTERMCAP) $(LTLIBGCC) $(PTHREAD_CFLAGS) -ldl
@CY_ANDROID_TRUE@@CY_CONSOLE_TRUE@cycript_pie_SOURCES = pie.c
@CY_ANDROID_TRUE@@CY_CONSOLE_TRUE@cycript_pie_LDFLAGS = -fno-PIE