View Issue Details

IDProjectCategoryView StatusLast Update
0000309XdebugStep Debuggingpublic2020-03-12 17:19
ReporterZobo Assigned To 
PrioritynormalSeverityfeatureReproducibilityalways
Status closedResolutionfixed 
Summary0000309: Temorary breakpoints not implemented
Description

I tried to use temporary breakpoints, only to find out, that they are not implemented. I started by adding this patch, and moving on.
I'll post more patches as I progress..

And it would be good to explain a bit more in the DBGP documentation that when getting breakpoints, the "temporary" is returned as a state.

Additional Information

diff -u -r1.128 xdebug_handler_dbgp.c
--- xdebug_handler_dbgp.c 24 Aug 2007 01:37:54 -0000 1.128
+++ xdebug_handler_dbgp.c 14 Sep 2007 19:55:53 -0000
@@ -1096,6 +1096,9 @@
BREAKPOINT_CHANGE_OPERATOR();
brk_info->hit_value = strtol(CMD_OPTION('h'), NULL, 10);
}

  • if (CMD_OPTION('r')) {
  • brk_info->temporary = 1;
  • }

    if (strcmp(CMD_OPTION('t'), "line") == 0) {
            if (!CMD_OPTION('n')) {
TagsNo tags attached.
Operating System
PHP Version5.2.0

Activities

Zobo

2007-10-11 19:01

reporter   ~0000737

Hi again.
I had close to zero time to look at this, so I hacked a quick solution to the problem.
See next bugnote.

Zobo

2007-10-11 19:10

reporter   ~0000738

Index: xdebug.c

RCS file: /repository/xdebug/xdebug.c,v
retrieving revision 1.408
diff -u -r1.408 xdebug.c
--- xdebug.c 11 Oct 2007 00:54:09 -0000 1.408
+++ xdebug.c 11 Oct 2007 17:59:08 -0000
@@ -1273,6 +1273,8 @@
/ Increase hit counter /
brk_info->hit_count++;

  • if (brk_info->temporary && brk_info->deleted == 1) return 0;
  • if (brk_info->temporary) brk_info->deleted = 1;
    / If the hit_value is 0, the condition check is disabled /
    if (!brk_info->hit_value) {
    return 1;
    @@ -1298,6 +1300,7 @@
    return 1;
    break;
    }
  • if (brk_info->temporary) brk_info->deleted = 0;
    return 0;
    }

Index: xdebug_handler_dbgp.c

RCS file: /repository/xdebug/xdebug_handler_dbgp.c,v
retrieving revision 1.128
diff -u -r1.128 xdebug_handler_dbgp.c
--- xdebug_handler_dbgp.c 24 Aug 2007 01:37:54 -0000 1.128
+++ xdebug_handler_dbgp.c 11 Oct 2007 17:59:08 -0000
@@ -1047,6 +1047,7 @@

    child = xdebug_xml_node_init("breakpoint");
    brk = breakpoint_brk_info_fetch(admin->type, admin->key);
  • if (brk->deleted) return;
    breakpoint_brk_info_add(child, brk);
    xdebug_xml_add_attribute_ex(child, "id", xdebug_sprintf("%lu", admin->id), 0, 1);
    xdebug_xml_add_child(xml_node, child);
    @@ -1081,6 +1082,7 @@
    brk_info->hit_count = 0;
    brk_info->hit_value = 0;
    brk_info->hit_condition = XDEBUG_HIT_DISABLED;
  • brk_info->deleted = 0;

    if (!CMD_OPTION('t')) {
            RETURN_RESULT(XG(status), XG(reason), XDEBUG_ERROR_INVALID_ARGS);

    @@ -1096,6 +1098,9 @@
    BREAKPOINT_CHANGE_OPERATOR();
    brk_info->hit_value = strtol(CMD_OPTION('h'), NULL, 10);
    }

  • if (CMD_OPTION('r')) {
  • brk_info->temporary = 1;
  • }

    if (strcmp(CMD_OPTION('t'), "line") == 0) {
            if (!CMD_OPTION('n')) {

    Index: xdebug_handler_gdb.c

    RCS file: /repository/xdebug/xdebug_handler_gdb.c,v
    retrieving revision 1.87
    diff -u -r1.87 xdebug_handler_gdb.c
    --- xdebug_handler_gdb.c 9 Mar 2007 12:35:37 -0000 1.87
    +++ xdebug_handler_gdb.c 11 Oct 2007 18:08:53 -0000
    @@ -658,6 +658,7 @@
    extra_brk_info->hit_value = 0;
    extra_brk_info->hit_condition = XDEBUG_HIT_DISABLED;
    extra_brk_info->function_break_type = XDEBUG_BRK_FUNC_CALL;

  • extra_brk_info->deleted = 0;

    if (strstr(args->args[0], "::")) { /* class::method */
            xdebug_explode("::", args->args[0], method, -1);

    Index: xdebug_handlers.h

    RCS file: /repository/xdebug/xdebug_handlers.h,v
    retrieving revision 1.36
    diff -u -r1.36 xdebug_handlers.h
    --- xdebug_handlers.h 26 Feb 2007 14:43:30 -0000 1.36
    +++ xdebug_handlers.h 11 Oct 2007 17:59:08 -0000
    @@ -95,6 +95,7 @@
    int hit_count;
    int hit_value;
    int hit_condition;

  • int deleted;
    };

    struct _xdebug_eval_info {

derick

2009-11-27 17:09

administrator   ~0001184

This is fixed in CVS (now SVN).

Issue History

Date Modified Username Field Change
2007-09-14 21:03 Zobo New Issue
2007-10-11 19:01 Zobo Note Added: 0000737
2007-10-11 19:10 Zobo Note Added: 0000738
2009-11-27 17:09 derick Note Added: 0001184
2009-11-27 17:09 derick Status new => closed
2009-11-27 17:09 derick Resolution open => fixed
2020-03-12 16:55 derick Severity minor => feature
2020-03-12 17:19 derick Category Feature/Change request => Step Debugging