Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* Don't overshoot when executing cfa instructions
@ 2009-06-27 22:23 Andreas Schwab
  2009-06-27 22:28 ` Daniel Jacobowitz
  2009-06-27 22:33 ` Daniel Jacobowitz
  0 siblings, 2 replies; 5+ messages in thread
From: Andreas Schwab @ 2009-06-27 22:23 UTC (permalink / raw)
  To: gdb-patches

The dwarf2 unwinder is careful to substract one from pc when finding the
associated fde, but when executing the cfa instructions it uses the
original pc as the limit, which may cause it to execute too much, for
example if this is a frame calling a noreturn function.  Tested on
powerpc-linux.

Andreas.

2009-06-28  Andreas Schwab  <schwab@linux-m68k.org>

	* dwarf2-frame.c (execute_cfa_program): Use
	get_frame_address_in_block instead of get_frame_pc.

--- gdb/dwarf2-frame.c.~1.89.~	2009-06-25 00:05:03.000000000 +0200
+++ gdb/dwarf2-frame.c	2009-06-27 21:52:17.000000000 +0200
@@ -376,7 +376,7 @@ execute_cfa_program (struct dwarf2_fde *
 		     struct dwarf2_frame_state *fs)
 {
   int eh_frame_p = fde->eh_frame_p;
-  CORE_ADDR pc = get_frame_pc (this_frame);
+  CORE_ADDR pc = get_frame_address_in_block (this_frame);
   int bytes_read;
   struct gdbarch *gdbarch = get_frame_arch (this_frame);
 

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."


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

end of thread, other threads:[~2009-06-29 14:33 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-27 22:23 Don't overshoot when executing cfa instructions Andreas Schwab
2009-06-27 22:28 ` Daniel Jacobowitz
2009-06-27 22:33 ` Daniel Jacobowitz
2009-06-29 13:19   ` Andreas Schwab
2009-06-29 14:33     ` Daniel Jacobowitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox