lm32 remote debugger issues

Michael Walle michael at walle.cc
Tue Apr 7 08:04:39 UTC 2009


Hi,

Please ignore my first email, I hit the send button by accident.

Am Di, 7.04.2009, 08:59, schrieb Jukka Pietarinen:
> Jukka Pietarinen wrote:
>> I'm still struggling with getting the lm32-rtems4.10-gdb to work with
>> TCP2JTAGVC2 from Lattice. After connecting to the target gdb talks to
>> TCP2JTAGVC2 but fails with the 'g' command:
>
> I have traced down this problem to gdb/remote.c where sizeof_g_packet is
> determined from the list of remote registers. For the lm32, however,
> this does not match the target response for the g command. gdb expects
> to receive 37 32-bit registers (37*4*2=296 bytes) but the target replies
> with 39 (39*4*2=316 bytes).

While developing an own debug monitor, I disassembled the original one,
which you can find in the lm32_monitor_ram.v source file. It saves the
following registers:
  r0
  r1
   :
  r25
  gp
  fp
  sp
  ra
  ea
  ba
  pc
  eid
  eba
  deba
  ie
  im
  ip

which are 39 registers. But the gdb only expect 37 as you said, have a
look at gdb/lm32-tdep.c (and the lm32-linux-tdep.c too) there are only 37
register declared (static char *register_names). IM and IP are missing.

attached is a patch, ok the changes are obvious ;)

@Jukka:
im just curious, as i dont own original lattice hardware. Can you use the
debug monitor together with the jtag uart? (The debug monitor uses the
jtag uart for communication, so there must be something like a multiplexer
and an own send function for the juart)

@Joel: maybe you should put that into the 'official' rtems gdb patch

-- 
  Michael Walle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gdb.patch
Type: text/x-diff
Size: 1027 bytes
Desc: not available
URL: <http://lists.rtems.org/pipermail/users/attachments/20090407/d25fde90/attachment-0001.bin>


More information about the users mailing list