This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[commit] ARM: Recognize RealView call veneers
- From: Daniel Jacobowitz <drow at false dot org>
- To: gdb-patches at sourceware dot org
- Date: Fri, 13 Nov 2009 17:36:00 -0500
- Subject: [commit] ARM: Recognize RealView call veneers
In Thumb-1 mode, you sometimes need a stub function to call via a
function pointer. GDB recognizes the names of the stubs that GCC
uses; this adds the equivalent check for the names that RealView
uses. Neither set of names is particularly magical or ABI-enshrined.
Tested on arm-none-eabi, checked in.
2009-11-13 Daniel Jacobowitz <dan@codesourcery.com>
* arm-tdep.c (arm_skip_stub): Recognize RealView veneer functions.
---
gdb/arm-tdep.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
Index: gdb/arm-tdep.c
===================================================================
--- gdb/arm-tdep.c.orig 2009-10-29 00:44:51.000000000 -0700
+++ gdb/arm-tdep.c 2009-11-13 09:02:56.000000000 -0800
@@ -5155,8 +5155,10 @@ arm_skip_stub (struct frame_info *frame,
/* If PC is in a Thumb call or return stub, return the address of the
target PC, which is in a register. The thunk functions are called
_call_via_xx, where x is the register name. The possible names
- are r0-r9, sl, fp, ip, sp, and lr. */
- if (strncmp (name, "_call_via_", 10) == 0)
+ are r0-r9, sl, fp, ip, sp, and lr. ARM RealView has similar
+ functions, named __ARM_call_via_r[0-7]. */
+ if (strncmp (name, "_call_via_", 10) == 0
+ || strncmp (name, "__ARM_call_via_", strlen ("__ARM_call_via_")) == 0)
{
/* Use the name suffix to determine which register contains the
target PC. */
--
Daniel Jacobowitz
CodeSourcery