こんにちは。うっちーです。
GCCでメイクしたelfファイルをRX Simulatorを使ってデバッグしようとしています。e2studio上では正常にデバッグできますが、コマンドラインの e2-server-gdb + rx-elf-gdb で、実行("C"コマンド)すると、「Cannot execute this command while the selected thread is running」が表示されて、実行できません。何かご存じの方は教えていただけないでしょうか?
ツールチェイン: GCC for Renesas RXデバイス: R5F51403AxFM
よろしくお願いいたします。
うっちー さん、こんにちは。NoMaYと申します。以下のコマンド群で試してみてエラー無く実行出来るようになりませんでしょうか?RX Simulator環境でコマンドラインからプロジェクトを実行するjapan.renesasrulz.com/cafe_rene/f/forum5/7608/rx-simulator/40131#40131↑より、rx-elf-gdbの起動後の操作から、実行するだけの場合向けに、必要な箇所を抜粋(portはそちらに合わせて下さい)↓
set pagination offset non-stop ontarget extended-remote-rx localhost:60916monitor enable_stopped_notify_on_connectmonitor enable_execute_on_connect# wait for a notificationloadc
最近Atom IDEとかVisual Studio Codeとか新しい開発環境が出て来てますね(Renesas CSplusと連携させる方法を探したいですね)japan.renesasrulz.com/cafe_rene/f/forum21/4553/atom-ide-visual-studio-code-renesas-csplus/40706#40706↑のvscode_helper_files_rx_20211227.zipより、インタラクティブにデバッグもする場合向けに、取り出し↓.vscode/.scripts/gdb_setup.gdbと.vscode/.scripts/gdb_custom_launch_setup.gdbと.vscode/launch.jsonを切り貼り(portはそちらに合わせて下さい)
set breakpoint pending onset detach-on-fork onenable pretty-printingset python print-stack noneset print object onset print sevenbit-strings onset host-charset UTF-8#set target-charset WINDOWS-31J # Because this charset does not exist.set target-wide-charset UTF-16set target-async onset pagination offset non-stop onset auto-solib-add onset step-mode offset breakpoint always-inserted oninferior 1set remotetimeout 10set tcp connect-timeout 30# For Visual Studio (i.e. not for Visual Studio Code)alias logout=quittarget extended-remote-rx localhost:60916monitor enable_stopped_notify_on_connectmonitor enable_execute_on_connectloadmonitor resetc
NoMaYさん。ありがとうございます。
(gdb) monitor enable_stopped_notify_on_connect
を実行した直後に以下のようなメッセージが出てしまいます。
(gdb) set pagination off(gdb) set non-stop on(gdb) target extended-remote-rx localhost:60916Remote debugging using localhost:60916(gdb) monitor enable_stopped_notify_on_connect(gdb) warning: while parsing target memory map (at line 6): Required element <memory> is missing
Program received signal SIGINT, Interrupt.0x00000000 in ?? ()
無視して、コマンドを続けると実行できるようですが、問題ないでしょうか?
うっちー さん、こんにちは。NoMaYです。> (gdb) warning: while parsing target memory map (at line 6): Required element <memory> is missingしばらく単体rx-elf-gdbの起動に注意を払っていませんでしたので、そういうメッセージが表示されるようになっていたことに気付きませんでした。影響は分からないです。ただ、以下のスレッドのように i mem とコマンド入力をした時に何が表示されるか、知りたいと思いました。(以下のスレッドではe2 studioのデバッガコンソールから入力していますが、rx-elf-gdbのプロンプトから入力すると?、ということです。)SDRAM領域に割り付けられた変数が確認できないjapan.renesasrulz.com/cafe_rene/f/forum5/7606/sdram/40105#40105[関連リンク]ファームウェアのロードに失敗する。【デュアルバンク】【RX72N】japan.renesasrulz.com/cafe_rene/f/forum5/7269/rx72n/38781#38781
NoMaYさん、こんにちは。
"i mem"コマンドを入力したら、以下のようになりました。
(gdb) monitor enable_stopped_notify_on_connect(gdb) warning: while parsing target memory map (at line 6): Required element <memory> is missing
Program received signal SIGINT, Interrupt.0x00000000 in ?? ()monitor enable_execute_on_connect(gdb) # wait for a notification(gdb) loadLoading section .text, size 0x5c1a lma 0xffff0000Loading section .rvectors, size 0x400 lma 0xffff5c1cLoading section .rodata, size 0x2a4 lma 0xffff601cLoading section .data, size 0x844 lma 0xffff62c0Loading section .exvectors, size 0x7c lma 0xffffff80Loading section .fvectors, size 0x4 lma 0xfffffffcStart address 0xffff0000, load size 27522Transfer rate: 866 KB/sec, 2117 bytes/write.(gdb) i memUsing memory regions provided by the target.There are no memory regions defined.(gdb)
うっちー さん、こんにちは。NoMaYです。> Using memory regions provided by the target.ワーニングメッセージの印象ですと、何かe2-server-gdbとrx-elf-gdbの間でやりとりされている内部情報に関して齟齬があったのかな、という感じですが、ちょっと詳細まで分からなさそうですね。そうなると、この状況ですと、自分なら何か問題が出るまでそのまま使ってみる、問題が起きても mem コマンドで何とか対処出来るだろう、という方向で行くかな、と思うのです。
ワーニングの詳細はわからないけど、とりあえず使ってみるということにします。
それから、VS Codeについては、時間があるときに試してみたいと思います。
ありがとうございました。