public inbox for libc-hacker@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] backtrace fix for s390-32.
@ 2003-03-21 14:19 Martin Schwidefsky
  2003-03-26  4:01 ` Roland McGrath
  0 siblings, 1 reply; 2+ messages in thread
From: Martin Schwidefsky @ 2003-03-21 14:19 UTC (permalink / raw)
  To: libc-hacker

Hi,
for s390-32 there is a problem with backtrace/backtrace_symbols.
backtrace returns addresses that can have the high order bit set (the
bas/basr instructions used for function calling do this). These bits
have to be removed in backtrace or backtrace_symbols won't
return the correct symbols information.

blue skies,
  Martin.

2003-03-21  Martin Schwidefsky  <schwidefskyde.ibm.com>

	* sysdeps/s390/s390-32/backtrace.c (__backtrace): Remove high order
	bit from backtrace addresses.

diff -urN libc/sysdeps/s390/s390-32/backtrace.c libc-s390/sysdeps/s390/s390-32/backtrace.c
--- libc/sysdeps/s390/s390-32/backtrace.c	Fri Jul  6 06:56:03 2001
+++ libc-s390/sysdeps/s390/s390-32/backtrace.c	Fri Mar 21 10:14:15 2003
@@ -71,7 +71,7 @@
 	   out of range.  */
 	break;
 
-      array[cnt++] = stack->save_grps[8];
+      array[cnt++] = stack->save_grps[8] & 0x7fffffff;
 
       stack = (struct layout *) stack->back_chain;
     }

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] backtrace fix for s390-32.
  2003-03-21 14:19 [PATCH] backtrace fix for s390-32 Martin Schwidefsky
@ 2003-03-26  4:01 ` Roland McGrath
  0 siblings, 0 replies; 2+ messages in thread
From: Roland McGrath @ 2003-03-26  4:01 UTC (permalink / raw)
  To: Martin Schwidefsky; +Cc: libc-hacker

> for s390-32 there is a problem with backtrace/backtrace_symbols.
> backtrace returns addresses that can have the high order bit set (the
> bas/basr instructions used for function calling do this). 

That's pretty mysterious to me, but I'll take your word for it and put the
change in.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-03-26  3:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-03-21 14:19 [PATCH] backtrace fix for s390-32 Martin Schwidefsky
2003-03-26  4:01 ` Roland McGrath

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).