Skip to content

Commit 278adf9

Browse files
committed
Fix parent command offsets
1 parent ea64330 commit 278adf9

File tree

7 files changed

+10
-9
lines changed

7 files changed

+10
-9
lines changed

Diff for: sapi/phpdbg/phpdbg_break.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
ZEND_EXTERN_MODULE_GLOBALS(phpdbg);
3030

3131
#define PHPDBG_BREAK_COMMAND_D(f, h, a, m, l, s, flags) \
32-
PHPDBG_COMMAND_D_EXP(f, h, a, m, l, s, &phpdbg_prompt_commands[10], flags)
32+
PHPDBG_COMMAND_D_EXP(f, h, a, m, l, s, &phpdbg_prompt_commands[9], flags)
3333

3434
/**
3535
* Commands

Diff for: sapi/phpdbg/phpdbg_help.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ ZEND_EXTERN_MODULE_GLOBALS(phpdbg);
2929

3030
/* {{{ Commands Table */
3131
#define PHPDBG_COMMAND_HELP_D(name, tip, alias, action) \
32-
{PHPDBG_STRL(#name), tip, sizeof(tip)-1, alias, action, NULL, 0}
32+
{PHPDBG_STRL(#name), tip, sizeof(tip)-1, alias, action, &phpdbg_prompt_commands[16], 0}
3333

3434
const phpdbg_command_t phpdbg_help_commands[] = {
3535
PHPDBG_COMMAND_HELP_D(aliases, "show alias list", 'a', phpdbg_do_help_aliases),

Diff for: sapi/phpdbg/phpdbg_info.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
ZEND_EXTERN_MODULE_GLOBALS(phpdbg);
2929

3030
#define PHPDBG_INFO_COMMAND_D(f, h, a, m, l, s, flags) \
31-
PHPDBG_COMMAND_D_EXP(f, h, a, m, l, s, &phpdbg_prompt_commands[14], flags)
31+
PHPDBG_COMMAND_D_EXP(f, h, a, m, l, s, &phpdbg_prompt_commands[13], flags)
3232

3333
const phpdbg_command_t phpdbg_info_commands[] = {
3434
PHPDBG_INFO_COMMAND_D(break, "show breakpoints", 'b', info_break, NULL, 0, PHPDBG_ASYNC_SAFE),

Diff for: sapi/phpdbg/phpdbg_list.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
ZEND_EXTERN_MODULE_GLOBALS(phpdbg);
3636

3737
#define PHPDBG_LIST_COMMAND_D(f, h, a, m, l, s, flags) \
38-
PHPDBG_COMMAND_D_EXP(f, h, a, m, l, s, &phpdbg_prompt_commands[13], flags)
38+
PHPDBG_COMMAND_D_EXP(f, h, a, m, l, s, &phpdbg_prompt_commands[12], flags)
3939

4040
const phpdbg_command_t phpdbg_list_commands[] = {
4141
PHPDBG_LIST_COMMAND_D(lines, "lists the specified lines", 'l', list_lines, NULL, "l", PHPDBG_ASYNC_SAFE),

Diff for: sapi/phpdbg/phpdbg_print.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
ZEND_EXTERN_MODULE_GLOBALS(phpdbg);
2828

2929
#define PHPDBG_PRINT_COMMAND_D(f, h, a, m, l, s, flags) \
30-
PHPDBG_COMMAND_D_EXP(f, h, a, m, l, s, &phpdbg_prompt_commands[9], flags)
30+
PHPDBG_COMMAND_D_EXP(f, h, a, m, l, s, &phpdbg_prompt_commands[8], flags)
3131

3232
const phpdbg_command_t phpdbg_print_commands[] = {
3333
PHPDBG_PRINT_COMMAND_D(exec, "print out the instructions in the execution context", 'e', print_exec, NULL, 0, PHPDBG_ASYNC_SAFE),

Diff for: sapi/phpdbg/phpdbg_set.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
ZEND_EXTERN_MODULE_GLOBALS(phpdbg);
2929

3030
#define PHPDBG_SET_COMMAND_D(f, h, a, m, l, s, flags) \
31-
PHPDBG_COMMAND_D_EXP(f, h, a, m, l, s, &phpdbg_prompt_commands[18], flags)
31+
PHPDBG_COMMAND_D_EXP(f, h, a, m, l, s, &phpdbg_prompt_commands[17], flags)
3232

3333
const phpdbg_command_t phpdbg_set_commands[] = {
3434
PHPDBG_SET_COMMAND_D(prompt, "usage: set prompt [<string>]", 'p', set_prompt, NULL, "|s", 0),

Diff for: sapi/phpdbg/phpdbg_watch.c

+4-3
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
#include "phpdbg_btree.h"
2424
#include "phpdbg_watch.h"
2525
#include "phpdbg_utils.h"
26+
#include "phpdbg_prompt.h"
2627
#ifndef _WIN32
2728
# include <unistd.h>
2829
# include <sys/mman.h>
@@ -31,9 +32,9 @@
3132
ZEND_EXTERN_MODULE_GLOBALS(phpdbg);
3233

3334
const phpdbg_command_t phpdbg_watch_commands[] = {
34-
PHPDBG_COMMAND_D_EX(array, "create watchpoint on an array", 'a', watch_array, NULL, "s", 0),
35-
PHPDBG_COMMAND_D_EX(delete, "delete watchpoint", 'd', watch_delete, NULL, "s", 0),
36-
PHPDBG_COMMAND_D_EX(recursive, "create recursive watchpoints", 'r', watch_recursive, NULL, "s", 0),
35+
PHPDBG_COMMAND_D_EX(array, "create watchpoint on an array", 'a', watch_array, &phpdbg_prompt_commands[24], "s", 0),
36+
PHPDBG_COMMAND_D_EX(delete, "delete watchpoint", 'd', watch_delete, &phpdbg_prompt_commands[24], "s", 0),
37+
PHPDBG_COMMAND_D_EX(recursive, "create recursive watchpoints", 'r', watch_recursive, &phpdbg_prompt_commands[24], "s", 0),
3738
PHPDBG_END_COMMAND
3839
};
3940

0 commit comments

Comments
 (0)