[xdebug-general] Re: Some small suggestions for the source code: GDB / Win32

From: Christof J. Reetz <cjr[@]netplan.de>
Date: Wed, 07 Mar 2007 16:01:37 +0100

Derick Rethans wrote:
> Could you do me a favor and remake the patch as a unified diff? (Use the

Attached.

Regards,

-- 
Christof J. Reetz
NETPLAN Reetz GbR
Prinz-Carl-Anlage 20
D-67547 Worms
Phone 06241-955231
   Fax 06241-955233
The Text used in this eMail is made from 100% recycled
electrons and magnetic particles. Keep it away from
sunlight, pets, and small children.

--- /tmp/xdebug/xdebug_handler_gdb.c 2007-02-26 15:43:30.000000000 +0100
+++ xdebug_handler_gdb.c 2007-03-07 14:38:51.000000000 +0100
@@ -711,6 +711,18 @@
                                 {
                                         tmp_name = xdebug_sprintf("/%s", method->args[0]);
                                 } else {
+
+ // REPLACE | WITH : AND FORWARD SLASH WITH BACKSLASH FOR WINDOWS HTTP SERVER
+
+ if (method->args[0][1] == '|') {
+ char * pSlash;
+
+ method->args[0][1] = ':';
+ pSlash = method->args[0];
+ while (pSlash = strchr (pSlash, '/')) {
+ *pSlash = '\\';
+ }
+ }
                                         tmp_name = xdebug_sprintf("%s", method->args[0]);
                                 }
 #else
@@ -816,6 +828,18 @@
                                 {
                                         tmp_name = xdebug_sprintf("/%s", method->args[0]);
                                 } else {
+
+ // REPLACE | WITH : AND FORWARD SLASH WITH BACKSLASH FOR WINDOWS HTTP SERVER
+
+ if (method->args[0][1] == '|') {
+ char * pSlash;
+
+ method->args[0][1] = ':';
+ pSlash = method->args[0];
+ while (pSlash = strchr (pSlash, '/')) {
+ *pSlash = '\\';
+ }
+ }
                                         tmp_name = xdebug_sprintf("%s", method->args[0]);
                                 }
 #else
@@ -859,6 +883,8 @@
         zval retval;
         char *ret_value;
         int old_error_reporting;
+ int zendEvalStatus;
+
         TSRMLS_FETCH();
 
         /* Remember error reporting level */
@@ -874,21 +900,26 @@
         }
 
         XG(breakpoints_allowed) = 0;
- if (zend_eval_string(buffer.d, &retval, "xdebug eval" TSRMLS_CC) == FAILURE) {
- xdebug_str_free(&buffer);
- EG(error_reporting) = old_error_reporting;
- XG(breakpoints_allowed) = 1;
+ XG(remote_enabled) = 0;
+ XG(remote_enable) = 0;
+
+ zendEvalStatus = zend_eval_string(buffer.d, &retval, "xdebug eval" TSRMLS_CC);
+
+ xdebug_str_free(&buffer);
+ EG(error_reporting) = old_error_reporting;
+ XG(breakpoints_allowed) = 1;
+ XG(remote_enabled) = 1;
+ XG(remote_enable) = 1;
+
+ if (zendEvalStatus == FAILURE) {
                 return make_message(context, XDEBUG_E_EVAL, "Error evaluating code");
- } else {
- xdebug_str_free(&buffer);
- EG(error_reporting) = old_error_reporting;
- ret_value = return_printable_symbol(context, NULL, &retval);
- SENDMSG(context->socket, xdebug_sprintf("%s\n", ret_value));
- zval_dtor(&retval);
- xdfree(ret_value);
- XG(breakpoints_allowed) = 1;
- return NULL;
- }
+ }
+
+ ret_value = return_printable_symbol(context, NULL, &retval);
+ SENDMSG(context->socket, xdebug_sprintf("%s\n", ret_value));
+ zval_dtor(&retval);
+ xdfree(ret_value);
+ return NULL;
 }
 
 char *xdebug_handle_finish(xdebug_con *context, xdebug_arg *args)
Received on Wed Mar 07 2007 - 16:02:08 GMT

This archive was generated by hypermail 2.2.0 : Mon Jun 25 2018 - 06:00:04 BST