gem5-users@gem5.org

The gem5 Users mailing list

View all threads

Question about gem5 startup code breakpoint debugging

YZ
yb_zhang@mail.ustc.edu.cn
Thu, Dec 7, 2023 7:03 PM

Hello, everyone!

I am trying out computer architecture with gem5 and am interested in gem5. I'm looking forward to understanding the whole gem5 runtime startup process, i.e. from "src/sim/main.cc" to "src/python/m5/main.py", then to gem5 startup, and then to simulation of user scripts. I tried to trace this process through breakpoints, but when debugging through gdb, I can't trace breakpoints to "src/python/m5/main.py". Is there any way to trace this process, is it only possible to analyze this process by reading the source code? I don't think so, I guess I haven't found a way yet.

Also I would like to know if there is any way to mix debugging C++/Python code in the gem5 project, and how the gem5 developers debug this code that creates the gem5 runtime?

Looking forward to your answers, thanks!

Hello, everyone! I am trying out computer architecture with gem5 and am interested in gem5. I'm looking forward to understanding the whole gem5 runtime startup process, i.e. from "src/sim/main.cc" to "src/python/m5/main.py", then to gem5 startup, and then to simulation of user scripts. I tried to trace this process through breakpoints, but when debugging through gdb, I can't trace breakpoints to "src/python/m5/main.py". Is there any way to trace this process, is it only possible to analyze this process by reading the source code? I don't think so, I guess I haven't found a way yet. Also I would like to know if there is any way to mix debugging C++/Python code in the gem5 project, and how the gem5 developers debug this code that creates the gem5 runtime? Looking forward to your answers, thanks!