{"record":{"id":"4fbaf496bdc4652b","repo":"go-delve/delve","slug":"could-not-get-thread-identity-information","errorCode":null,"errorMessage":"could not get thread identity information","messagePattern":"could not get thread identity information","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/proc/native/registers_darwin_amd64.go","lineNumber":301,"sourceCode":"\tcase x86asm.R14:\n\t\treturn r.r14, nil\n\tcase x86asm.R15:\n\t\treturn r.r15, nil\n\t}\n\n\treturn 0, proc.ErrUnknownRegister\n}\n\nfunc registers(thread *nativeThread) (proc.Registers, error) {\n\tvar state C.x86_thread_state64_t\n\tvar identity C.thread_identifier_info_data_t\n\tkret := C.get_registers(C.mach_port_name_t(thread.os.threadAct), &state)\n\tif kret != C.KERN_SUCCESS {\n\t\treturn nil, fmt.Errorf(\"could not get registers\")\n\t}\n\tkret = C.get_identity(C.mach_port_name_t(thread.os.threadAct), &identity)\n\tif kret != C.KERN_SUCCESS {\n\t\treturn nil, fmt.Errorf(\"could not get thread identity information\")\n\t}\n\t/*\n\t\tthread_identifier_info::thread_handle contains the base of the\n\t\tthread-specific data area, which on x86 and x86_64 is the thread’s base\n\t\taddress of the %gs segment. 10.9.2 xnu-2422.90.20/osfmk/kern/thread.c\n\t\tthread_info_internal() gets the value from\n\t\tmachine_thread::cthread_self, which is the same value used to set the\n\t\t%gs base in xnu-2422.90.20/osfmk/i386/pcb_native.c\n\t\tact_machine_switch_pcb().\n\t\t--\n\t\tcomment copied from chromium's crashpad\n\t\thttps://chromium.googlesource.com/crashpad/crashpad/+/master/snapshot/mac/process_reader.cc\n\t*/\n\tregs := &Regs{\n\t\trax:    uint64(state.__rax),\n\t\trbx:    uint64(state.__rbx),\n\t\trcx:    uint64(state.__rcx),\n\t\trdx:    uint64(state.__rdx),","sourceCodeStart":283,"sourceCodeEnd":319,"githubUrl":"https://github.com/go-delve/delve/blob/a23773e6c31361e43246bc43a424ee009679b174/pkg/proc/native/registers_darwin_amd64.go#L283-L319","documentation":"Error \"could not get thread identity information\" thrown in go-delve/delve.","triggerScenarios":"Thrown at pkg/proc/native/registers_darwin_amd64.go:301 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"a23773e6c31361e43246bc43a424ee009679b174","analyzedAt":"2026-08-31T15:12:45.221Z","schemaVersion":2},"datasetVersion":"2026-08-31T19:17:28.585Z"}