Intel® System Debugger User Guide

ID 648476
Date 06/13/2024
Confidential
Document Table of Contents

Create the history of commands

In order to create the history of executed commands, the following functions, part of the IPython* magics module, can be used in the ISD Shell:

In [1]: threads[8].is_halted()
Out[1]: True

In [2]: hex(threads[8].get_pc())
Out[2]: '0x1800013f7'

In [3]: threads[8].step_into(instruction=True)

In [4]: %history -n -o -p
   1: >>> threads[8].is_halted()
True
   2: >>> hex(threads[8].get_pc())
'0x1800013f7'
   3: >>> threads[8].step_into(instruction=True)
   4: >>> %history -n -o -p

where the following arguments were used:

  • -n

    print line numbers for each input. This feature is only available if numbered prompts are in use.

  • -o

    print outputs for each input.

  • -p

    print classic >>> Python* prompts before each input.

In [1]: threads[8].is_halted()
Out[1]: True

In [2]: hex(threads[8].get_pc())
Out[2]: '0x1800013f7'

In [3]: threads[8].step_into(instruction=True)

In [4]: threads[8].set_breakpoint(address=0x180002218)
Out[4]: {ID: 0, Contexts: ['P1.1010'], Enabled: True, Location: 0x180002218, Type: Software}

In [5]: %history -n -o -p 2 4
   2: >>> hex(threads[8].get_pc())
'0x1800013f7'
   4: >>> threads[8].set_breakpoint(address=0x180002218)
{ID: 0, Contexts: ['P1.1010'], Enabled: True, Location: 0x180002218, Type: Software}

In [6]: %history -n -o -p 1-3
   1: >>> threads[8].is_halted()
True
   2: >>> hex(threads[8].get_pc())
'0x1800013f7'
   3: >>> threads[8].step_into(instruction=True)

where specific line numbers were passed to be printed.

In [1]: %history -n -o -p -f "/path/to/file.txt"

where the argument -f followed by a filename indicates that the output will be redirected to the given file instead of printing it to the screen.