-Index: gdb-6.8.50.20081209/bfd/elf-bfd.h
+Index: gdb-6.8.50.20090910/bfd/elf-bfd.h
===================================================================
---- gdb-6.8.50.20081209.orig/bfd/elf-bfd.h 2008-12-03 15:50:57.000000000 +0100
-+++ gdb-6.8.50.20081209/bfd/elf-bfd.h 2008-12-10 01:35:08.000000000 +0100
-@@ -2154,7 +2154,7 @@ extern Elf_Internal_Phdr * _bfd_elf_find
+--- gdb-6.8.50.20090910.orig/bfd/elf-bfd.h 2009-09-09 23:38:57.000000000 +0200
++++ gdb-6.8.50.20090910/bfd/elf-bfd.h 2009-09-10 23:01:15.000000000 +0200
+@@ -2121,7 +2121,7 @@ extern Elf_Internal_Phdr * _bfd_elf_find
extern char *elfcore_write_note
(bfd *, char *, int *, const char *, int, const void *, int);
extern char *elfcore_write_prpsinfo
extern char *elfcore_write_prstatus
(bfd *, char *, int *, long, int, const void *);
extern char * elfcore_write_pstatus
-Index: gdb-6.8.50.20081209/bfd/elf.c
+Index: gdb-6.8.50.20090910/bfd/elf.c
===================================================================
---- gdb-6.8.50.20081209.orig/bfd/elf.c 2008-12-03 15:50:57.000000000 +0100
-+++ gdb-6.8.50.20081209/bfd/elf.c 2008-12-10 01:35:08.000000000 +0100
-@@ -8345,6 +8345,7 @@ char *
+--- gdb-6.8.50.20090910.orig/bfd/elf.c 2009-09-09 23:38:57.000000000 +0200
++++ gdb-6.8.50.20090910/bfd/elf.c 2009-09-10 23:04:17.000000000 +0200
+@@ -8398,6 +8398,7 @@ char *
elfcore_write_prpsinfo (bfd *abfd,
char *buf,
int *bufsiz,
const char *fname,
const char *psargs)
{
-@@ -8371,9 +8372,15 @@ elfcore_write_prpsinfo (bfd *abfd,
+@@ -8424,9 +8425,15 @@ elfcore_write_prpsinfo (bfd *abfd,
int note_type = NT_PRPSINFO;
#endif
return elfcore_write_note (abfd, buf, bufsiz,
note_name, note_type, &data, sizeof (data));
}
-@@ -8388,9 +8395,15 @@ elfcore_write_prpsinfo (bfd *abfd,
+@@ -8441,9 +8448,15 @@ elfcore_write_prpsinfo (bfd *abfd,
int note_type = NT_PRPSINFO;
#endif
return elfcore_write_note (abfd, buf, bufsiz,
note_name, note_type, &data, sizeof (data));
}
-Index: gdb-6.8.50.20081209/gdb/amd64-linux-nat.c
+Index: gdb-6.8.50.20090910/gdb/amd64-linux-nat.c
===================================================================
---- gdb-6.8.50.20081209.orig/gdb/amd64-linux-nat.c 2008-12-10 01:28:28.000000000 +0100
-+++ gdb-6.8.50.20081209/gdb/amd64-linux-nat.c 2008-12-10 01:35:08.000000000 +0100
-@@ -139,6 +139,7 @@ static int amd64_linux_gregset32_reg_off
+--- gdb-6.8.50.20090910.orig/gdb/amd64-linux-nat.c 2009-09-10 23:01:07.000000000 +0200
++++ gdb-6.8.50.20090910/gdb/amd64-linux-nat.c 2009-09-10 23:01:15.000000000 +0200
+@@ -140,6 +140,7 @@ static int amd64_linux_gregset32_reg_off
static char *
amd64_linux_elfcore_write_prpsinfo (bfd *abfd, char *buf, int *bufsiz,
+ void *info,
const char *fname, const char *psargs)
{
- if (gdbarch_ptr_bit(current_gdbarch) == 32)
-@@ -148,14 +149,20 @@ amd64_linux_elfcore_write_prpsinfo (bfd
+ if (gdbarch_ptr_bit (target_gdbarch) == 32)
+@@ -149,14 +150,20 @@ amd64_linux_elfcore_write_prpsinfo (bfd
struct elf_prpsinfo32 data;
note_type = NT_PRPSINFO;
}
static void
-Index: gdb-6.8.50.20081209/gdb/fbsd-nat.c
+Index: gdb-6.8.50.20090910/gdb/fbsd-nat.c
===================================================================
---- gdb-6.8.50.20081209.orig/gdb/fbsd-nat.c 2008-10-28 16:22:12.000000000 +0100
-+++ gdb-6.8.50.20081209/gdb/fbsd-nat.c 2008-12-10 01:35:08.000000000 +0100
-@@ -210,6 +210,7 @@ fbsd_make_corefile_notes (bfd *obfd, int
+--- gdb-6.8.50.20090910.orig/gdb/fbsd-nat.c 2009-07-02 19:21:06.000000000 +0200
++++ gdb-6.8.50.20090910/gdb/fbsd-nat.c 2009-09-10 23:01:15.000000000 +0200
+@@ -211,6 +211,7 @@ fbsd_make_corefile_notes (bfd *obfd, int
psargs = reconcat (psargs, psargs, " ", get_inferior_args (), NULL);
note_data = elfcore_write_prpsinfo (obfd, note_data, note_size,
fname, psargs);
}
-Index: gdb-6.8.50.20081209/gdb/linux-nat.c
+Index: gdb-6.8.50.20090910/gdb/linux-nat.c
===================================================================
---- gdb-6.8.50.20081209.orig/gdb/linux-nat.c 2008-12-10 01:28:14.000000000 +0100
-+++ gdb-6.8.50.20081209/gdb/linux-nat.c 2008-12-10 01:35:25.000000000 +0100
-@@ -53,6 +53,7 @@
- #include <sys/types.h>
- #include "gdb_dirent.h"
+--- gdb-6.8.50.20090910.orig/gdb/linux-nat.c 2009-09-10 23:01:06.000000000 +0200
++++ gdb-6.8.50.20090910/gdb/linux-nat.c 2009-09-10 23:01:15.000000000 +0200
+@@ -55,6 +55,7 @@
#include "xml-support.h"
+ #include "terminal.h"
+ #include <sys/vfs.h>
+#include "gdb_procfs32.h" /* for struct elf_prpsinfo32 */
- #ifdef HAVE_PERSONALITY
- # include <sys/personality.h>
-@@ -216,7 +217,7 @@ static LONGEST (*super_xfer_partial) (st
+ #ifndef SPUFS_MAGIC
+ #define SPUFS_MAGIC 0x23c9b64e
+@@ -222,7 +223,7 @@ static LONGEST (*super_xfer_partial) (st
/* This functions make elfcore note sections.
They may get overriden by code adjusting data for multi-target builds. */
char *(*linux_elfcore_write_prpsinfo)
char *(*linux_elfcore_write_prstatus)
(bfd *, char *, int *, long, int, const void *) = elfcore_write_prstatus;
static char *
-@@ -3614,6 +3615,159 @@ linux_nat_corefile_thread_callback (stru
- return 0;
+@@ -3946,6 +3947,159 @@ linux_spu_make_corefile_notes (bfd *obfd
+ return args.note_data;
}
+/* Should be always true for Linux */
+
+#if ULONG_MAX > 0xffffffffU
+ /* We skip this code on 32-bit gdb. */
-+ if (gdbarch_ptr_bit (current_gdbarch) == 64)
++ if (gdbarch_ptr_bit (target_gdbarch) == 64)
+ {
+ struct elf_prpsinfo *info = xzalloc (sizeof (*info));
+
+ return info;
+ }
+#endif
-+ if (gdbarch_ptr_bit (current_gdbarch) == 32)
++ if (gdbarch_ptr_bit (target_gdbarch) == 32)
+ {
+ struct elf_prpsinfo32 *info = xzalloc (sizeof (*info));
+
/* Fills the "to_make_corefile_note" target vector. Builds the note
section for a corefile, and returns it in a malloc buffer. */
-@@ -3633,8 +3787,14 @@ linux_nat_make_corefile_notes (bfd *obfd
+@@ -3966,8 +4120,14 @@ linux_nat_make_corefile_notes (bfd *obfd
if (get_exec_file (0))
{
if (get_inferior_args ())
{
char *string_end;
-@@ -3650,9 +3810,15 @@ linux_nat_make_corefile_notes (bfd *obfd
+@@ -3983,9 +4143,15 @@ linux_nat_make_corefile_notes (bfd *obfd
psargs_end - string_end);
}
}
}
/* Dump information for threads. */
-Index: gdb-6.8.50.20081209/gdb/linux-nat.h
+Index: gdb-6.8.50.20090910/gdb/linux-nat.h
===================================================================
---- gdb-6.8.50.20081209.orig/gdb/linux-nat.h 2008-12-10 01:27:33.000000000 +0100
-+++ gdb-6.8.50.20081209/gdb/linux-nat.h 2008-12-10 01:35:08.000000000 +0100
-@@ -138,7 +138,7 @@ struct siginfo *linux_nat_get_siginfo (p
+--- gdb-6.8.50.20090910.orig/gdb/linux-nat.h 2009-09-10 23:01:06.000000000 +0200
++++ gdb-6.8.50.20090910/gdb/linux-nat.h 2009-09-10 23:01:15.000000000 +0200
+@@ -154,7 +154,7 @@ struct siginfo *linux_nat_get_siginfo (p
/* These functions make elfcore note sections.
They may get overriden by code adjusting data for multi-target builds. */
extern char *(*linux_elfcore_write_prpsinfo)
extern char *(*linux_elfcore_write_prstatus)
(bfd *, char *, int *, long, int, const void *);
extern char *(*linux_elfcore_write_prfpreg)
-Index: gdb-6.8.50.20081209/gdb/procfs.c
+Index: gdb-6.8.50.20090910/gdb/procfs.c
===================================================================
---- gdb-6.8.50.20081209.orig/gdb/procfs.c 2008-11-09 12:27:17.000000000 +0100
-+++ gdb-6.8.50.20081209/gdb/procfs.c 2008-12-10 01:35:08.000000000 +0100
-@@ -6181,6 +6181,7 @@ procfs_make_note_section (bfd *obfd, int
+--- gdb-6.8.50.20090910.orig/gdb/procfs.c 2009-08-01 02:02:04.000000000 +0200
++++ gdb-6.8.50.20090910/gdb/procfs.c 2009-09-10 23:01:15.000000000 +0200
+@@ -6147,6 +6147,7 @@ procfs_make_note_section (bfd *obfd, int
note_data = (char *) elfcore_write_prpsinfo (obfd,
note_data,
note_size,