Thank you for this hint on printing pointers! :-) Although there is no
word about "%p" in the manual,  it works on FreeBSD so it should also
work on MacOSX as it is derivative :-)

With LOG_INFO("New SWD context initialized at %p", (void
*)jtag_interface->transport->ctx); we get:

%telnet localhost 4444
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Open On-Chip Debugger
> source [find interface/kt-link-swd.cfg]
only one transport option; autoselect 'swd'
New SWD context initialized at 0x2843b280


%gdb ./openocd
GNU gdb 6.1.1 [FreeBSD]
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-marcel-freebsd"...
(gdb) run -c noinit
Starting program: /tmp/openocd/target/bin/openocd -c noinit
Open On-Chip Debugger 0.5.0-dev-g4e2a176-dirty (2011-08-22-03:42)
Licensed under GNU GPL v2
For bug reports, read
        http://openocd.berlios.de/doc/doxygen/bugs.html
Info : accepting 'telnet' connection from 4444
Info : only one transport option; autoselect 'swd'
Info : New SWD context initialized at 0x2843b280
^C
Program received signal SIGINT, Interrupt.
0x282e8fa3 in select () from /lib/libc.so.7
(gdb) p 0x2843b280
$1 = 675525248
(gdb) p (swd_ctx_t) *0x2843b280
$2 = {cmdq = 0x2844f760, config = {initialized = 1 '\001', trnlen = 1
'\001', maxcmdqlen = 1024, loglevel = SWD_LOGLEVEL_INFO},
  driver = 0x2840d1b8, log = {dp = {ack = 0 '\0', parity = 0 '\0',
idcode = 0, abort = 0, ctrlstat = 0, wcr = 0, select = 0,
      rdbuf = 0}, ap = {ack = 0 '\0', controlstatus = 0, tar = 0, drw
= 0, bd0 = 0, bd1 = 0, bd2 = 0, bd3 = 0, dromt = 0, idr = 0},
    read = {request = 0 '\0', ack = 0 '\0', addr = 0 '\0', data = 0,
control = 0, parity = 0 '\0'}, write = {request = 0 '\0',
      ack = 0 '\0', addr = 0 '\0', data = 0, control = 0, parity = 0 '\0'}}}

Thank you! :-)
Tomek

-- 
CeDeROM, SQ7MHZ, http://www.tomek.cedro.info
_______________________________________________
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to