Hi Everyone,

I am fairly new to gem5, so I apologize if this has already been addressed, but 
I haven't been able to find a solution yet.

I am trying to add a new type of store instruction to gem5 similar to the STG 
instruction from ARM's MTE instructions.

I was wondering if there was a debug flag or an approach using GDB to determine 
what files are used when processing an instruction in gem5. 

I have tried all of the debug flags that I thought might be relevant, and tried 
to debug it using GDB, but none of the flags seem to output the 
files/functions/classes that an instruction uses and GDB only seems to output 
the files/functions related to the build environment and C libraries and it 
seems to debug the src/sim/main.cc file rather than the instructions in the 
executable that I am trying to run, so I am not sure if I am doing something 
wrong. I've also tried using the python debugger (PDB), but it seems to be 
doing something similar to GDB, as I can't seem to get it to show the files 
that are accessed when processing an instruction. 

I know that I can create my own debug flags, but with so many files/functions 
available, I am worried I will have to have a DPRINTF() in every 
file/function/class, and I'm not entirely sure if I can use DPRINTF() 
statements in some of the file extension types.

I did find an example online adding an instruction in ARM in a slightly similar 
way (https://www.cl.cam.ac.uk/~rmk35/gem5-instruction.html), but it is causing 
a panic error right now when I run it, and it has a slightly different setup 
then the regular instructions that already exist in gem5, so I want to make 
sure I am understanding how instructions are processed in gem5, especially 
since I am assuming I will need to change more things to get the new store 
instruction to work properly.

I am aware of some of the general files that need to be edited, such as:

   src/arch/arm/isa/formats/aarch64.isa
   src/arch/arm/isa/templates/mem64.isa
   src/arch/arm/isa/insts/str64.isa

But I would like to be able to see all of these files/functions/classes as they 
are used/touched as an instruction is processed through gem5. For instance, 
seeing what things are accessed when a STR instruction that already is 
implemented in gem5 is being processed.

Any help or advice would be greatly appreciated. Thank you for your time!


Respectfully,

Jason Z.
_______________________________________________
gem5-users mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

Reply via email to