• Gerhard Stenzel's avatar
    [POWERPC] spufs: fix incorrect file descriptors in SPU coredump note names · ada397e9
    Gerhard Stenzel authored
    At present, ppu-gdb can't trace spu infomation with coredump generated
    by the kernel. While the core dumps notes have correct contents, they
    have the wrong names, as the file descriptors used to generate the note
    names are off-by-one. An application that opens a SPE context as fd 3,
    the current core dump code will generate notes like:
      SPU/4/mem
      SPU/4/regs
    etc.
    
    This confuses GDB, which knows it is looking for SPE context 3 (from
    parsing the spu_context_run system call arguments), and cannot find
    any notes that match context 3.
    
    This change corrects the file descriptor counting, to only increment
    the fd until after we've written the note name.
    Signed-off-by: default avatarGerhard Stenzel <stenzel@de.ibm.com>
    Signed-off-by: default avatarJeremy Kerr <jk@ozlabs.org>
    ada397e9
coredump.c 5.45 KB