This is the mail archive of the 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]

Don't overshoot when executing cfa instructions

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


2009-06-28  Andreas Schwab  <>

	* 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,
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

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