AsahiLinux / m1n1

A bootloader and experimentation playground for Apple Silicon
MIT License
3.62k stars 210 forks source link

gdb: invalid register name 'ttbr1_el1' 'elr_el1' #422

Open clingfei opened 2 days ago

clingfei commented 2 days ago

When debugging use gdb, I want to view the value in some system registers such as elr_el1, ttbr1_el1, tcr_el1,..., etc. However, it gdb can not identicate these registers. Does m1n1 support them?

sukunahun commented 2 days ago

I dont think so you can access system register with gdb..... there should be some other way around... if you are running macos on VM then you can access these using "re re --all" ... however on what system(specs) you are running m1n1?

clingfei commented 2 days ago

Thanks for your reply. I am not running macos on VM. I boot asahi under hypervisor as target and use another asahi as host, following to the steps in this document(Tethered Boot Setup (For Developers)). And i run gdbserver in hypervisor console, connect gdb to it and start debugging. If I boot linux on qemu, and connect gdb to qemu, I can access these system register just like " i r TTBR1_EL1".