ACPI AML decompiler w/ CFG recovery and structured pseudocode
29

Configure Feed

Select the types of activity you want to include in your feed.

tobi / test / t_js.c
677 B 24 lines
1#include "t.h" 2 3#include "js.h" 4#include "p.h" 5 6int t_js(void) { 7 uint8_t data[] = {0x08,'S','T','R','0',0x0d,'a','"','b','\\','c',0x00,0xfe}; 8 tobi_parse_result r; 9 T_CHECK(tobi_parse(data, sizeof(data), 0, &r)); 10 char *s = tobi_js_emit(&r); 11 T_STR(s, "\"kind\":\"root\""); 12 T_STR(s, "\"checksum_sum\":0"); 13 T_STR(s, "\"checksum_valid\":false"); 14 T_STR(s, "\"namespace\":["); 15 T_STR(s, "\"path\":\"\\\\STR0\""); 16 T_STR(s, "\"kind\":\"name\""); 17 T_STR(s, "a\\\"b\\\\c"); 18 T_STR(s, "\"raw_opcode\":254"); 19 T_CHECK(strstr(s, ",}") == NULL); 20 T_CHECK(strstr(s, ",]") == NULL); 21 free(s); 22 tobi_parse_result_free(&r); 23 return 0; 24}