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] Remove LOWEST_PC macro


Hi,

this patch replaces the only occurence of LOWEST_PC macro in arm target by itsexpression and replaces
current_gdbarch with get_frame_arch.

Tested by builing arm target. Ok to commit?

ChangeLog:

	* arm-tdep.c (arm_prologue_this_id): Replace LOWEST_PC by its
	expression and use get_frame_arch to replace current_gdbarch by frame's
	architecture.
	* arm-tdep.h (LOWEST_PC): Remove.


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

diff -urpN src/gdb/arm-tdep.c dev/gdb/arm-tdep.c
--- src/gdb/arm-tdep.c	2007-11-07 07:32:59.000000000 +0100
+++ dev/gdb/arm-tdep.c	2007-11-15 10:13:09.000000000 +0100
@@ -961,7 +961,7 @@ arm_prologue_this_id (struct frame_info 
 
   /* This is meant to halt the backtrace at "_start".  Make sure we
      don't halt it at a generic dummy frame. */
-  if (func <= LOWEST_PC)
+  if (func <= gdbarch_tdep (get_frame_arch (next_frame))->lowest_pc)
     return;
 
   /* If we've hit a wall, stop.  */
diff -urpN src/gdb/arm-tdep.h dev/gdb/arm-tdep.h
--- src/gdb/arm-tdep.h	2007-10-10 16:04:53.000000000 +0200
+++ dev/gdb/arm-tdep.h	2007-11-15 10:06:29.000000000 +0100
@@ -176,11 +176,6 @@ struct gdbarch_tdep
 };
 
 
-
-#ifndef LOWEST_PC
-#define LOWEST_PC (gdbarch_tdep (current_gdbarch)->lowest_pc)
-#endif
-
 CORE_ADDR arm_skip_stub (struct frame_info *, CORE_ADDR);
 CORE_ADDR arm_get_next_pc (struct frame_info *, CORE_ADDR);
 int arm_software_single_step (struct frame_info *);

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