The attached patch attempts to solve a bug that caused the gcore command to produce core files containing incorrect registers information. The problem caused incomplete backtraces when the files were read back into GDB. I tested this patch with the gdb testsuite, and my addition to the gcore-thread.exp test case. If OK, please commit it for me since I don't have write access. Thanks, Daniel. 2009-11-06 Daniel Gutson gdb/ * procfs.c (procfs_do_thread_registers): Added a call to fetch register values before saving them in the core file through the gcore command. (procfs_corefile_thread_callback): removed the backup of inferior_ptid before calling procfs_do_thread_registers since the function already saves and restores it before returning. gdb/testsuite/gdb.threads/ * gcore-thread.exp: Added a test case in order to check if the core dump contains the registers values, and symbol lookup is working properly. -- Daniel Gutson CodeSourcery www.codesourcery.com