Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion config.m4
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ if test "$PHP_PHP_DEBUGGER" != "no"; then
PHP_XDEBUG_CFLAGS="$STD_CFLAGS $MAINTAINER_CFLAGS"

XDEBUG_BASE_SOURCES="src/base/base.c src/base/ctrl_socket.c"
XDEBUG_LIB_SOURCES="src/lib/usefulstuff.c src/lib/cmd_parser.c src/lib/compat.c src/lib/crc32.c src/lib/file.c src/lib/hash.c src/lib/headers.c src/lib/lib.c src/lib/llist.c src/lib/log.c src/lib/normalize_path.c src/lib/set.c src/lib/str.c src/lib/timing.c src/lib/trim.c src/lib/var.c src/lib/var_export_html.c src/lib/var_export_line.c src/lib/var_export_text.c src/lib/var_export_xml.c src/lib/xdebug_strndup.c src/lib/xml.c src/lib/compat_stubs.c"
XDEBUG_LIB_SOURCES="src/lib/usefulstuff.c src/lib/cmd_parser.c src/lib/compat.c src/lib/crc32.c src/lib/hash.c src/lib/headers.c src/lib/lib.c src/lib/llist.c src/lib/log.c src/lib/set.c src/lib/str.c src/lib/timing.c src/lib/trim.c src/lib/var.c src/lib/var_export_xml.c src/lib/xdebug_strndup.c src/lib/xml.c src/lib/compat_stubs.c"
XDEBUG_LIB_MAPS_SOURCES="src/lib/maps/maps.c src/lib/maps/maps_private.c src/lib/maps/parser.c"

XDEBUG_DEBUGGER_SOURCES="src/debugger/com.c src/debugger/debugger.c src/debugger/frankenphp.c src/debugger/handler_dbgp.c src/debugger/handlers.c src/debugger/ip_info.c"
Expand Down
2 changes: 1 addition & 1 deletion config.w32
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ ARG_ENABLE("debugger", "PHP Debugger support", "no");

if (PHP_DEBUGGER == 'yes') {
var XDEBUG_BASE_SOURCES="base.c ctrl_socket.c"
var XDEBUG_LIB_SOURCES="usefulstuff.c cmd_parser.c compat.c crc32.c file.c hash.c headers.c lib.c llist.c log.c normalize_path.c set.c str.c timing.c trim.c var.c var_export_html.c var_export_line.c var_export_text.c var_export_xml.c xdebug_strndup.c xml.c compat_stubs.c"
var XDEBUG_LIB_SOURCES="usefulstuff.c cmd_parser.c compat.c crc32.c hash.c headers.c lib.c llist.c log.c set.c str.c timing.c trim.c var.c var_export_xml.c xdebug_strndup.c xml.c compat_stubs.c"
var XDEBUG_LIB_MAPS_SOURCES="maps.c maps_private.c parser.c"
var XDEBUG_DEBUGGER_SOURCES="com.c debugger.c frankenphp.c handler_dbgp.c handlers.c ip_info.c"

Expand Down
6 changes: 0 additions & 6 deletions php_xdebug.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,6 @@
extern zend_module_entry xdebug_module_entry;
#define phpext_xdebug_ptr &xdebug_module_entry

#define OUTPUT_NOT_CHECKED -1
#define OUTPUT_IS_TTY 1
#define OUTPUT_NOT_TTY 0

#ifdef PHP_WIN32
#define PHP_XDEBUG_API __declspec(dllexport)
#else
Expand All @@ -68,8 +64,6 @@ PHP_RSHUTDOWN_FUNCTION(xdebug);
PHP_MINFO_FUNCTION(xdebug);
ZEND_MODULE_POST_ZEND_DEACTIVATE_D(xdebug);

int xdebug_is_output_tty(void);

ZEND_BEGIN_MODULE_GLOBALS(xdebug)
struct {
xdebug_base_globals_t base;
Expand Down
2 changes: 0 additions & 2 deletions src/base/base.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
#endif
#include "lib/lib_private.h"
#include "lib/log.h"
#include "lib/var_export_line.h"
#include "lib/var.h"
#include "lib/xdebug_strndup.h"

Expand Down Expand Up @@ -931,7 +930,6 @@ void xdebug_base_minit(INIT_FUNC_ARGS)

XG_BASE(error_reporting_override) = 0;
XG_BASE(error_reporting_overridden) = 0;
XG_BASE(output_is_tty) = OUTPUT_NOT_CHECKED;

zend_observer_fiber_switch_register(xdebug_fiber_switch_observer);

Expand Down
1 change: 0 additions & 1 deletion src/base/base_globals.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ typedef struct _xdebug_base_globals_t {
uint64_t start_nanotime;
unsigned int working_tsc_clock; /* -1 = unknown, 0 = not available, 1 = available */
unsigned int prev_memory;
int output_is_tty;
zend_bool in_debug_info;
zend_long error_reporting_override;
zend_bool error_reporting_overridden;
Expand Down
13 changes: 0 additions & 13 deletions src/debugger/debugger.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,6 @@ static char *xdebug_debugger_get_ide_key(void)
return NULL;
}

void xdebug_debugger_reset_ide_key(char *envval)
{
if (XG_DBG(ide_key)) {
xdfree(XG_DBG(ide_key));
}
XG_DBG(ide_key) = xdstrdup(envval);
}

int xdebug_debugger_bailout_if_no_exec_requested(void)
{
/* We need to do this first before the executable clauses are called */
Expand Down Expand Up @@ -530,11 +522,6 @@ void xdebug_debugger_throw_exception_hook(zend_object *exception, zval *file, zv
ce_ptr = ce_ptr->parent;
} while (!exception_breakpoint_found && ce_ptr);
}
#if 0
if (XG_DBG(context).resolved_breakpoints && exception_breakpoint_found) {
XG_DBG(context).handler->resolve_breakpoints(&(XG_DBG(context)), extra_brk_info);
}
#endif
if (exception_breakpoint_found && xdebug_handle_hit_value(extra_brk_info)) {
if (
!XG_DBG(context).handler->remote_breakpoint(
Expand Down
1 change: 0 additions & 1 deletion src/debugger/debugger.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ void xdebug_init_debugger_globals(xdebug_debugger_globals_t *xg);
#define XDEBUG_EXCEPTION_VALUE_VAR_NAME "__EXCEPTION"
#define XDEBUG_INTERMEDIATE_VALUE_VAR_NAME "__INTERMEDIATE_VALUE"

void xdebug_debugger_reset_ide_key(char *envval);
int xdebug_debugger_bailout_if_no_exec_requested(void);
void xdebug_debugger_set_program_name(zend_string *filename);
void xdebug_debugger_register_eval(function_stack_entry *fse);
Expand Down
1 change: 0 additions & 1 deletion src/debugger/handler_dbgp.h
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ int xdebug_dbgp_resolve_breakpoints(xdebug_con *context, zend_string *filename);
int xdebug_dbgp_stream_output(const char *string, unsigned int length);
int xdebug_dbgp_notification(xdebug_con *context, xdebug_str *filename, long lineno, int type, char *type_string, char *message);
int xdebug_dbgp_user_notify(xdebug_con *context, zend_string *filename, long lineno, zval *data);
void XDEBUG_ATTRIBUTE_FORMAT(printf, 2, 3) xdebug_dbgp_log(int log_level, const char *fmt, ...);
int xdebug_dbgp_register_eval_id(xdebug_con *context, function_stack_entry *fse);
int xdebug_dbgp_poll_pending(xdebug_con *context);

Expand Down
24 changes: 0 additions & 24 deletions src/lib/compat.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,21 +48,6 @@
#include "ext/standard/base64.h"
#include "ext/standard/php_string.h"

char *xdebug_str_to_str(char *haystack, size_t length, const char *needle, size_t needle_len, const char *str, size_t str_len, size_t *new_len)
{
zend_string *new_str;
char *retval;

new_str = php_str_to_str(haystack, length, (char*) needle, needle_len, (char*) str, str_len);
*new_len = new_str->len;

retval = estrndup(new_str->val, new_str->len);

zend_string_release(new_str);

return retval;
}

/* {{{ base64 tables */
static const char base64_table[] = {
'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M',
Expand Down Expand Up @@ -384,15 +369,6 @@ void xdebug_setcookie(const char *name, int name_len, char *value, int value_len
domain ? zend_string_release(domain_s) : 0;
}

char *xdebug_get_compiled_variable_name(zend_op_array *op_array, uint32_t var, int *cv_len)
{
zend_string *cv = NULL;
cv = zend_get_compiled_variable_name(op_array, var);
*cv_len = cv->len;

return cv->val;
}

#ifdef ZEND_HASH_GET_APPLY_COUNT /* PHP 7.2 or earlier recursion protection */
zend_bool xdebug_zend_hash_is_recursive(HashTable* ht)
{
Expand Down
7 changes: 0 additions & 7 deletions src/lib/compat.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@
#include "ext/standard/php_var.h"
#define xdebug_php_var_dump php_var_dump

char *xdebug_str_to_str(char *haystack, size_t length, const char *needle, size_t needle_len, const char *str, size_t str_len, size_t *new_len);

unsigned char *xdebug_base64_encode(unsigned char *data, size_t data_len, size_t *new_len);
unsigned char *xdebug_base64_decode(unsigned char *data, size_t data_len, size_t *new_len);

Expand All @@ -35,7 +33,6 @@ void xdebug_stripcslashes(char *string, int *new_len);
zend_ulong xdebug_get_pid(void);

void xdebug_setcookie(const char *name, int name_len, char *value, int value_len, time_t expires, const char *path, int path_len, const char *domain, int domain_len, int secure, int url_encode, int httponly);
char *xdebug_get_compiled_variable_name(zend_op_array *op_array, uint32_t var, int *cv_len);

/* Recursion protection is done differently from PHP 7.3 onwards */
zend_bool xdebug_zend_hash_is_recursive(HashTable* ht);
Expand All @@ -46,10 +43,6 @@ zend_bool xdebug_zend_hash_apply_protection_end(HashTable* ht);
# define ZSTR_INIT_LITERAL(s, persistent) (zend_string_init((s), strlen(s), (persistent)))
#endif

# define XDEBUG_MAKE_STD_ZVAL(zv) \
zv = ecalloc(1, sizeof(zval));

# define HASH_KEY_SIZEOF(k) (sizeof(k) - 1)
# define HASH_KEY_STRLEN(k) (strlen(k))
# define HASH_KEY_IS_NUMERIC(k) ((k) == NULL)
# define HASH_APPLY_KEY_VAL(k) (k)->val
Expand Down
200 changes: 0 additions & 200 deletions src/lib/file.c

This file was deleted.

Loading
Loading