public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* gdb/2541: ARM single step problem with instruction 0xa5ffffeb
@ 2008-10-22 11:48 julien.lincy
  2008-10-22 13:08 ` pending/2542: " Daniel Jacobowitz
  0 siblings, 1 reply; 2+ messages in thread
From: julien.lincy @ 2008-10-22 11:48 UTC (permalink / raw)
  To: gdb-gnats; +Cc: dan


>Number:         2541
>Category:       gdb
>Synopsis:       ARM single step problem with instruction 0xa5ffffeb
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          support
>Submitter-Id:   net
>Arrival-Date:   Wed Oct 22 11:48:01 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator:     J. Lincy
>Release:        GDB 6.8
>Organization:
>Environment:
ARM 1136 Linux 2.6.21 (EABI)
>Description:
I have a problem single stepping with a simple C program on ARM, with the instruction 0xa5ffffeb.

8538:       a5ffffeb        ldrgeb  pc, [pc, #4075]!        ; 952b <__clz_tab+0x6b>

GDB stops with the error "Invalid update to pc in instruction".

The C program i'm trying to test is attached.
The ARM I use is an ARM v1136 (a bit specific...).

I compiled GDB  with the following options 

./configure --enable-debug --build=i686-pc-linux-gnu --host=i686-pc-linux-gnu --target=i686-pc-linux-gnu --prefix=/home/lincyj/gdb-6.8/build --disable-werror --disable-sim 

And gdbserver with the following options:

../gdb/gdbserver/configure --host=armeb-none-linux-gnueabi --target=armeb-none-linux-gnueabi --prefix=/home/lincyj/gdb-6.8/gdb-6.8/gdbserver_build

>How-To-Repeat:

>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: text/x-csrc; name="test_debug2.c"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="test_debug2.c"

I2luY2x1ZGUgPHN0ZGlvLmg+Cgp1bnNpZ25lZCBsb25nIGxvbmcgZW50aWVyWzEwMjQgKiAxMDI0
XTsKCmludCBtYWluKHZvaWQpCnsKICAgaW50IGksIGg9MDsKCiAgICBwcmludGYoImJlZ2luIFxu
Iik7CnByaW50ZigiYmVnaW4yIFxuIik7CiAgICBnZXRjaGFyKCk7CgogICAgZm9yKGkgPSAwOyBp
PCAxMDI0OyBpKyspCiAgICB7CglpbnQgaiA9IGkqMjsKICAgICAgICBwcmludGYoImJvdWNsZSAl
ZCBcbiIsIGopOwoKICAgICAgICBqKys7CgoJZW50aWVyW2ldID0gajsKCgovLyNpZiAwIC8qIGRl
YnVnICovCi8vICAgaWYoKGVudGllclszN10gJSAxMCkgPT0gMCkgcHJpbnRmKCJiZWdpbiBcbiIp
OwoJcHJpbnRmKCJbMV0tLT4gaiA9ICVkIGVudGllclslZF0gPSAlbGx1IFxuIiwKCSAgICAgICBq
LCBpLCBlbnRpZXJbaV0pOwoKCiAgICAgICAgIHByaW50ZigidGVzdCBcbiIpOwogICAgICAgICBo
Kys7CiAgICAgICAgIHByaW50ZigiaCA9ICVkIFxuIiwgaCk7CgkKCQoJcHJpbnRmKCJbMl0tLT4g
aiA9ICVkIGVudGllclslZF0gPSAlbGx1IFxuIiwKCSAgICAgICBqLCBpLCBlbnRpZXJbaV0pOwov
LyNlbmRpZiAvKiBkZWJ1ZyAqLwogICAgfQoKICAgIHByaW50ZigiZW5kXG4iKTsKCiAgICBpZigo
ZW50aWVyWzM3XSAlIDEwKSA9PSAwKQoJICAgIGVudGllclszOF0gPSAwOwoKICAgIGdldGNoYXIo
KTsKICAgIAogICAgcmV0dXJuIDA7Cn0K


^ permalink raw reply	[flat|nested] 2+ messages in thread

* pending/2542: Re: ARM single step problem with instruction 0xa5ffffeb
  2008-10-22 11:48 gdb/2541: ARM single step problem with instruction 0xa5ffffeb julien.lincy
@ 2008-10-22 13:08 ` Daniel Jacobowitz
  0 siblings, 0 replies; 2+ messages in thread
From: Daniel Jacobowitz @ 2008-10-22 13:08 UTC (permalink / raw)
  To: julien.lincy; +Cc: gdb-gnats


>Number:         2542
>Category:       pending
>Synopsis:       Re: ARM single step problem with instruction 0xa5ffffeb
>Confidential:   yes
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          change-request
>Submitter-Id:   unknown
>Arrival-Date:   Wed Oct 22 13:08:01 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator:     
>Release:        
>Organization:
>Environment:
>Description:
 On Wed, Oct 22, 2008 at 11:41:01AM -0000, julien.lincy@thomson.net wrote:
 > >Description:
 > I have a problem single stepping with a simple C program on ARM, with the instruction 0xa5ffffeb.
 > 
 > 8538:       a5ffffeb        ldrgeb  pc, [pc, #4075]!        ; 952b <__clz_tab+0x6b>
 > 
 > GDB stops with the error "Invalid update to pc in instruction".
 > 
 > The C program i'm trying to test is attached.
 > The ARM I use is an ARM v1136 (a bit specific...).
 
 I think there's something wrong with your environment.  That's not a
 valid instruction; PC is always aligned, so pc+4075 is unaligned.
 The middle of __clz_tab doesn't have function pointers in it.  And you
 can't do PC-relative loads with writeback.
 
 GDB is right to complain about that instruction.
 
 -- 
 Daniel Jacobowitz
 CodeSourcery
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-10-22 13:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-10-22 11:48 gdb/2541: ARM single step problem with instruction 0xa5ffffeb julien.lincy
2008-10-22 13:08 ` pending/2542: " Daniel Jacobowitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).