php-internal-docs 8.4.8
Unofficial docs for php/php-src
Loading...
Searching...
No Matches
fpm_trace.c
Go to the documentation of this file.
1 /* (c) 2007,2008 Andrei Nigmatulin */
2
3#include "fpm_config.h"
4
5#include <sys/types.h>
6
7#include "fpm_trace.h"
8
9int fpm_trace_get_strz(char *buf, size_t sz, long addr) /* {{{ */
10{
11 int i;
12 long l = addr;
13 char *lc = (char *) &l;
14
15 i = l % SIZEOF_LONG;
16 l -= i;
17 for (addr = l; ; addr += SIZEOF_LONG) {
18 if (0 > fpm_trace_get_long(addr, &l)) {
19 return -1;
20 }
21 for ( ; i < SIZEOF_LONG; i++) {
22 --sz;
23 if (sz && lc[i]) {
24 *buf++ = lc[i];
25 continue;
26 }
27 *buf = '\0';
28 return 0;
29 }
30 i = 0;
31 }
32}
33/* }}} */
#define SIZEOF_LONG
Definition config-win.h:32
zend_ffi_ctype_name_buf buf
Definition ffi.c:4685
int fpm_trace_get_strz(char *buf, size_t sz, long addr)
Definition fpm_trace.c:9
int fpm_trace_get_long(long addr, long *data)