mirror of git://sourceware.org/git/glibc.git
Update.
1998-07-06 Ulrich Drepper <drepper@cygnus.com> * sysdeps/generic/elf/backtracesyms.c (__backtrace_symbols): Improve generated strings a bit.
This commit is contained in:
parent
8eaaffdeed
commit
ac8e29977a
|
|
@ -1,3 +1,8 @@
|
||||||
|
1998-07-06 Ulrich Drepper <drepper@cygnus.com>
|
||||||
|
|
||||||
|
* sysdeps/generic/elf/backtracesyms.c (__backtrace_symbols):
|
||||||
|
Improve generated strings a bit.
|
||||||
|
|
||||||
1998-07-06 14:36 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
|
1998-07-06 14:36 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
|
||||||
|
|
||||||
* posix/Makefile (generated): Remove $(objpfx) from the names.
|
* posix/Makefile (generated): Remove $(objpfx) from the names.
|
||||||
|
|
|
||||||
|
|
@ -53,7 +53,7 @@ __backtrace_symbols (array, size)
|
||||||
"<fct-name>(<sym-name>)[+offset]. */
|
"<fct-name>(<sym-name>)[+offset]. */
|
||||||
total += (strlen (info[cnt].dli_fname ?: "")
|
total += (strlen (info[cnt].dli_fname ?: "")
|
||||||
+ (info[cnt].dli_sname
|
+ (info[cnt].dli_sname
|
||||||
? strlen (info[cnt].dli_sname) + 3
|
? strlen (info[cnt].dli_sname) + 3 + WORD_WIDTH + 3
|
||||||
: 1)
|
: 1)
|
||||||
+ WORD_WIDTH + 6);
|
+ WORD_WIDTH + 6);
|
||||||
else
|
else
|
||||||
|
|
@ -72,12 +72,22 @@ __backtrace_symbols (array, size)
|
||||||
|
|
||||||
if (status[cnt] && info[cnt].dli_fname
|
if (status[cnt] && info[cnt].dli_fname
|
||||||
&& info[cnt].dli_fname[0] != '\0')
|
&& info[cnt].dli_fname[0] != '\0')
|
||||||
last += 1 + sprintf (last, "%s%s%s%s[+%p]",
|
{
|
||||||
|
char buf[20];
|
||||||
|
|
||||||
|
if (array[cnt] >= (void *) info[cnt].dli_saddr)
|
||||||
|
sprintf (buf, "+0x%x", array[cnt] - info[cnt].dli_saddr);
|
||||||
|
else
|
||||||
|
sprintf (buf, "-0x%x", info[cnt].dli_saddr - array[cnt]);
|
||||||
|
|
||||||
|
last += 1 + sprintf (last, "%s%s%s%s%s[+%p]",
|
||||||
info[cnt].dli_fname ?: "",
|
info[cnt].dli_fname ?: "",
|
||||||
info[cnt].dli_sname ? "(" : "",
|
info[cnt].dli_sname ? "(" : "",
|
||||||
info[cnt].dli_sname ?: "",
|
info[cnt].dli_sname ?: "",
|
||||||
|
info[cnt].dli_sname ? buf : "",
|
||||||
info[cnt].dli_sname ? ") " : " ",
|
info[cnt].dli_sname ? ") " : " ",
|
||||||
info[cnt].dli_fbase);
|
array[cnt]);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
last += 1 + sprintf (last, "[+%p]", array[cnt]);
|
last += 1 + sprintf (last, "[+%p]", array[cnt]);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue