18 p_name->set_parent(NULL);
34 sprintf(p,
"%sDLL[%zd].", prefix, idx);
36 sprintf(p,
"%sDLL.", prefix);
40 fprintf(f,
"%s%-*s = \"%s\"\n", p, w,
"lib_name", p_name->get_string(
true).c_str());
41 for (
size_t i = 0; i < p_symbols.size(); i++)
42 fprintf(f,
"%s%-*s = [%zd] \"%s\"\n", p, w,
"symbol_name", i,
escapeString(p_symbols[i]).c_str());
53 p_name->set_parent(
this);
67 p_name->set_parent(NULL);
116 sprintf(p,
"%sSymbol[%zd].", prefix, idx);
118 sprintf(p,
"%sSymbol.", prefix);
122 fprintf(f,
"%s%-*s = \"%s\"\n", p, w,
"name", p_name->get_string(
true).c_str());
124 const char *s_def_state = NULL;
125 switch (p_def_state) {
126 case SYM_UNDEFINED: s_def_state =
"undefined";
break;
127 case SYM_TENTATIVE: s_def_state =
"tentative";
break;
128 case SYM_DEFINED: s_def_state =
"defined";
break;
130 fprintf(f,
"%s%-*s = %s\n", p, w,
"def_state", s_def_state);
132 const char *s_bind = NULL;
134 case SYM_NO_BINDING: s_bind =
"no-binding";
break;
135 case SYM_LOCAL: s_bind =
"local";
break;
136 case SYM_GLOBAL: s_bind =
"global";
break;
137 case SYM_WEAK: s_bind =
"weak";
break;
139 fprintf(f,
"%s%-*s = %s\n", p, w,
"binding", s_bind);
141 const char *s_type = NULL;
143 case SYM_NO_TYPE: s_type =
"no-type";
break;
144 case SYM_DATA: s_type =
"data";
break;
145 case SYM_IFUNC: s_type =
"ifunc";
break;
146 case SYM_FUNC: s_type =
"function";
break;
147 case SYM_SECTION: s_type =
"section";
break;
148 case SYM_FILE: s_type =
"file";
break;
149 case SYM_TLS: s_type =
"thread";
break;
150 case SYM_REGISTER: s_type =
"register";
break;
151 case SYM_ARRAY: s_type =
"array";
break;
152 case SYM_COMMON: s_type =
"common";
break;
154 fprintf(f,
"%s%-*s = %s\n", p, w,
"type", s_type);
156 fprintf(f,
"%s%-*s = [%d] \"%s\"\n", p, w,
"bound", p_bound->get_id(), p_bound->get_name()->get_string(
true).c_str());
158 fprintf(f,
"%s%-*s = none\n", p, w,
"bound");
161 fprintf(f,
"%s%-*s = 0x%08"PRIx64, p, w,
"value", p_value);
163 fprintf(f,
" (unsigned)%"PRIu64, p_value);
164 if ((int64_t)p_value < 0) fprintf(f,
" (signed)%"PRId64, (int64_t)p_value);
168 fprintf(f,
"%s%-*s = %"PRIu64
" bytes\n", p, w,
"size", p_size);