This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH]


This patch fixes Xtensa backtrace which is broken
when frame_func_unwind () returns bad value.

-- Maxim

2009-05-05  Maxim Grigoriev  <maxim2405@gmail.com>

	* xtensa-tdep.c (xtensa_frame_cache): Use pc instead of cache->pc.

Index: gdb/xtensa-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/xtensa-tdep.c,v
retrieving revision 1.33
diff -u -r1.33 xtensa-tdep.c
--- gdb/xtensa-tdep.c	17 Apr 2009 15:44:28 -0000	1.33
+++ gdb/xtensa-tdep.c	6 May 2009 00:28:01 -0000
@@ -1242,7 +1242,7 @@
 	  cache->wd.ws = ws & ~(1 << wb);
 
 	  cache->pc = get_frame_func (this_frame);
-	  cache->ra = (cache->pc & 0xc0000000) | (ra & 0x3fffffff);
+	  cache->ra = (pc & 0xc0000000) | (ra & 0x3fffffff);
 	  cache->ps = (ps & ~PS_CALLINC_MASK)
 	    | ((WINSIZE(ra)/4) << PS_CALLINC_SHIFT);
 	}

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]