Commit d6e7b04a authored by Davi Arnaut's avatar Davi Arnaut

Bug#41612: resolve_stack_dump does not decode 5.1 stack trace

resolve_stack_dump is not able to decode a stack trace produced
by glibc's backtrace() functions. The problem is that the stack
trace addresses are printed between brackets and the utility is
not able to ignore the brackets.

The solution is to modify resolve_stack_dump so it can recognize
stack trace addresses surrounded by brackets. e.g. [0xdeadbeef].
parent d4a7e868
...@@ -290,7 +290,8 @@ static void do_resolve() ...@@ -290,7 +290,8 @@ static void do_resolve()
char buf[1024], *p; char buf[1024], *p;
while (fgets(buf, sizeof(buf), fp_dump)) while (fgets(buf, sizeof(buf), fp_dump))
{ {
p = buf; /* skip bracket */
p= (p= strchr(buf, '[')) ? p+1 : buf;
/* skip space */ /* skip space */
while (my_isspace(&my_charset_latin1,*p)) while (my_isspace(&my_charset_latin1,*p))
++p; ++p;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment