[Cbe-oss-dev] How is a debugger supposed to find the SPU's PC value in a CBE core file?
Ulrich Weigand
Ulrich.Weigand at de.ibm.com
Fri Jul 13 00:14:59 EST 2007
Hi John,
> When I look at the notes in a CBE core file, the npc file seems to
> be missing. For example:
Yes; the set of spufs we files added to the core file is basically the
set of files that are used by GDB. GDB does not use the npc file,
because it cannot be meaningfully used to install a changed PC
value (because every spu_run system call will reset the PC to the
new value it gets passed as argument).
> So, where does one find the value of an SPU's PC at the time of the core
dump?
GDB does the same on a core file as it does when debugging a
running process: it will check at the location of the PPC PC and
see if the thread is blocked in an spu_run system call; if so, it
will find a pointer to the SPU's PC in register 4 (and spufs ID in
register 3).
(Note that even if you had an npc file note in the core, you'd still
have to do something along those lines in order to associate any
particular SPE context with the thread that is currently running it,
if any.)
Mit freundlichen Gruessen / Best Regards
Ulrich Weigand
--
Dr. Ulrich Weigand | Phone: +49-7031/16-3727
GNU compiler/toolchain for Linux on System z and Cell BE
IBM Deutschland Entwicklung GmbH
Vorsitzender des Aufsichtsrats: Martin Jetter | Geschäftsführung:
Herbert Kircher
Sitz der Gesellschaft: Böblingen | Registergericht: Amtsgericht
Stuttgart, HRB 243294
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ozlabs.org/pipermail/cbe-oss-dev/attachments/20070712/8817e8e4/attachment.htm>
More information about the cbe-oss-dev
mailing list