Следующая попытка подключения не удалась.reiscV-gdb -> patched openOCD
(см. Настройку ниже).Следующие сообщения отображаются в gdb и openOCD
riscV-gdb output
(gdb) target remote 127.0.0.1:3333
Remote debugging using 127.0.0.1:3333
warning: Architecture rejected target-supplied description
warning: No executable has been specified and target does not support
determining executable automatically. Try using the "file" command.
Truncated register 22 in remote 'g' packet
openOCD отладочный вывод вышеописанной попытки
Info : 543 2761051 server.c:100 add_connection(): accepting 'gdb' connection on tcp/3333
Debug: 544 2761052 breakpoints.c:354 breakpoint_clear_target_internal(): Delete all breakpoints for target: myOwnCPU.cpu
Debug: 545 2761052 breakpoints.c:494 watchpoint_clear_target(): Delete all watchpoints for target: myOwnCPU.cpu
Debug: 546 2761052 target.c:1581 target_call_event_callbacks(): target event 19 (gdb-attach)
Debug: 547 2761052 target.c:4535 target_handle_event(): target(0): myOwnCPU.cpu (myOwnCPU) event: 19 (gdb-attach) action: halt
Debug: 548 2761053 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_halt
Debug: 549 2761055 command.c:143 script_debug(): command - halt ocd_halt
Debug: 551 2761057 target.c:3018 handle_halt_command(): -
Debug: 570 2761060 gdb_server.c:1014 gdb_new_connection(): New GDB Connection: 1, Target myOwnCPU.cpu, state: halted
Debug: 571 2761060 gdb_server.c:3160 gdb_input_inner(): received packet: 'qSupported:multiprocess+;swbreak+;hwbreak+;qRelocInsn+;fork-events+;vfork-events+;exec-events+;vContSupported+;QThreadEvents+;no-resumed+;xmlRegisters=i386'
Debug: 575 2761061 gdb_server.c:3160 gdb_input_inner(): received packet: 'vMustReplyEmpty'
Debug: 576 2761061 gdb_server.c:3160 gdb_input_inner(): received packet: 'QStartNoAckMode'
Debug: 577 2761061 gdb_server.c:639 gdb_get_packet_inner(): Received first acknowledgment after entering noack mode. Ignoring it.
Debug: 578 2761061 gdb_server.c:3160 gdb_input_inner(): received packet: 'Hg0'
Debug: 579 2761062 gdb_server.c:3160 gdb_input_inner(): received packet: 'qXfer:features:read:target.xml:0,1000'
Debug: 583 2761072 gdb_server.c:3160 gdb_input_inner(): received packet: 'qXfer:features:read:target.xml:1000,1000'
Debug: 584 2761073 gdb_server.c:3160 gdb_input_inner(): received packet: 'qXfer:features:read:target.xml:2000,1000'
Debug: 585 2761073 gdb_server.c:3160 gdb_input_inner(): received packet: 'qXfer:features:read:target.xml:3000,1000'
Debug: 586 2761074 gdb_server.c:3160 gdb_input_inner(): received packet: 'qXfer:features:read:target.xml:4000,1000'
Debug: 587 2761074 gdb_server.c:3160 gdb_input_inner(): received packet: 'qXfer:features:read:target.xml:5000,1000'
Debug: 588 2761077 gdb_server.c:3160 gdb_input_inner(): received packet: 'qTStatus'
Debug: 589 2761077 gdb_server.c:3160 gdb_input_inner(): received packet: '?'
Debug: 590 2761077 gdb_server.c:3160 gdb_input_inner(): received packet: 'qXfer:threads:read::0,1000'
Debug: 591 2761077 gdb_server.c:3160 gdb_input_inner(): received packet: 'Hc-1'
Debug: 592 2761078 gdb_server.c:3160 gdb_input_inner(): received packet: 'qC'
Debug: 593 2761078 gdb_server.c:3160 gdb_input_inner(): received packet: 'qAttached'
Debug: 594 2761078 gdb_server.c:3160 gdb_input_inner(): received packet: 'g'
Debug: 598 2761096 gdb_server.c:1046 gdb_connection_closed(): GDB Close, Target: myOwnCPU.cpu, state: halted, gdb_actual_connections=0
Debug: 599 2761096 target.c:1581 target_call_event_callbacks(): target event 6 (gdb-end)
Debug: 600 2761096 target.c:1581 target_call_event_callbacks(): target event 20 (gdb-detach)
Info : 601 2761096 server.c:577 server_loop(): dropped 'gdb' connection
- Я не знаюпочему разорвано соединение
- Полагаю, мне нужно предоставить больше информации в моем
target.get_gdb_reg_list()
- Или я указал неверную информацию в моем
target.get_gdb_reg_list()
- Мне нужно знать, какую информацию нужно предоставить, чтобы riscV-gdb принял соединение от openOCD (выступающего в роли gdb-сервера).
Настройка:
original riscv-gdb
openOCD из masterbranch
- добавлена поддержка нового TAP-контроллера (ошибочная часть)
- цепочка: jtag (на основе ftdi) - "новый TAP"-" riscV (нулевой риск) "
Приложение:
Соединение с обычным GDB (7.11.1) работает в общем:
(gdb) target remote 127.0.0.1:3333
Remote debugging using 127.0.0.1:3333
warning: Architecture rejected target-supplied description
0x000041b8 in ?? ()
Я могу запускать / останавливать процессор, загружать изображения и т. Д. Мой вид регистров выглядит как
(gdb) info registers
eax 0x0 0
ecx 0x88aa 34986
edx 0x6fc4 28612
ebx 0x0 0
esp 0x0 0x0
ebp 0x0 0x0
esi 0x850 2128
edi 0x0 0
eip 0x41b8 0x41b8
eflags 0x0 [ ]
cs 0x40e4 16612
ss 0x4 4
ds 0xffffffff -1
es 0x7f7f7f7f 2139062143
fs 0xa00 2560
gs 0x0 0
Должно быть гораздо больше регистров.от х00 до х31 + пара конфиг регистров.Счетчик программ правильный.