If one of the source files referenced by the COD file cannot be found (e.g. it's been deleted) then the source browser gets confused and shows the current PC in the wrong file. (I found this because my build system auto-generates one of the headers and I tried to run GPSim after a partial clean).
I've done a bit of digging and found that the PicCodProgramFileType::read_src_files_from_cod method in cod.cc calls cpu->files.Add(filenm) for the missing file, but that FileContextList::Add in processor.cc gives up immediately if the file cannot be opened. However, Processor::read_src_files allocates a mapping of instructions to source locations to the FileContext returned by files[program_memory[addr]->get_file_id()] -- which explicitly assumes that the array built up matches the indices in the COD.
The fix will require missing files not to be ignored, but instead to be entered into the files array as a placeholder of some sort. NULL is not sufficient. It needs to be an instance of (a sub-class of) FileContext that returns zero from max_lines().