From: Jerome Guitton <guitton@act-europe.fr>
To: gdb-patches@sources.redhat.com
Subject: [commit] ARM : prologue scan
Date: Thu, 25 Sep 2003 14:24:00 -0000 [thread overview]
Message-ID: <20030925142400.GA15127@act-europe.fr> (raw)
In-Reply-To: <20030923190323.GA13529@act-europe.fr>
[-- Attachment #1: Type: text/plain, Size: 208 bytes --]
Jerome Guitton (guitton@act-europe.fr):
> I still don't have committed this change, for the simple reason that I don't
patch merged with the current version of arm-tdep.c (head), and
committed.
--
Jerome
[-- Attachment #2: arm_bt.dif --]
[-- Type: text/plain, Size: 3478 bytes --]
2003-09-25 Jerome Guitton <guitton@act-europe.fr>
* arm-tdep.c (arm_skip_prologue): Handle "sub ip, sp #n" and
"add ip, sp #n" in the prologue.
(arm_scan_prologue): Ditto.
Index: arm-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/arm-tdep.c,v
retrieving revision 1.150
diff -c -r1.150 arm-tdep.c
*** arm-tdep.c 14 Sep 2003 16:32:12 -0000 1.150
--- arm-tdep.c 25 Sep 2003 14:15:51 -0000
***************
*** 455,460 ****
--- 455,466 ----
if (inst == 0xe1a0c00d) /* mov ip, sp */
continue;
+ if ((inst & 0xfffff000) == 0xe28dc000) /* add ip, sp #n */
+ continue;
+
+ if ((inst & 0xfffff000) == 0xe24dc000) /* sub ip, sp #n */
+ continue;
+
/* Some prologues begin with "str lr, [sp, #-4]!". */
if (inst == 0xe52de004) /* str lr, [sp, #-4]! */
continue;
***************
*** 707,713 ****
static void
arm_scan_prologue (struct frame_info *next_frame, struct arm_prologue_cache *cache)
{
! int regno, sp_offset, fp_offset;
CORE_ADDR prologue_start, prologue_end, current_pc;
CORE_ADDR prev_pc = frame_pc_unwind (next_frame);
--- 713,719 ----
static void
arm_scan_prologue (struct frame_info *next_frame, struct arm_prologue_cache *cache)
{
! int regno, sp_offset, fp_offset, ip_offset;
CORE_ADDR prologue_start, prologue_end, current_pc;
CORE_ADDR prev_pc = frame_pc_unwind (next_frame);
***************
*** 808,814 ****
in which case it is often (but not always) replaced by
"str lr, [sp, #-4]!". - Michael Snyder, 2002-04-23] */
! sp_offset = fp_offset = 0;
for (current_pc = prologue_start;
current_pc < prologue_end;
--- 814,820 ----
in which case it is often (but not always) replaced by
"str lr, [sp, #-4]!". - Michael Snyder, 2002-04-23] */
! sp_offset = fp_offset = ip_offset = 0;
for (current_pc = prologue_start;
current_pc < prologue_end;
***************
*** 818,823 ****
--- 824,846 ----
if (insn == 0xe1a0c00d) /* mov ip, sp */
{
+ ip_offset = 0;
+ continue;
+ }
+ else if ((insn & 0xfffff000) == 0xe28dc000) /* add ip, sp #n */
+ {
+ unsigned imm = insn & 0xff; /* immediate value */
+ unsigned rot = (insn & 0xf00) >> 7; /* rotate amount */
+ imm = (imm >> rot) | (imm << (32 - rot));
+ ip_offset = imm;
+ continue;
+ }
+ else if ((insn & 0xfffff000) == 0xe24dc000) /* sub ip, sp #n */
+ {
+ unsigned imm = insn & 0xff; /* immediate value */
+ unsigned rot = (insn & 0xf00) >> 7; /* rotate amount */
+ imm = (imm >> rot) | (imm << (32 - rot));
+ ip_offset = -imm;
continue;
}
else if (insn == 0xe52de004) /* str lr, [sp, #-4]! */
***************
*** 859,865 ****
unsigned imm = insn & 0xff; /* immediate value */
unsigned rot = (insn & 0xf00) >> 7; /* rotate amount */
imm = (imm >> rot) | (imm << (32 - rot));
! fp_offset = -imm;
cache->framereg = ARM_FP_REGNUM;
}
else if ((insn & 0xfffff000) == 0xe24dd000) /* sub sp, sp #n */
--- 882,888 ----
unsigned imm = insn & 0xff; /* immediate value */
unsigned rot = (insn & 0xf00) >> 7; /* rotate amount */
imm = (imm >> rot) | (imm << (32 - rot));
! fp_offset = -imm + ip_offset;
cache->framereg = ARM_FP_REGNUM;
}
else if ((insn & 0xfffff000) == 0xe24dd000) /* sub sp, sp #n */
prev parent reply other threads:[~2003-09-25 14:24 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-07-21 14:27 [RFA] " Jerome Guitton
2003-07-21 14:31 ` Daniel Jacobowitz
2003-07-21 14:38 ` Jerome Guitton
2003-07-21 14:57 ` Daniel Jacobowitz
2003-07-21 15:20 ` Jerome Guitton
2003-07-21 15:28 ` Daniel Jacobowitz
2003-07-21 15:43 ` Jerome Guitton
2003-07-22 9:48 ` Jerome Guitton
2003-07-22 11:47 ` Jerome Guitton
2003-09-01 15:45 ` Ping: " Jerome Guitton
2003-09-05 10:14 ` Richard Earnshaw
2003-09-05 15:56 ` Joel Brobecker
2003-09-05 16:03 ` Richard Earnshaw
2003-09-09 10:23 ` Jerome Guitton
2003-09-09 12:49 ` Richard Earnshaw
2003-09-09 12:52 ` Jerome Guitton
2003-09-23 19:03 ` Jerome Guitton
2003-09-25 14:24 ` Jerome Guitton [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20030925142400.GA15127@act-europe.fr \
--to=guitton@act-europe.fr \
--cc=gdb-patches@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox