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]

[rfc] : current_gdbarch replacement in breakpoint.c


Hi,

this patch replaces one occurence of current_gdbarch in breakpoint.c. I'm not sure if this one is correct.
Testsuite on x86 showed no regression. Is this ok ?


ChangeLog:


	* breakpoint.c (watchpoint_check): Use get_frame_arch to get at the
	current architecture.
	


-- Markus Deuling GNU Toolchain for Linux on Cell BE deuling@de.ibm.com

diff -urpN src/gdb/breakpoint.c dev/gdb/breakpoint.c
--- src/gdb/breakpoint.c	2008-01-11 14:32:31.000000000 +0100
+++ dev/gdb/breakpoint.c	2008-01-16 07:48:16.000000000 +0100
@@ -2522,9 +2522,14 @@ watchpoint_check (void *p)
 	 that the watchpoint frame couldn't be found by frame_find_by_id()
 	 because the current PC is currently in an epilogue.  Calling
 	 gdbarch_in_function_epilogue_p() also when fr == NULL fixes that. */
-      if ((!within_current_scope || fr == get_current_frame ())
-          && gdbarch_in_function_epilogue_p (current_gdbarch, read_pc ()))
-	return WP_VALUE_NOT_CHANGED;
+      if (!within_current_scope)
+	{
+	  fr = get_current_frame ();
+   	  if (fr && gdbarch_in_function_epilogue_p (get_frame_arch (fr),
+						    read_pc ()))
+	    return WP_VALUE_NOT_CHANGED;
+	}
+
       if (fr && within_current_scope)
 	/* If we end up stopping, the current frame will get selected
 	   in normal_stop.  So this call to select_frame won't affect

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