Hello,

Just a "me too" email

I have seen the issue with trying to debug thumb code on an ARM7
target. The arm_simulate_step tries to guess the "next" address to put
a breakpoint at this address but it sometime crashes.
I have tried to debug further but I have not been very succesful.

Regards

Francois

On Fri, Apr 10, 2009 at 1:12 AM, Hermann Kraus <h...@scribus.info> wrote:
> Hi!
>
> When I try to singlestep my code openocd crashes.
> I have a custom AT91SAM7S64-Board as target and Luminary LM3S811-Eval-Board
> (with an additional connection from debug-connector to the FT2232 reset
> output, so it behaves like a normal FT2232 board) as debugger.
> When I break at some random point (really doesn't matter where) in my code
> and then single step after a few instructions openocd crashes. The error
> happens just before jumps in most cases. E.g. when the current instruction
> is just before the end of a function, a "if" statement, a "else" statement,
> etc. However I'm not completely sure which instruction actually causes the
> crash. If you need more details I can step through the asm code at different
> locations and see if there is a common instruction that always causes this
> problem.
>
> The problem is verified with the following revisions:
> Open On-Chip Debugger 1.0 (2009-03-12-01:10) svn:r1409 (from Debian)
> Open On-Chip Debugger 1.0 (2009-03-20-14:36) svn:1422
> Open On-Chip Debugger 1.0 (2009-04-10-01:08) svn:1454 (current SVN)
>
> Regards,
>
> Hermann
>
>
> Here's the backtrace and openocd's log messages:
>
> gdb --args openocd -f z_flashnew.cfg
> GNU gdb 6.8-debian
> Copyright (C) 2008 Free Software Foundation, Inc.
> License GPLv3+: GNU GPL version 3 or later
> <http://gnu.org/licenses/gpl.html>
> This is free software: you are free to change and redistribute it.
> There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
> and "show warranty" for details.
> This GDB was configured as "i486-linux-gnu"...
> (gdb) run
> Starting program: /usr/local/bin/openocd -f z_flashnew.cfg
> Open On-Chip Debugger 1.0 (2009-03-20-14:36) svn:1422
>
>
> BUGS? Read http://svn.berlios.de/svnroot/repos/openocd/trunk/BUGS
>
>
> $URL: svn://svn.berlios.de/openocd/trunk/src/openocd.c $
> force hard breakpoints
> jtag_speed: 3
> Info : JTAG tap: sam7s64.cpu tap/device found: 0x3f0f0f0f (Manufacturer:
> 0x787, Part: 0xf0f0, Version: 0x3)
> Info : JTAG Tap/device matched
> Warn : no tcl port specified, using default port 6666
> Warn : DBGACK set while target was in unknown state. Reset or initialize
> target.
> target state: halted
> target halted in ARM state due to breakpoint, current mode: Supervisor
> cpsr: 0x20000053 pc: 0x001001bc
> Info : JTAG tap: sam7s64.cpu tap/device found: 0x3f0f0f0f (Manufacturer:
> 0x787, Part: 0xf0f0, Version: 0x3)
> Info : JTAG Tap/device matched
> Warn : srst pulls trst - can not reset into halted mode. Issuing halt after
> reset.
> target state: halted
> target halted in ARM state due to debug-request, current mode: Supervisor
> cpsr: 0x20000053 pc: 0x00100114
> Info : accepting 'gdb' connection from 0
> Warn : acknowledgment received, but no packet pending
>
> Program received signal SIGSEGV, Segmentation fault.
> buf_get_u32 (buffer=0x74697277 <Address 0x74697277 out of bounds>, first=0,
> num=32)
>    at ../../src/helper/binarybuffer.h:58
> 58                      return
> (((u32)buffer[3])<<24)|(((u32)buffer[2])<<16)|(((u32)buffer[1])<<8)|(((u32)buffer[0])<<0);
> (gdb) bt
> #0  buf_get_u32 (buffer=0x74697277 <Address 0x74697277 out of bounds>,
> first=0, num=32)
>    at ../../src/helper/binarybuffer.h:58
> #1  0x08077a82 in arm_simulate_step (target=0x8855740,
> dry_run_pc=0xbf857d28) at arm_simulator.c:418
> #2  0x08063f73 in arm7_9_step (target=0x8855740, current=1, address=0,
> handle_breakpoints=0) at arm7_9_common.c:1765
> #3  0x080c3087 in gdb_input_inner (connection=0x8846550) at
> gdb_server.c:2111
> #4  0x080c30b2 in gdb_input (connection=0x8846550) at gdb_server.c:2175
> #5  0x080bdbf0 in server_loop (command_context=0x8838008) at server.c:443
> #6  0x08049f9c in openocd_main (argc=3, argv=0xbf857f84) at openocd.c:274
> #7  0x08049ca2 in main (argc=Cannot access memory at address 0x20
> ) at main.c:52
> _______________________________________________
> Openocd-development mailing list
> Openocd-development@lists.berlios.de
> https://lists.berlios.de/mailman/listinfo/openocd-development
>
>
_______________________________________________
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to