2
0

More than 3 years have passed since last update.

athrill(アスリル)機能マニュアル(プログラム実行制御)

Last updated at Posted at 2021-06-19

概要

athrill(アスリル)のプログラム実行制御について解説します.

ブレーク設定(b)

ブレーク設定(b)コマンドの書式は以下のとおりです.

 * break(b):
   1) break {<addr(hex)>|<funcname>}
      set a break point. Break points are shown using 'info break' command.
   2) break <file> <lineno>
      set a break point on the {<file>, <lineno>}. Break points are shown using 'info break' command.

1) break {<addr(hex)>|<funcname>}

ブレーク設定の引数には,「アドレス(16進数)」でも「関数名」でも指定することができます.

アドレス(16進数)の場合

[DBG>b 0x1c98
break 0x1c98

関数名の場合

[DBG>b main_task
break main_task 0x1c98

2) break <file> <lineno>

ブレーク設定は,ファイル名と行番号でも指定できます.

[DBG>b prc_support.S 565
break 0x5866

ステップ実行(n)

ステップ実行(n)コマンドの書式は以下のとおりです.

 * next(n):
   1) next
      step forward

1命令単位で処理を進めます.

[DBG>n
[DONE> core0 pc=0x7d0 null(null) 0x7d0: DI
[NEXT> pc=0x7d4 start.S 61
[DBG>n
[DONE> core0 pc=0x7d4 null(null) 0x7d4: MOVHI imm16(1),r0(0) r3(0):65536
[NEXT> pc=0x7d8 start.S 61
[DBG>n
[DONE> core0 pc=0x7d8 null(null) 0x7d8: MOVEA imm16(17828),r3(65536) r3(65536):83364
[NEXT> pc=0x7dc start.S 62

プログラムカウンタ(pc)が1命令単位で増えていることがわかります.

ブレーク解除(d)

ブレーク解除(d)コマンドの書式は以下のとおりです.

 * delete(d):
   1) delete
      delete all break points
   2) delete <break_no>
      delete the break point of <break_no>

1) delete

引数なしの場合は,全ブレークポイントを解除します.

[DBG>info break
[0] 0x0
[1] 0x1c98 main_task(+0x0)
[2] 0x7d4

上記状態で,d コマンドを実行すると,0x0番地以外はすべて解除されます.

[DBG>info break
[0] 0x0

2) delete <break_no>

引数に<break_no>を指定すると,当該箇所のみを解除できます.

[DBG>info break
[0] 0x0
[1] 0x1c98 main_task(+0x0)
[2] 0x7d4
[DBG>d 2
[DBG>info break
[0] 0x0
[1] 0x1c98 main_task(+0x0)
2
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
0