This is the mail archive of the gdb-prs@sources.redhat.com 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]

tdep/1755: ARM prologue scan booboo


>Number:         1755
>Category:       tdep
>Synopsis:       ARM prologue scan booboo
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    unassigned
>State:          open
>Class:          patch
>Submitter-Id:   net
>Arrival-Date:   Sun Aug 22 01:28:01 UTC 2004
>Closed-Date:
>Last-Modified:
>Originator:     Jonathan Larmour
>Release:        gdb-6.2
>Organization:
>Environment:
arm-elf-gdb
But I was actually just reading the code
>Description:
I was reading arm-tdep.c's arm_scan_prologue() trying to trace a different problem I was having with GDB, and happened to notice that near the end of this function is:

      else if ((insn & 0xfe200000) == 0xe8200000)       /* ldm? */
        break;                        /* Don't scan past a block load */

However this pattern isn't correct (and also matches store multiples). It should be:
      else if ((insn & 0xfe100000) == 0xe8100000)       /* ldm? */
>How-To-Repeat:

>Fix:
I've attached the patch to fix, relative to current CVS.

2004-08-22  Jonathan Larmour  <jifl@eCosCentric.com>

	* arm-tdep.c (arm_scan_prologue): Match ldm correctly.
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="arm-tdep.c.patch"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="arm-tdep.c.patch"

LS0tIGFybS10ZGVwLmMub2xkCVN1biBBdWcgMjIgMDI6MjA6MDMgMjAwNAorKysgYXJtLXRkZXAu
YwlTdW4gQXVnIDIyIDAyOjIwOjEyIDIwMDQKQEAgLTg4Nyw3ICs4ODcsNyBAQAogCX0KICAgICAg
IGVsc2UgaWYgKChpbnNuICYgMHhmMDAwMDAwMCkgIT0gMHhlMDAwMDAwMCkKIAlicmVhazsJCQkv
KiBDb25kaXRpb24gbm90IHRydWUsIGV4aXQgZWFybHkgKi8KLSAgICAgIGVsc2UgaWYgKChpbnNu
ICYgMHhmZTIwMDAwMCkgPT0gMHhlODIwMDAwMCkJLyogbGRtPyAqLworICAgICAgZWxzZSBpZiAo
KGluc24gJiAweGZlMTAwMDAwKSA9PSAweGU4MTAwMDAwKQkvKiBsZG0/ICovCiAJYnJlYWs7CQkJ
LyogRG9uJ3Qgc2NhbiBwYXN0IGEgYmxvY2sgbG9hZCAqLwogICAgICAgZWxzZQogCS8qIFRoZSBv
cHRpbWl6ZXIgbWlnaHQgc2hvdmUgYW55dGhpbmcgaW50byB0aGUgcHJvbG9ndWUsCg==


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