> -gdb-----------------gdb-----------------gdb-----------------gdb----------------
> [EMAIL PROTECTED]:~/arm$
> ntoarm-gdb 
> /home/vmaster/arm/qnx/workspace/sam9_l9260/Images/startup-at91sam9263ek.sym
> GNU gdb 6.7
> Copyright (C) 2007 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 "--host=i686-pc-linux-gnu --target=arm-unknown-nto-qnx6.3.0"...
> (no debugging symbols found)
> (gdb) target remote localhost:3333
> Remote debugging using localhost:3333
> warning: while parsing target memory map (at line 2): Required element
> <memory> is missing
> 0x00000000 in ?? ()
> (gdb)
> -gdb-----------------gdb-----------------gdb-----------------gdb----------------
>
> As you can see, GDB's idea of the current PC is wrong.

Actually, I think this is a white lie at work.

OpenOCD allows GDB connections to a powered down target.

However, GDB will fail to connect if we don't reply to the 'g'
packets(registers).

A little white lie, in replying a 'g' packets with dummy values, fixes this.

This is a *great* feature because it allows setting up the target
via monitor commands from a GDB init script.

Now you didn't include the log, so I don't know why fetching the
registers didn't work.

Possibly this is related to, or you are seing a second problem with
the memory map.

> I'm not completely sure
> where GDB gets the wrong address from, but a "continue", "ctrl-c" sequence
> gets me the correct address:
>
> -gdb-----------------gdb-----------------gdb-----------------gdb----------------
> (gdb) c
> Continuing.
> target state: halted
> target halted in ARM state due to debug request, current mode: Supervisor
> cpsr: 0x400000d3 pc: 0x23f09764
> MMU: disabled, D-Cache: disabled, I-Cache: enabled
>
> Program received signal SIGINT, Interrupt.
> 0x23f09764 in ?? ()
> (gdb) c
> Continuing.
> target state: halted
> target halted in ARM state due to debug request, current mode: Supervisor
> cpsr: 0x400000d3 pc: 0x23f09764
> MMU: disabled, D-Cache: disabled, I-Cache: enabled
> -gdb-----------------gdb-----------------gdb-----------------gdb----------------


This matches the white-lie 'g' packet upon connection phenomena.


> I've also had problems with breakpoints not taken by GDB, but these problems
> were not reproduceable so far. I've tested both the GDB that came with QNX
> Momentics 6.3.2 and the version from Code Sourcery's 2007q3 release.
>
> Attached is the config file I've used. There was no GDB init script involved.

-d3 log?

-- 
Øyvind Harboe
http://www.zylin.com/zy1000.html
ARM7 ARM9 XScale Cortex
JTAG debugger and flash programmer
_______________________________________________
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to