最近学习开发操作系统,所以能够调试你写的操作系统的虚拟机是必不可少的,所以我去下载了最新的bochs 2.6.11的源码编译安装,但是在 --enable-debugger的时候出现了问题,百度上找了很久没找到解决方法,最后在国外的debian社区的一篇文章中找到了解决方法。
这个是错误:
x86_64-pc-linux-gnu-g++ -c -I.. -I./.. -I../instrument/stubs -I./../instrument/stubs -I. -I./. -march=native -O2 -pipe -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -pthread -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT dbg_main.cc -o dbg_main.o
In file included from dbg_main.cc:28:
dbg_main.cc: In function ‘void bx_dbg_tlb_lookup(bx_lin_address)’:
../cpu/cpu.h:383:28: error: invalid use of ‘this’ in non-member function
383 | # define BX_CPU_THIS_PTR this->
| ^~~~
../cpu