[OpenBIOS] OpenSolaris starts to live on SPARC64

Mark Cave-Ayland mark.cave-ayland at siriusit.co.uk
Tue Apr 6 16:09:03 CEST 2010


Artyom Tarasenko wrote:

> Got me. I spent too much time debugging stuff without the source. :)
> 
> qemu+gdb seem to be unstable though: sometimes qemu crash, and here it
> just hangs:

Hmmm it's always been fairly solid for me. If you can get qemu to crash 
consistently, attach a separate gdb to that and then post the backtrace 
to the qemu list :)

> (gdb) break ../arch/sparc32/romvec.c:324
> (gdb) target remote :1234
> Remote debugging using :1234
> 0x00000000 in ?? ()
> (gdb) cont
> Continuing.
> 
> Breakpoint 1, obp_devread (dev_desc=<value optimized out>,
>     buf=0xffd36138
> "\377\326,L\377\326*\364\377\325\365@\377\326D\250\377\326Ix\377\331\316\200\377\331\317\024",
>     nbytes=1508192) at ../arch/sparc32/romvec.c:324
> 324                printk("Debug here!\n");
> (gdb) step
> 
> <hangs>
> 
> stepi and cont do the same. Which gdb version do you use? Mine is 7.1.

Firstly, because you have "dev_desc=<value optimized out>" in the above 
output it means you didn't compile with -O0 rather than -Os. Hence 
because of the low level optimisations you won't be able see certain 
values, or a step may not necessarily correlate to a single line.

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).

And finally, the output of my cross-gdb here is:

build at zeno:~/src/openbios/openbios-devel$ sparc64-linux-gdb -v
GNU gdb 6.8
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 
<http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "--host=x86_64-unknown-linux-gnu 
--target=sparc64-linux"


HTH,

Mark.

-- 
Mark Cave-Ayland - Senior Technical Architect
PostgreSQL - PostGIS
Sirius Corporation plc - control through freedom
http://www.siriusit.co.uk
t: +44 870 608 0063

Sirius Labs: http://www.siriusit.co.uk/labs



More information about the OpenBIOS mailing list