Hi, I am trying to construct a debug enviroment with qemu-sh4 and came across a problem that looks like a qemu bug.
My step is: 1. compile a "hello" program for sh4 2. try to run "hello" with qemu-sh4, it’s ok
3. use cmd "qemu-sh4 -L /usr/sh4-unknown-linux-gnu -g 1234 ./hello" to start qmeu . This will make qemu stop and listen on port 1234. 4. start gdb"./gdb hello", this gdb's target is sh4-unknown-linux-gnu.
5. connect to target "target remote localhost:1234" 6. set break point and run program. ,it's ok . 7. but when i tried to print a variable "a" in this point , the display value is erroneous, something like "$1=73628333"
8. I am sure the program is definitely right, but why the printed value is erroneous.
This does not look like a gdb problem, I think it's a problem of qemu.
Any help will be appreciated! thank you very much!