Hi!

It tries to access that address as the LR content is 0xFFFFFFFC at the
moment of stopping the debugger, as jumping to that adress realizes
the return from interrupt on cortex-m3. Even so reading from an
invalid address should not corrupt the debugger. This problem is
handled with the ftdi dongles. The read fails of course, but after
that the debugger does not stop working.

I'm not sure who should be correcting this bug, so I am forwarding
this email to the openocd development list as well.

So to everyone on openocd-dev:

When stopping the debugger in a ISR on cortex-m3, the content of the
LR is 0xFFFFFFFx, so when the code branches to that address the return
from interrupt is done. However at the moment when gdb does not know
this, and tries to access the memory at this address, which casues the
mentioned errors. Maybe there should be a check for this address, or
something?

Regards,
  Ákos Vandra




On 16 July 2012 15:23, simonqian.openocd <[email protected]> wrote:
> Hi,
> I checked the log output.
> The problem is that GDB tries to access data at 0xFFFFFFFC, see below.
> Debug: 704 10333 gdb_server.c:2049 gdb_input_inner(): received packet:
> 'mfffffffc,4'
> Debug: 705 10333 gdb_server.c:1200 gdb_read_memory_packet(): addr:
> 0xfffffffc, len: 0x00000004
> Debug: 706 10333 target.c:1760 target_read_buffer(): reading buffer of 4
> byte at 0xfffffffc
>
> This is not a valid address.
>
> some lines above the errer:
> Debug: 680 10315 cortex_m.c:1436 cortex_m3_load_core_reg_u32(): load from
> core reg 14  value 0xfffffffd
> Core reg 14 is Link Register, please check whether the contect of this
> register is valid in BusFault?
> If the valid is valid according to the CM3 specification, this is GDB's
> problem.
> And you can try to post to OpenOCD for a solution.
>
> ________________________________
> simonqian.openocd
>
> From: Akos Vandra
> Date: 2012-07-16 18:33
> To: simonqian.openocd
> Subject: Versaloon in interrupts
> Hi!
>
> Trying to debug with versaloon+openocd, but I'm having difficulties
> with interrupts and exceptions. Interrupts are simply stepped over,
> and if I stop the execution when an exception is running (I have a
> while(1); inside the exception handlers to be able to examine the
> problem), I cannot single-step.
>
> openocd spits out a lot of messages as well. This seems to happen only
> when stopping in interrupts.
> I attached the openocd output for debug_level 3, when the application
> gets stuck in a busfault handler, and i tried single stepping a few
> times. Eclipse outputs that the target is not running nor halted.
>
> I am using an lpc1764 chip, with cortex-m3. If you need any additional
> info, please let me know.
>
> Hope you can help me!
>
> Regards,
>   Ákos Vandra
>
> akos@FM12BQ:~/projects/ARM/falcoeye/Debug$ ./openocd.sh
> Open On-Chip Debugger 0.6.0-dev (2012-07-01-11:11)
> Licensed under GNU GPL v2
> For bug reports, read
> http://openocd.sourceforge.net/doc/doxygen/bugs.html
> Info : OpenOCD runs in SWD mode
> adapter_nsrst_delay: 200
> 10 kHz
> 666 kHz
> Info : Versaloon(0x15)by Simon(compiled on Jul  8 2011)
> Info : USB_TO_XXX abilities: 0x0000076E:0x010001EF:0xC0000007
> Info : clock speed 666 kHz
> Info : lpc1768.cpu: hardware has 6 breakpoints, 4 watchpoints
> Info : accepting 'gdb' connection from 3333
> Warn : acknowledgment received, but no packet pending
> undefined debug reason 6 - target needs reset
> Warn : stepi ignored. GDB will now fetch the register state from the target.
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Warn : Block read error address 0xfffffffc
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Polling target failed, GDB will be halted. Polling again in 100ms
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Polling target failed, GDB will be halted. Polling again in 300ms
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Polling target failed, GDB will be halted. Polling again in 700ms
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Polling target failed, GDB will be halted. Polling again in 1500ms
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Polling target failed, GDB will be halted. Polling again in 3100ms
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Polling target failed, GDB will be halted. Polling again in 6300ms
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Polling target failed, GDB will be halted. Polling again in 6300ms
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Polling target failed, GDB will be halted. Polling again in 6300ms
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Polling target failed, GDB will be halted. Polling again in 6300ms
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Polling target failed, GDB will be halted. Polling again in 6300ms
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Polling target failed, GDB will be halted. Polling again in 6300ms
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Polling target failed, GDB will be halted. Polling again in 6300ms
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Polling target failed, GDB will be halted. Polling again in 6300ms
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Polling target failed, GDB will be halted. Polling again in 6300ms
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Polling target failed, GDB will be halted. Polling again in 6300ms
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Polling target failed, GDB will be halted. Polling again in 6300ms
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Polling target failed, GDB will be halted. Polling again in 6300ms
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Polling target failed, GDB will be halted. Polling again in 6300ms
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Polling target failed, GDB will be halted. Polling again in 6300ms
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Polling target failed, GDB will be halted. Polling again in 6300ms
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Polling target failed, GDB will be halted. Polling again in 6300ms
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Polling target failed, GDB will be halted. Polling again in 6300ms
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Polling target failed, GDB will be halted. Polling again in 6300ms
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Polling target failed, GDB will be halted. Polling again in 6300ms
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Polling target failed, GDB will be halted. Polling again in 6300ms
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Polling target failed, GDB will be halted. Polling again in 6300ms
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Polling target failed, GDB will be halted. Polling again in 6300ms
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Polling target failed, GDB will be halted. Polling again in 6300ms
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Polling target failed, GDB will be halted. Polling again in 6300ms
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Polling target failed, GDB will be halted. Polling again in 6300ms
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Polling target failed, GDB will be halted. Polling again in 6300ms
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Polling target failed, GDB will be halted. Polling again in 6300ms
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Polling target failed, GDB will be halted. Polling again in 6300ms
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Polling target failed, GDB will be halted. Polling again in 6300ms
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Polling target failed, GDB will be halted. Polling again in 6300ms
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Polling target failed, GDB will be halted. Polling again in 6300ms
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Polling target failed, GDB will be halted. Polling again in 6300ms
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Polling target failed, GDB will be halted. Polling again in 6300ms
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Polling target failed, GDB will be halted. Polling again in 6300ms
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Polling target failed, GDB will be halted. Polling again in 6300ms
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Polling target failed, GDB will be halted. Polling again in 6300ms
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Polling target failed, GDB will be halted. Polling again in 6300ms
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Polling target failed, GDB will be halted. Polling again in 6300ms
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Polling target failed, GDB will be halted. Polling again in 6300ms
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Polling target failed, GDB will be halted. Polling again in 6300ms
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Polling target failed, GDB will be halted. Polling again in 6300ms
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Polling target failed, GDB will be halted. Polling again in 6300ms
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Polling target failed, GDB will be halted. Polling again in 6300ms
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Polling target failed, GDB will be halted. Polling again in 6300ms
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Polling target failed, GDB will be halted. Polling again in 6300ms
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Polling target failed, GDB will be halted. Polling again in 6300ms
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Polling target failed, GDB will be halted. Polling again in 6300ms
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Polling target failed, GDB will be halted. Polling again in 6300ms
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Polling target failed, GDB will be halted. Polling again in 6300ms
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Polling target failed, GDB will be halted. Polling again in 6300ms
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Polling target failed, GDB will be halted. Polling again in 6300ms
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Polling target failed, GDB will be halted. Polling again in 6300ms
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Polling target failed, GDB will be halted. Polling again in 6300ms
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Polling target failed, GDB will be halted. Polling again in 6300ms
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Polling target failed, GDB will be halted. Polling again in 6300ms
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Polling target failed, GDB will be halted. Polling again in 6300ms
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Polling target failed, GDB will be halted. Polling again in 6300ms
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Polling target failed, GDB will be halted. Polling again in 6300ms
> Warn : Invalid ACK 0x4 in swd-DP transaction
> Polling target failed, GDB will be halted. Polling again in 6300ms
>

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
OpenOCD-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to