This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[rfc] Remove LOWEST_PC macro
- From: Markus Deuling <deuling at de dot ibm dot com>
- To: GDB Patches <gdb-patches at sourceware dot org>
- Cc: Ulrich Weigand <uweigand at de dot ibm dot com>, rearnsha at arm dot com
- Date: Thu, 15 Nov 2007 10:22:11 +0100
- Subject: [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 *);