On Thu, Jun 16, 2011 at 9:55 AM, Hans Petter Selasky wrote:
> On Thursday 16 June 2011 11:09:19 Tomek CEDRO wrote:
> Hi,

Hello Hans! Thank you for fast response! :-)

> Are you using 8-stable?

%uname -a
FreeBSD c2. 8.2-RELEASE FreeBSD 8.2-RELEASE #0: Fri Feb 18 02:24:46
UTC 2011     r...@almeida.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC
 i386


> Is the issue reproducable?

Yes, as you are more familiar with usb design inside FreeBSD and
probably have already test environment you can build code from git
repository at http://repo.or.cz/w/openocd/libswd.git branch
openocd-ifsigbitbang, then:

* launch the program with gdb:

%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: /mnt/stuff1200/tmp/swd/target/bin/openocd -c noinit
Open On-Chip Debugger 0.5.0-dev-00927-g37eeba8-dirty (2011-06-16-07:31)
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 'jtag'
      Interface Signal Name      |    Mask    |   Value
----------------------------------------------------------
      Interface Signal Name      |    Mask    |   Value
----------------------------------------------------------
                             led | 0x00008000 | 0x00008000
bitbang led=lo

Program received signal SIGSEGV, Segmentation fault.
0x281eaf67 in libusb20_dev_get_speed () from /usr/lib/libusb.so.2


* launch telnet and do the following to cause crash:

%telnet localhost 4444
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Open On-Chip Debugger
> source [find interface/kt-link.cfg]
only one transport option; autoselect 'jtag'
> interface_signal list
      Interface Signal Name      |    Mask    |   Value
----------------------------------------------------------
> interface_signal add led 8000
> interface_signal list
      Interface Signal Name      |    Mask    |   Value
----------------------------------------------------------
                             led | 0x00008000 | 0x00008000
> bitbang led=lo
Connection closed by foreign host.


> Are you reading and writing data from separate threads?

No. The usb communication is done with FT2232H device using libftdi 0.17_1

> Are any buffers located on the stack?

None of my intent ;-) The backtrace looks suspicious anyway:

#1257 0xbfbfef15 in ?? ()
No symbol table info available
#1258 0xbfbfef24 in ?? ().
No symbol table info available.
#1259 0xbfbfef2f in ?? ()
No symbol table info available.
#1260 0xbfbfef40 in ?? ()
No symbol table info available.
#1261 0xbfbfef4c in ?? ()
No symbol table info available.
#1262 0xbfbfef5f in ?? ()
No symbol table info available.
#1263 0x00000000 in ?? ()
No symbol table info available.
#1264 0x00000003 in ?? ()
No symbol table info available.
#1265 0x08048034 in ?? ()
No symbol table info available.
#1266 0x00000004 in ?? ()
No symbol table info available.
#1267 0x00000020 in ?? ()
No symbol table info available.
#1268 0x00000005 in ?? ()
No symbol table info available.
#1269 0x00000007 in ?? ()
No symbol table info available.
#1270 0x00000006 in ?? ()
No symbol table info available.
#1271 0x00001000 in ?? ()
No symbol table info available.
#1272
0x00000008 in ?? ()
No symbol table info available.
#1273 0x00000000 in ?? ()
No symbol table info available.
#1274 0x00000009 in ?? ()
No symbol table info available.
#1275 0x0804afb0 in ?? ()
No symbol table info available.
#1276 0x00000007 in ?? ()
No symbol table info available.
#1277 0x28191000 in ?? ()
No symbol table info available.
#1278 0x0000000f in ?? ()


Please let me know if this is enough information to trace that bug.
You can reproduce it easily with the program from the repository I
have prodived (git clone git://repo.or.cz/openocd/libswd.git -b
openocd-ifsigbitbang openocd-ifsigbitbang; cd openocd-ifsigbitbang;
./bootstrap; ./configure ... )

Best regards :-)
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