[gem5-users] Debug for c++
Hello everyone, My OS is Linux Mint 18 Cinnamon 64-bit and Gem5 is in SE mode of x86. main.cpp #include #include #include using namespace std; void task1(string msg) { cout << "task1 says: " << msg<___ gem5-users mailing list gem5-users@gem5.org http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
Re: [gem5-users] Debug for c++
Hello Yunxia, If you want to run pthread application in SE mode, you need to use m5 threads library (ref:https://github.com/gem5/m5threads) or shift to FS mode of gem5. Best regards, Abhishek On Wed, Mar 6, 2019 at 2:30 PM Yunxia Zhu wrote: > Hello everyone, > > My OS is Linux Mint 18 Cinnamon 64-bit and Gem5 is in SE mode of x86. > > main.cpp > > #include > > #include > > #include > > > > using namespace std; > > > > void task1(string msg) > > { > > cout << "task1 says: " << msg< > } > > > > int main() > > { > > thread t1(task1, "Hello"); > > t1.join(); > > } > > > I use this command to compile main.cpp > > g++ -std=c++11 -pthread -o main main.cpp > > And command for debug information > > objdump --dwarf=info main > > but there is no result showing. Anyone has same problem? Thank you > > > > With best regards > > Yunxia Zhu > > > > > > ___ > gem5-users mailing list > gem5-users@gem5.org > http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users ___ gem5-users mailing list gem5-users@gem5.org http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
Re: [gem5-users] Debug for c++
On Wed, Mar 6, 2019 at 7:30 PM Yunxia Zhu wrote: > Hello everyone, > > My OS is Linux Mint 18 Cinnamon 64-bit and Gem5 is in SE mode of x86. > > main.cpp > > #include > > #include > > #include > > > > using namespace std; > > > > void task1(string msg) > > { > > cout << "task1 says: " << msg< > } > > > > int main() > > { > > thread t1(task1, "Hello"); > > t1.join(); > > } > > > I use this command to compile main.cpp > > g++ -std=c++11 -pthread -o main main.cpp > Add -ggdb3. Also try googling "gcc debug information" and man gcc :-) > And command for debug information > > objdump --dwarf=info main > > but there is no result showing. Anyone has same problem? Thank you > > > > With best regards > > Yunxia Zhu > > > > > > ___ > gem5-users mailing list > gem5-users@gem5.org > http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users ___ gem5-users mailing list gem5-users@gem5.org http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users