Pouya,
Thank you so much. Could you point me to the location of PC in the CPU hierarchy? Farzad ________________________________ From: gem5-users <gem5-users-boun...@gem5.org> on behalf of Pouya Fotouhi <pfoto...@udel.edu> Sent: Tuesday, April 11, 2017 9:37 PM To: gem5 users mailing list Cc: m5-us...@m5sim.org Subject: Re: [gem5-users] Finding which part of the code is being accessed Farzad, I think you are on the right track (about the approach you are taking using gdb), but I think the problem you are having in order to get the PC value comes from the scope you are trying to access PC. After reaching the breakpoint, I would skip a few more lines of code carefully to get back to the scope of (in terms of class hierarchy) CPU. There you can get PC much easier since it's being accessed within the same class. P.S. I would also use cgdb (at least, or ddd if you really wanna hack into it) rather than gdb, since you can easily keep an eye on the source code at the same time. Best, Pouya Fotouhi Graduate Student Department of Electrical and Computer Engineering University of Delaware Newark, DE 19716 On Tue, Apr 11, 2017 at 10:13 PM, Farshchi, Farzad <farsh...@ku.edu<mailto:farsh...@ku.edu>> wrote: Hello, I need to find out the virtual address of the instruction which is being executed (i.e. program counter) when a (data) memory access to a particular virtual page (ex. 0x000aa) takes place. The instruction address does not have to be very precise. Using the instruction address I am going to find out which part of the code is being executed at that moment. I am using ARM with O3 model in FS mode. I am thinking of stopping gem5 using a conditional breakpoint on the virtual page number in GDB and then, look up the PC. I know where to put the breakpoint (TLB::translateFs?). But I have trouble finding the PC in O3 CPU. Thank, Farzad?? _______________________________________________ gem5-users mailing list gem5-users@gem5.org<mailto: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