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]

[commit] Two more obvious current_gdbarch eliminations


Hello,

in a couple of places obviously unneccessary current_gdbarch references
remained; I'd either overlooked them or they crept in again ...

Tested on powerpc64-linux, committed to mainline.

Bye,
Ulrich


ChangeLog:

	* eval.c (evaluate_subexp_standard): Use expression architecture
	instead of current_gdbarch.

	* infrun.c (handle_inferior_event): Avoid unncessary reference
	to current_gdbarch and get_current_frame ().


Index: gdb-head/gdb/eval.c
===================================================================
--- gdb-head.orig/gdb/eval.c
+++ gdb-head/gdb/eval.c
@@ -938,7 +938,7 @@ evaluate_subexp_standard (struct type *e
 	      for (; range_low <= range_high; range_low++)
 		{
 		  int bit_index = (unsigned) range_low % TARGET_CHAR_BIT;
-		  if (gdbarch_bits_big_endian (current_gdbarch))
+		  if (gdbarch_bits_big_endian (exp->gdbarch))
 		    bit_index = TARGET_CHAR_BIT - 1 - bit_index;
 		  valaddr[(unsigned) range_low / TARGET_CHAR_BIT]
 		    |= 1 << bit_index;
Index: gdb-head/gdb/infrun.c
===================================================================
--- gdb-head.orig/gdb/infrun.c
+++ gdb-head/gdb/infrun.c
@@ -3777,9 +3777,7 @@ infrun: not switching back to stepped th
 		  keep_going (ecs);
 		  return;
 		}
-	      if (gdbarch_skip_trampoline_code(current_gdbarch,
-					       get_current_frame (),
-					       stop_pc))
+	      if (gdbarch_skip_trampoline_code (gdbarch, frame, stop_pc))
 		{
 		  /* We are in a function call trampoline.
 		     Keep stepping backward to get to the caller.  */
-- 
  Dr. Ulrich Weigand
  GNU Toolchain for Linux on System z and Cell BE
  Ulrich.Weigand@de.ibm.com


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