我正在尝试更加高效地保持懒惰...所以为了在构建之后启动avarice和gdb,我将其添加到我的Makefile中:
gdb:
make
./start_avarice.sh & \
avr-gdb target.elf
这种工作,avarice在后台运行,avr-gdb被启动。 但我看不到我在gdb-cli中输入的任何命令。这就像cli的最后一行没有显示:
Reading symbols from target.elf...done.
0x00007000 in ?? ()
(gdb) Can't see this line and don't know what I'm typing here! <RETURN>
Undefined command: "Can't see this line and don't know what I'm typing here!". Try "help".
除此之外,avr-gdb似乎工作正常。
(gdb) b Bus.cpp:512
Breakpoint 1 at 0x2064: file /home/mrv/sketchbook/libraries/libPam/bus/Bus.cpp, line 512.
(gdb) i b
Num Type Disp Enb Address What
1 breakpoint keep y 0x00002064 in Bus::updateUUID(unsigned long) at /home/mrv/sketchbook/libraries/libPam/bus/Bus.cpp:512
(gdb) c
Continuing.
显然,当我在gdb中时,make仍在运行。这可能是cli奇怪显示的原因吗?
有没有办法在make返回后执行脚本/命令?
gdb:
make
<when_make_returns_do>
./start_avarice.sh & \
avr-gdb target.elf
谢谢!