MCPcopy Create free account
hub / github.com/Meituan-Dianping/SQLAdvisor / do_resolve

Function do_resolve

extra/resolve_stack_dump.c:283–311  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

281
282
283static void do_resolve()
284{
285 char buf[1024], *p;
286 while (fgets(buf, sizeof(buf), fp_dump))
287 {
288 /* skip bracket */
289 p= (p= strchr(buf, '[')) ? p+1 : buf;
290 /* skip space */
291 while (my_isspace(&my_charset_latin1,*p))
292 ++p;
293
294 if (*p++ == '0' && *p++ == 'x')
295 {
296 SYM_ENTRY se ;
297 uchar* addr = (uchar*)read_addr(&p);
298 if (resolve_addr(addr, &se))
299 fprintf(fp_out, "%p %s + %d\n", addr, se.symbol,
300 (int) (addr - se.addr));
301 else
302 fprintf(fp_out, "%p (?)\n", addr);
303
304 }
305 else
306 {
307 fputs(buf, fp_out);
308 continue;
309 }
310 }
311}
312
313
314int main(int argc, char** argv)

Callers 1

mainFunction · 0.85

Calls 2

read_addrFunction · 0.85
resolve_addrFunction · 0.85

Tested by

no test coverage detected