User forums > Embedded development
Gdb work with openocd in pipe mode,but in C::B ,some message seems missing ?
jjingwer:
Gdb can works well with openocd when it run in cmd or powershell in pipe mode , but in C::B , it seems some message always missing. Gdb can not get enough message.
It look is like this :
[debug]Source directories searched: D:/FPGA/CB_Projs/123456;$cdir;$cwd
[debug]>>>>>>cb_gdb:
[debug]> target extended-remote | openocd -c "gdb_port pipe" -f D:\\FPGA\\CODEBLOCKS-20200813\\CODEBLOCKS\\tools\\openocd\\openocd_test.cfg -c "log_output openocd.log"
[debug]Open On-Chip Debugger 0.10.0+dev-00923-g9e6a7a2e5-dirty (2020-09-27-13:35)
[debug]Licensed under GNU GPL v2
[debug]For bug reports, read
[debug] http://openocd.org/doc/doxygen/bugs.html
[debug]Info : OpenOCD will shutdown when debugger closed connection
[debug]Info : J-Link V9 compiled Oct 25 2018 11:46:07
[debug]Remote debugging using | openocd -c "gdb_port pipe" -f D:\\FPGA\\CODEBLOCKS-20200813\\CODEBLOCKS\\tools\\openocd\\openocd_test.cfg -c "log_output openocd.log"
[debug]Info : Hardware version: 9.20
[debug]Info : VTarget = 3.283 V
[debug]Info : clock speed 1000 kHz
[debug]Info : JTAG tap: riscv.cpu tap/device found: 0x00001303 (mfg: 0x601 (<unknown>), part: 0x0007, ver: 0x0)
[debug]Info : datacount=2 progbufsize=8
[debug]Info : Examined RISC-V core; found 1 harts
[debug]Info : hart 0: XLEN=32, misa=0x40001104
[debug]Remote replied unexpectedly to 'vMustReplyEmpty': PacketSize=4000;qXfer:memory-map:read+;qXfer:features:read+;qXfer:threads:read+;QStartNoAckMode+;vContSupported+
[debug]>>>>>>cb_gdb:
[debug]> load
[debug]You can't do that when your target is `exec'
[debug]>>>>>>cb_gdb:
[debug]> b main
[debug]Breakpoint 2 at 0x12356: file main.c, line 52.
BlueHazzard:
Is the full debug log enabled?
Settings->Debugger->full debug log
Can you post a cmd version and a codeblocks version in code tags (the # symbol in the forum text editor)?
jjingwer:
@BlueHazzard
yes , full debug log
when it run in cmd like this:
PS D:\FPGA\CODEBLOCKS-20200813\CODEBLOCKS> riscv64-unknown-elf-gdb.exe .\123456.elf
D:\FPGA\CODEBLOCKS-20200813\CODEBLOCKS\DSC\bin\riscv64-unknown-elf-gcc-8.2.0-2019.02.0\bin\riscv64-unknown-elf-gdb.exe: warning: Couldn't determine a path for the index cache directory.
GNU gdb (GDB) 8.2.90.20190228-git
Copyright (C) 2019 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=x86_64-w64-mingw32 --target=riscv64-unknown-elf".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from .\123456.elf...
<LOCKS-20200813\\CODEBLOCKS\\tools\\openocd\\openocd_test.cfg -c "log_output openocd.log"
Remote debugging using | openocd -c "gdb_port pipe" -f D:\\FPGA\\CODEBLOCKS-20200813\\CODEBLOCKS\\tools\\openocd\\openocd_test.cfg -c "log_output openocd.log"
Open On-Chip Debugger 0.10.0+dev-00923-g9e6a7a2e5-dirty (2020-09-27-13:35)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
Info : OpenOCD will shutdown when debugger closed connection
Info : J-Link V9 compiled Oct 25 2018 11:46:07
Info : Hardware version: 9.20
Info : VTarget = 3.259 V
Info : clock speed 1000 kHz
Info : JTAG tap: riscv.cpu tap/device found: 0x00001303 (mfg: 0x601 (<unknown>), part: 0x0007, ver: 0x0)
Info : datacount=2 progbufsize=8
Info : Examined RISC-V core; found 1 harts
Info : hart 0: XLEN=32, misa=0x40001104
0x007fbfc4 in ?? ()
(gdb) load
Loading section .PieCtrlRegs, size 0x80 lma 0x1900
Loading section .PieVectTable, size 0x1c0 lma 0x1a00
Loading section .GpioCtrlRegs, size 0x38 lma 0xd800
Loading section .GpioDataRegs, size 0x30 lma 0xd838
Loading section .GpioIntRegs, size 0x10 lma 0xd868
Loading section .text.init, size 0x128 lma 0x12000
Loading section .text, size 0x64c lma 0x12128
Start address 0x12000, load size 2604
Transfer rate: 8 KB/sec, 372 bytes/write.
(gdb)
BlueHazzard:
Please use the # symbol to post logs.
This should look like this
--- Code: ---This is a log
--- End code ---
I see only this difference:
--- Code: ---[debug]Remote replied unexpectedly to 'vMustReplyEmpty': PacketSize=4000;qXfer:memory-map:read+;qXfer:features:read+;qXfer:threads:read+;QStartNoAckMode+;vContSupported+
--- End code ---
This comes from GDB, so is the connection to your target not stable?
A quick google search showed that it is possible a bug in gdb. Are you sure you are using the same version of GDB from command line and from codeblocks?
jjingwer:
@BlueHazzard
I am using the same version of GDB , and the only difference is :
--- Code: ---[debug]Remote replied unexpectedly to 'vMustReplyEmpty': PacketSize=4000;qXfer:memory-map:read+;qXfer:features:read+;qXfer:threads:read+;QStartNoAckMode+;vContSupported+
--- End code ---
And It did happens in cmd, But when I add
--- Code: ---fflush(stdout);
--- End code ---
into oenocd and build it, It does not happend again in cmd.
But in C::B it still happens .
Navigation
[0] Message Index
[#] Next page
Go to full version