Artyom Tarasenko wrote:
it seems that make clean && make is not enough to rebuild. Or -O is redefined somewhere.
Normally I do the following:
rm -rf obj-sparc32 ./config/scripts/switch-arch cross-sparc32 (edit obj-sparc32/Makefile to add -O0 -g) make cp obj-sparc32/openbios-builtin.elf.nostrip path/to/qemu/share/openbios-sparc32
Then fire up qemu with -s -S, connect with "target remote :1234" and set the symbols with "symbol-file openbios-builtin.elf.nostrip". Finally set everything back in motion with "cont".
Secondly, you may need to try building gdb with "./configure --target=sparc-linux" as the standard sparc-elf-gdb binaries caused me problems with missing register sets (particularly on SPARC64 but YMMV).
Yes, that was the problem. I intended to debug ufsboot, so I compiled gdb with --target=sparc-solaris. With sparc-linux it is working.
Excellent :)
HTH,
Mark.