File tree Expand file tree Collapse file tree 1 file changed +31
-3
lines changed Expand file tree Collapse file tree 1 file changed +31
-3
lines changed Original file line number Diff line number Diff line change @@ -142,9 +142,35 @@ PHPDBG_API void phpdbg_export_breakpoints(FILE *handle TSRMLS_DC) /* {{{ */
142
142
} break ;
143
143
144
144
case PHPDBG_BREAK_COND : {
145
- fprintf (handle ,
146
- "break on %s\n" ,
147
- ((phpdbg_breakcond_t * )brake )-> code );
145
+ phpdbg_breakcond_t * conditional = (phpdbg_breakcond_t * ) brake ;
146
+
147
+ if (conditional -> paramed ) {
148
+ switch (conditional -> param .type ) {
149
+ case STR_PARAM :
150
+ fprintf (handle ,
151
+ "break at %s if %s\n" , conditional -> param .str , conditional -> code );
152
+ break ;
153
+
154
+ case METHOD_PARAM :
155
+ fprintf (handle ,
156
+ "break at %s::%s if %s\n" ,
157
+ conditional -> param .method .class , conditional -> param .method .name ,
158
+ conditional -> code );
159
+ break ;
160
+
161
+ case FILE_PARAM :
162
+ fprintf (handle ,
163
+ "break at %s:%lu if %s\n" ,
164
+ conditional -> param .file .name , conditional -> param .file .line ,
165
+ conditional -> code );
166
+ break ;
167
+
168
+ default : { /* do nothing */ } break ;
169
+ }
170
+ } else {
171
+ fprintf (
172
+ handle , "break on %s\n" , conditional -> code );
173
+ }
148
174
} break ;
149
175
}
150
176
}
@@ -427,6 +453,8 @@ PHPDBG_API void phpdbg_set_breakpoint_at(const phpdbg_param_t *param, const phpd
427
453
phpdbg_clear_param (
428
454
& new_param TSRMLS_CC );
429
455
goto usage ;
456
+
457
+ default : { /* do nothing */ } break ;
430
458
}
431
459
432
460
expr_hash += phpdbg_hash_param (& new_param TSRMLS_CC );
You can’t perform that action at this time.
0 commit comments