[xdebug-dev] xdebug xdebug/xdebug.c xdebug/xdebug_var.c

From: Derick Rethans <derick[@]derickrethans.nl>
Date: Wed, 19 Oct 2005 10:20:37 +0200

Date: Wed Oct 19 10:20:37 CEST 2005
User: Derick Rethans
Directory: xdebug

Log Message:
- Temporary fix for bug #154.

Modified files:
           xdebug/xdebug.c (version: 1.280)
           xdebug/xdebug_var.c (version: 1.61)

[FILE: /xdebug/xdebug.c]

===================================================================
RCS file: cvstemp,v
retrieving revision 1.279
retrieving revision 1.280
diff -u -r1.279 -r1.280
--- xdebug/xdebug.c:1.279 Thu Oct 06 18:22:37 2005 GMT
+++ xdebug/xdebug.c Wed Oct 19 06:20:37 2005 GMT
@@ -961,8 +961,13 @@
                         tmp->var = xdmalloc(arg_count * sizeof (xdebug_var));
                         for (i = 0; i < arg_count; i++) {
                                 tmp->var[tmp->varc].name = NULL;
+ param = NULL;
                                 if (zend_ptr_stack_get_arg(tmp->varc + 1, (void**) &param TSRMLS_CC) == SUCCESS) {
- tmp->var[tmp->varc].addr = *param;
+ if (param) {
+ tmp->var[tmp->varc].addr = *param;
+ } else {
+ tmp->var[tmp->varc].addr = NULL;
+ }
                                 } else {
                                         tmp->var[tmp->varc].addr = NULL;
                                 }
@@ -1567,7 +1572,11 @@
                 xdebug_str_add(&str, tmp_varname, 1);
 
                 tmp_value = get_zval_value(i->var[j].addr, 0);
- xdebug_str_add(&str, tmp_value, 1);
+ if (tmp_value) {
+ xdebug_str_add(&str, tmp_value, 1);
+ } else {
+ xdebug_str_add(&str, "???", 0);
+ }
         }
 
         if (i->include_filename) {

[FILE: /xdebug/xdebug_var.c]

===================================================================
RCS file: cvstemp,v
retrieving revision 1.60
retrieving revision 1.61
diff -u -r1.60 -r1.61
--- xdebug/xdebug_var.c:1.60 Thu Aug 04 14:30:15 2005 GMT
+++ xdebug/xdebug_var.c Wed Oct 19 06:20:37 2005 GMT
@@ -167,7 +167,7 @@
         char* tmp_str;
         int tmp_len;
 
- if (!struc) {
+ if (!struc || !(*struc)) {
                 return;
         }
         if (debug_zval) {
Received on Wed Oct 19 2005 - 10:20:45 BST

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