Menu

#395 segfault: jtag drscan <tapname> 32 1

0.11.0
new
nobody
None
2023-05-02
2023-04-28
fenugrec
No

On latest master (91bd43134) :

>  jtag drscan auto0.tap 32 1
Connection closed by foreign host.
*******
openocd: src/jtag/drivers/driver.c:166: interface_jtag_add_dr_scan: Assertion `field == out_fields + scan->num_fields' failed.
Aborted (core dumped)

Discussion

  • Paul Fertser

    Paul Fertser - 2023-05-02

    Hi,

    jtag drscan auto0.tap 32 1
    Connection closed by foreign host.


    openocd: src/jtag/drivers/driver.c:166: interface_jtag_add_dr_scan: Assertion `field == out_fields + scan->num_fields' failed.

    This happens because basically all taps are in BYPASS by default, and
    before manual "drscan" command you naturally need to do the
    appropriate "irscan" on the same tap (as all DR operations are current
    instruction-specific).

    Guess we should introduce a special error message for the case.

     
  • Paul Fertser

    Paul Fertser - 2023-05-02

    On Fri, Apr 28, 2023 at 09:07:14PM -0000, fenugrec wrote:

    jtag drscan auto0.tap 32 1
    Connection closed by foreign host.


    openocd: src/jtag/drivers/driver.c:166: interface_jtag_add_dr_scan: Assertion `field == out_fields + scan->num_fields' failed.
    Aborted (core dumped)

    Should be handled by https://review.openocd.org/c/openocd/+/7654

     
  • fenugrec

    fenugrec - 2023-05-02

    Thanks, good find !

     
  • Antonio Borneo

    Antonio Borneo - 2023-05-02

    If you have any 'target' (a CPU to be debugged) in your config file, then OpenOCD will run continuously polling on the target to check if it has hit a breakpoint.
    This polling can happen anytime, also within a sequence:
    irscan ...
    drscan ...
    with the result that the IR is modified under the hood.
    To prevent it, use the sequence
    poll off
    irscan ...
    drscan ...
    poll on

     
    👍
    1

Log in to post a comment.