[xdebug-dev] xdebug xdebug/xdebug.c xdebug/xdebug_handler_dbgp.c - Fixed bug #251: Using the source command with an invalid filename returns

From: Derick Rethans <derick[@]derickrethans.nl>
Date: Wed, 4 Apr 2007 13:11:04 +0200

Date: Wed Apr 4 13:11:04 CEST 2007
User: Derick Rethans
Directory: xdebug

Log Message:
[1.50]
- Fixed bug #251: Using the source command with an invalid filename returns
  unexpected result.

Modified files:
           xdebug/xdebug.c (version: 1.377)
           xdebug/xdebug_handler_dbgp.c (version: 1.119)

[FILE: /xdebug/xdebug.c]

===================================================================
RCS file: cvstemp,v
retrieving revision 1.376
retrieving revision 1.377
diff -u -r1.376 -r1.377
--- xdebug/xdebug.c:1.376 Sun Mar 18 08:21:14 2007 GMT
+++ xdebug/xdebug.c Wed Apr 04 09:11:04 2007 GMT
@@ -2201,7 +2201,7 @@
         xdebug_do_jit(TSRMLS_C);
 
         /* Check for the pseudo exceptions to allow breakpoints on PHP error statuses */
- if (XG(remote_enabled)) {
+ if (XG(remote_enabled) && XG(breakpoints_allowed)) {
                 if (xdebug_hash_find(XG(context).exception_breakpoints, error_type_str, strlen(error_type_str), (void *) &extra_brk_info)) {
                         if (handle_hit_value(extra_brk_info)) {
                                 if (!XG(context).handler->remote_breakpoint(&(XG(context)), XG(stack), error_filename, error_lineno, XDEBUG_BREAK, error_type_str, buffer)) {

[FILE: /xdebug/xdebug_handler_dbgp.c]

===================================================================
RCS file: cvstemp,v
retrieving revision 1.118
retrieving revision 1.119
diff -u -r1.118 -r1.119
--- xdebug/xdebug_handler_dbgp.c:1.118 Sun Mar 18 08:04:18 2007 GMT
+++ xdebug/xdebug_handler_dbgp.c Wed Apr 04 09:11:04 2007 GMT
@@ -1386,8 +1386,11 @@
         if (CMD_OPTION('e')) {
                 end = strtol(CMD_OPTION('e'), NULL, 10);
         }
+
         /* return_source allocates memory for source */
+ XG(breakpoints_allowed) = 0;
         source = return_source(filename, begin, end TSRMLS_CC);
+ XG(breakpoints_allowed) = 1;
 
         if (!source) {
                 RETURN_RESULT(XG(status), XG(reason), XDEBUG_ERROR_CANT_OPEN_FILE);
@@ -2180,7 +2183,7 @@
 
 char *xdebug_dbgp_get_revision(void)
 {
- return "$Revision: 1.118 $";
+ return "$Revision: 1.119 $";
 }
 
 static int xdebug_dbgp_cmdloop(xdebug_con *context TSRMLS_DC)
Received on Wed Apr 04 2007 - 13:11:07 BST

This archive was generated by hypermail 2.2.0 : Sun Jun 24 2018 - 04:00:03 BST