]> git.saurik.com Git - cycript.git/blobdiff - Console.cpp
Mark output from ?debug separate from the result.
[cycript.git] / Console.cpp
index cedd1501ea3e14f1f84a984680f6c13b737ae72d..dbb8baa4f8ec195f9e89f0a47296d50df6a41747 100644 (file)
@@ -587,6 +587,7 @@ static void Console(CYOptions &options) {
         history += command_;
 
         if (debug) {
+            std::cout << "cy= ";
             Write(syntax, code.c_str(), code.size(), std::cout);
             std::cout << std::endl;
         }
@@ -699,10 +700,8 @@ int Main(int argc, char const * const argv[], char const * const envp[]) {
                                 break;
                             else {
                                 size += read;
-                                if (size == sizeof(value)) {
-                                    pid = _not(pid_t);
+                                if (size == sizeof(value))
                                     goto fail;
-                                }
                             }
                         }
 
@@ -723,7 +722,7 @@ int Main(int argc, char const * const argv[], char const * const envp[]) {
                     }
 
                     if (pid == _not(pid_t)) {
-                        fprintf(stderr, "invalid pid for -p\n");
+                        fprintf(stderr, "unable to find process `%s' using ps\n", arg);
                         return 1;
                     }
                 }