$lldb /cores/core.68807 (lldb) target create “/cores/core.68807” warning: (x86_64) /cores/core.68807 load command 107 LC_SEGMENT_64 has a fileoff + filesize (0x2820e000) that extends beyond the end of the file (0x2820d000), the segment will be truncated to match warning: (x86_64) /cores/core.68807 load command 108 LC_SEGMENT_64 has a fileoff (0x2820e000) that extends beyond the end of the file (0x2820d000), ignoring this section Current executable set to ‘/cores/core.68807’ (x86_64). (lldb) bt error: invalid process $lldb –core “/cores/core.68807” (lldb) target create –core “/cores/core.68807” warning: (x86_64) /cores/core.68807 load command 107 LC_SEGMENT_64 has a fileoff + filesize (0x2820e000) that extends beyond the end of the file (0x2820d000), the segment will be truncated to match warning: (x86_64) /cores/core.68807 load command 108 LC_SEGMENT_64 has a fileoff (0x2820e000) that extends beyond the end of the file (0x2820d000), ignoring this section Core file ‘/cores/core.68807’ (x86_64) was loaded. (lldb) bt
__pthread_kill + 10
frame #1: 0x00007fff92523500 libsystem_pthread.dylib
pthread_kill + 90
frame #2: 0x00007fff9a8ad41b libsystem_c.dylib__abort + 145
frame #3: 0x00007fff9a8adcfa libsystem_c.dylib
__stack_chk_fail + 200
frame #4: 0x0000000104ff8a61 myFile.sozif_file_read(execute_data=0x0000000105018230, return_value=0x00000001050181a0) + 1153 at myFile.c:395
frame #5: 0x000000010454135d php
ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER(execute_data=0x0000000105018030) + 141 at zend_vm_execute.h:675
frame #6: 0x00000001044e5964 phpexecute_ex(ex=0x0000000105018030) + 100 at zend_vm_execute.h:432
frame #7: 0x0000000104ff7d08 myFile.so
my_execute_ex(execute_data=0x0000000105018030) + 392 at myFile.c:218
frame #8: 0x00000001044e5b6a phpzend_execute(op_array=0x0000000105075400, return_value=0x0000000000000000) + 234 at zend_vm_execute.h:474
frame #9: 0x000000010447ef12 php
zend_execute_scripts(type=8, retval=0x0000000000000000, file_count=3) + 594 at zend.c:1447
frame #10: 0x00000001043d4721 phpphp_execute_script(primary_file=0x00007fff5bc6a8a8) + 1201 at main.c:2533
frame #11: 0x000000010459a2b5 php
do_cli(argc=2, argv=0x00007fff5bc6afd0) + 3941 at php_cli.c:990
frame #12: 0x000000010459915a phpmain(argc=2, argv=0x00007fff5bc6afd0) + 1898 at php_cli.c:1378
frame #13: 0x00007fff8ad7c5ad libdyld.dylib
start + 1https://stackoverflow.com/questions/32731663/gdb-doesnt-read-the-core-dump-on-macos
JKHX300590-eyJsaWNlbnNlSWQiOiJKS0hYMzAwNTkwIiwibGljZW5zZWVOYW1lIjoiTmljb2xlIFBvd2VsbCIsImFzc2lnbmVlTmFtZSI6IiIsImFzc2lnbmVlRW1haWwiOiIiLCJsaWNlbnNlUmVzdHJpY3Rpb24iOiJGb3IgZWR1Y2F0aW9uYWwgdXNlIG9ubHkiLCJjaGVja0NvbmN1cnJlbnRVc2UiOmZhbHNlLCJwcm9kdWN0cyI6W3siY29kZSI6IklJIiwicGFpZFVwVG8iOiIyMDE5LTA5LTI0In0seyJjb2RlIjoiQUMiLCJwYWlkVXBUbyI6IjIwMTktMDktMjQifSx7ImNvZGUiOiJEUE4iLCJwYWlkVXBUbyI6IjIwMTktMDktMjQifSx7ImNvZGUiOiJQUyIsInBhaWRVcFRvIjoiMjAxOS0wOS0yNCJ9LHsiY29kZSI6IkdPIiwicGFpZFVwVG8iOiIyMDE5LTA5LTI0In0seyJjb2RlIjoiRE0iLCJwYWlkVXBUbyI6IjIwMTktMDktMjQifSx7ImNvZGUiOiJDTCIsInBhaWRVcFRvIjoiMjAxOS0wOS0yNCJ9LHsiY29kZSI6IlJTMCIsInBhaWRVcFRvIjoiMjAxOS0wOS0yNCJ9LHsiY29kZSI6IlJDIiwicGFpZFVwVG8iOiIyMDE5LTA5LTI0In0seyJjb2RlIjoiUkQiLCJwYWlkVXBUbyI6IjIwMTktMDktMjQifSx7ImNvZGUiOiJQQyIsInBhaWRVcFRvIjoiMjAxOS0wOS0yNCJ9LHsiY29kZSI6IlJNIiwicGFpZFVwVG8iOiIyMDE5LTA5LTI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.html#versions
支持c c++ 的库https://github.com/nlohmann/json ansic 的json库 https://github.com/DaveGamble/cJSON 文档翻译 https://github.com/faycheng/cJSON 如何使用cJSON呢? 添加cJSON.c到你的项目中,并且把cJSON.h放置到你的项目头文件的搜索路径中。 例如,你可以使用下面命令编译一个使用cJSON的小例子:(tests目录下有相关文件)
1、zend_hash_num_elements 获取数组元素个数。宏定义如下:
1 #define zend_hash_num_elements(ht)
2 (ht)->nNumOfElements
2、ZEND_HASH_FOREACH_KEY_VAL 遍历数组键值。使用方法:
1 ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(array), num_key, string_key, entry) {
2 // code
3 } ZEND_HASH_FOREACH_END();
ZEND_HASH_FOREACH_KEY_VAL是个宏函数:
1 #define ZEND_HASH_FOREACH_KEY_VAL(ht, _h, _key, _val)
2 ZEND_HASH_FOREACH(ht, 0);
3 _h = _p->h;
4 _key = _p->key;
5 _val = _z;
继续展开 ZEND_HASH_FOREACH: