🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gdb.bug
Article #1651

remote target ARM

#1651
From: Radu Grigore
Date: Wed, 10 Jul 2002 13:02
63 lines
2472 bytes
GDB version: 5.2

Compilation:
  compiler (version): gcc 2.95.3 (host and target)
  procedure for gdb:
    configure
    make
    cd gdb/gdbserver
    export CC=/usr/arm-linux-uclibc/bin/gcc  #(see www.uclibc.org)
    rm *.cache
    configure --build=i686-pc-linux 
              --target=arm-linux 
              --prefix=/usr/arm-linux-uclibc
    make clean
    make
  procedure for debugged prog:
    this program is a simple loop showing integers
    from 0 to 9 compiled with same gcc

Platforms:
  host: IBM compatible pc (i686-pc-linux-gnu)
  target: ARM CS89712 processor
  note:
    Target has a strange word alignment. With the contents:
    Adress: 4k+0 4k+1 4k+2 4k+3
    Data:      0    1    2    3

    reading an int from
      4k+0 gives 03 02 01 00
      4k+1 gives 00 03 02 01
      4k+2 gives 01 00 03 02
      4k+3 gives 02 01 00 03

Commands:
  target:
    gdbserver host_ip:123 test.arm
  host
    gdb test.arm
      target remote target_ip:123
      break main
      continue

The error is:
   Could not write to memory at ...

After a little debug I found that:
 1. after 'continue' command
 2. the host send some 'm' packets (read memory)
 3. and then tries two times to write by sending 'M' packets
 4. in gdbserver, linux-low.h, write_inferior_memory
 5. a call to ptrace(PTRACE_POKETEXT,...) is made
 6. and this call returns errno=5=EIO.

bye,
 radu

PS: please reply.


__________________________________________________
Do You Yahoo!?
Sign up for SBC Yahoo! Dial - First Month Free
http://sbc.yahoo.com
Technical Details
Message-ID: <20020710130259.96249.qmail@web20008.mail.yahoo.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!bloom-beacon.mit.edu!news-peer.gip.net!news.gsl.net!gip.net!nntp.abs.net!uunet!dca.uu.net!ash.uu.net!spool0901.news.uu.net!wendy-fate.uu.net!bug-gdb

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f5053,3632bcfe50056fc3,start
X-Google-Attributes: gidf5053,public
X-Google-ArrivalTime: 2002-07-10 06:03:30 PST
x-uunet-gateway: chi6sosrv13.alter.net from bug-gdb to gnu.gdb.bug; Wed, 10 Jul 2002 13:03:32 GMT
Message-ID: <20020710130259.96249.qmail@web20008.mail.yahoo.com>
Date: Wed, 10 Jul 2002 06:02:59 -0700
From: radugrigore@yahoo.com (Radu Grigore)
Reply-To: radugrigore@ieee.org
Subject: remote target ARM
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Approved: bug-gdb-request@mail.gnu.org
Newsgroups: gnu.gdb.bug
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!bloom-beacon.mit.edu!news-peer.gip.net!news.gsl.net!gip.net!nntp.abs.net!uunet!dca.uu.net!ash.uu.net!spool0901.news.uu.net!wendy-fate.uu.net!bug-gdb
Sender: bug-gdb-request@mail.gnu.org
Lines: 63