]> granicus.if.org Git - php/commitdiff
Make opcode breakpoints work again
authorBob Weinand <bobwei9@hotmail.com>
Sat, 18 Jul 2015 21:55:59 +0000 (23:55 +0200)
committerBob Weinand <bobwei9@hotmail.com>
Mon, 20 Jul 2015 16:00:42 +0000 (18:00 +0200)
sapi/phpdbg/phpdbg_bp.c
sapi/phpdbg/phpdbg_opcode.c
sapi/phpdbg/phpdbg_opcode.h

index 48239ccac8f9b7e8d514c71287063ea061fa7cc2..06c1e40b6f99b3439b5857d574e86942bf70116d 100644 (file)
@@ -928,9 +928,9 @@ static inline phpdbg_breakbase_t *phpdbg_find_breakpoint_opline(phpdbg_opline_pt
 
 static inline phpdbg_breakbase_t *phpdbg_find_breakpoint_opcode(zend_uchar opcode) /* {{{ */
 {
-       const char *opname = phpdbg_decode_opcode(opcode);
+       const char *opname = zend_get_opcode_name(opcode);
 
-       if (memcmp(opname, PHPDBG_STRL("UNKNOWN")) == 0) {
+       if (!opname) {
                return NULL;
        }
 
index 8a58a44f0bbb67e930001b00d7bb4bdb876fd2b4..75c91e0cf555f72f025b1b39640b9b11f4e5d56d 100644 (file)
 
 ZEND_EXTERN_MODULE_GLOBALS(phpdbg);
 
+static inline const char *phpdbg_decode_opcode(zend_uchar opcode) /* {{{ */
+{
+       const char *ret = zend_get_opcode_name(opcode);
+       if (ret) {
+               return ret + 5; /* Skip ZEND_ prefix */
+       }
+       return "UNKNOWN";
+} /* }}} */
+
 static inline char *phpdbg_decode_op(zend_op_array *ops, znode_op *op, uint32_t type) /* {{{ */
 {
        char *decode = NULL;
@@ -204,12 +213,3 @@ void phpdbg_print_opline(zend_execute_data *execute_data, zend_bool ignore_flags
 {
        phpdbg_print_opline_ex(execute_data, ignore_flags);
 } /* }}} */
-
-const char *phpdbg_decode_opcode(zend_uchar opcode) /* {{{ */
-{
-       const char *ret = zend_get_opcode_name(opcode);
-       if (ret) {
-               return ret + 5; /* Skip ZEND_ prefix */
-       }
-       return "UNKNOWN";
-} /* }}} */
index ab7e9e261d204de86eb61140c0d91d8ec8fac204..34c9c37e500a4d010e7363af1cdf3d5f7cc31054 100644 (file)
@@ -23,7 +23,6 @@
 
 #include "zend_types.h"
 
-const char *phpdbg_decode_opcode(zend_uchar);
 char *phpdbg_decode_opline(zend_op_array *ops, zend_op *op);
 void phpdbg_print_opline(zend_execute_data *execute_data, zend_bool ignore_flags);
 void phpdbg_print_opline_ex(zend_execute_data *execute_data, zend_bool ignore_flags);