This is the mail archive of the gdb-patches@sources.redhat.com 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]

[commit, 6.0] Use address_in_block in frame_func_unwind


[my fsf e-mail is down, kind of posting blind]
Hello,

There must be hundreds of these. All using frame_pc_unwind when that runs the risk of landing in the wrong function - disassembler for instance?

Any way, this fixes the most obvious one.

committed to 6.0 and mainline,
Andrew
2003-08-04  Andrew Cagney  <cagney@redhat.com>

	* frame.c (frame_func_unwind): Use frame_unwind_address_in_block.

Index: frame.c
===================================================================
RCS file: /cvs/src/src/gdb/frame.c,v
retrieving revision 1.133
diff -u -r1.133 frame.c
--- frame.c	15 Jul 2003 17:35:00 -0000	1.133
+++ frame.c	4 Aug 2003 14:49:43 -0000
@@ -421,8 +421,11 @@
 {
   if (!fi->prev_func.p)
     {
+      /* Make certain that this, and not the adjacent, function is
+         found.  */
+      CORE_ADDR addr_in_block = frame_unwind_address_in_block (fi);
       fi->prev_func.p = 1;
-      fi->prev_func.addr = get_pc_function_start (frame_pc_unwind (fi));
+      fi->prev_func.addr = get_pc_function_start (addr_in_block);
       if (frame_debug)
 	fprintf_unfiltered (gdb_stdlog,
 			    "{ frame_func_unwind (fi=%d) -> 0x%s }\n",

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