arm - gdb No such file or directory error -
update: found workaround - explained @ bottom
i'm trying remote debug program via serial port. on target machine (arm, linux) (connected host machine (windows) via serial-to-usb) connected via putty , looked ttys*
in /dev
directory, don't have any. have tty[num]
(without s
), , running:
dmesg | grep tty
as suggested here gives following:
# dmesg | grep tty kernel command line: mxc_hdmi.only_cea=0 console=ttymxc1,115200 vmalloc=400m consoleblank=0 rootwait fixrtc root=/dev/mmcblk1p1 2020000.serial: ttymxc0 @ mmio 0x2020000 (irq = 58, base_baud = 5000000) imx 21e8000.serial: ttymxc1 @ mmio 0x21e8000 (irq = 59, base_baud = 5000000) imx console [ttymxc1] enabled
so tried use ttymxc0
, ttymxc1
:
gdbserver /dev/ttymxc0 ./test/main process ./test/main created; pid = 253 remote debugging using /dev/ttymxc0
and on host machine (windows 7): (edited following comments)
gdb path/on/host/main (gdb) target remote com15 com15: no such file or directory.
i see here serial broken @ gdb 6.6, have gdb 7.7.
why getting no such file or directory error?
edit 2:
although had tried renaming port com5 , didn't (same result), renamed port com2 , worked once , got out , stopped working:
(gdb) target remote com2 remote debugging using com2 ignoring packet error, continuing... malformed response offset query, qoffsets //got out (gdb) target remote com2 //tried again, didn't work com2: no such file or directory.
the difference between com2 , com15 (besides digits number) in windows device manager com2 appeared "used", , com15 (and com5) did not. when picked com2 new name, windows warned me it's being used accepted change anyway.
now cleared com ports , it's working alternately (haven't succeeded debugging yet, it's not falling on "no such file or directory" error anymore).
edit 3:
so target remote com2
responds "remote debugging using com2 , malformed response..." when i'm not connected target via putty. when connected via putty, says "com2: no such file or directory". it's port taken (by putty) , gdb can't log it.
i ended connecting tcp instead of serial line:
- connect target internet ethernet cable
- edit
/etc/network/interfaces
setup dhcp:
auto eth0
iface eth0 inet dhcp
- run
ifconfig
orip addr
on target ip - run on target:
gdbserver [ip:port] ./path/to/executable/on/target
- run on host:
gdb path/to/executable/on/host/compiled/to/target
(gdb) target remote [target's ip:port]
this sufficient workaround me.
Comments
Post a Comment