* elf-bfd.h (struct core_elf_obj_tdata): New.

(struct elf_obj_tdata): Delete core_signal, core_pid, core_lwpid,
	core_program, and core_command.  Add "core".
	* elf.c (bfd_elf_mkcorefile): Allocate "core" struct.
	Update all refs to tdata core fields.
	* elf32-am33lin.c, * elf32-arm.c, * elf32-cris.c, * elf32-frv.c,
	* elf32-hppa.c, * elf32-i386.c, * elf32-m68k.c, * elf32-mips.c,
	* elf32-nios2.c, * elf32-ppc.c, * elf32-s390.c, * elf32-score.c,
	* elf32-score7.c, * elf32-sh.c, * elf32-sparc.c, * elf32-tilegx.c,
	* elf32-tilepro.c, * elf32-xtensa.c, * elf64-aarch64.c,
	* elf64-hppa.c, * elf64-mips.c, * elf64-ppc.c, * elf64-tilegx.c,
	* elf64-x86-64.c, * elfcore.h, * elfn32-mips.c: Update all refs
	to tdata core fields.
This commit is contained in:
Alan Modra 2013-02-21 03:02:30 +00:00
parent 12bd695738
commit 228e534f16
29 changed files with 225 additions and 192 deletions

View file

@ -1,3 +1,19 @@
2013-02-21 Alan Modra <amodra@gmail.com>
* elf-bfd.h (struct core_elf_obj_tdata): New.
(struct elf_obj_tdata): Delete core_signal, core_pid, core_lwpid,
core_program, and core_command. Add "core".
* elf.c (bfd_elf_mkcorefile): Allocate "core" struct.
Update all refs to tdata core fields.
* elf32-am33lin.c, * elf32-arm.c, * elf32-cris.c, * elf32-frv.c,
* elf32-hppa.c, * elf32-i386.c, * elf32-m68k.c, * elf32-mips.c,
* elf32-nios2.c, * elf32-ppc.c, * elf32-s390.c, * elf32-score.c,
* elf32-score7.c, * elf32-sh.c, * elf32-sparc.c, * elf32-tilegx.c,
* elf32-tilepro.c, * elf32-xtensa.c, * elf64-aarch64.c,
* elf64-hppa.c, * elf64-mips.c, * elf64-ppc.c, * elf64-tilegx.c,
* elf64-x86-64.c, * elfcore.h, * elfn32-mips.c: Update all refs
to tdata core fields.
2013-02-21 Alan Modra <amodra@gmail.com>
* elf-bfd.h (struct elf_obj_tdata): Rename segment_map to seg_map.

View file

@ -1534,6 +1534,16 @@ struct elf_build_id_info
} u;
};
/* tdata information grabbed from an elf core file. */
struct core_elf_obj_tdata
{
int signal;
int pid;
int lwpid;
char* program;
char* command;
};
/* Some private data is stashed away for future use using the tdata pointer
in the bfd structure. */
@ -1564,13 +1574,6 @@ struct elf_obj_tdata
bfd_vma gp; /* The gp value */
unsigned int gp_size; /* The gp size */
/* Information grabbed from an elf core file. */
int core_signal;
int core_pid;
int core_lwpid;
char* core_program;
char* core_command;
/* A mapping from external symbols to entries in the linker hash
table, used when linking. This is indexed by the symbol index
minus the sh_info field of the symbol table header. */
@ -1681,6 +1684,9 @@ struct elf_obj_tdata
/* An identifier used to distinguish different target
specific extensions to this structure. */
enum elf_target_id object_id;
/* Information grabbed from an elf core file. */
struct core_elf_obj_tdata *core;
};
#define elf_tdata(bfd) ((bfd) -> tdata.elf_obj_data)

View file

@ -263,7 +263,10 @@ bfd_boolean
bfd_elf_mkcorefile (bfd *abfd)
{
/* I think this can be done just like an object file. */
return abfd->xvec->_bfd_set_format[(int) bfd_object] (abfd);
if (!abfd->xvec->_bfd_set_format[(int) bfd_object] (abfd))
return FALSE;
elf_tdata (abfd)->core = bfd_zalloc (abfd, sizeof (*elf_tdata (abfd)->core));
return elf_tdata (abfd)->core != NULL;
}
static char *
@ -7913,9 +7916,9 @@ elfcore_make_pid (bfd *abfd)
{
int pid;
pid = elf_tdata (abfd)->core_lwpid;
pid = elf_tdata (abfd)->core->lwpid;
if (pid == 0)
pid = elf_tdata (abfd)->core_pid;
pid = elf_tdata (abfd)->core->pid;
return pid;
}
@ -8005,10 +8008,10 @@ elfcore_grok_prstatus (bfd *abfd, Elf_Internal_Note *note)
/* Do not overwrite the core signal if it
has already been set by another thread. */
if (elf_tdata (abfd)->core_signal == 0)
elf_tdata (abfd)->core_signal = prstat.pr_cursig;
if (elf_tdata (abfd)->core_pid == 0)
elf_tdata (abfd)->core_pid = prstat.pr_pid;
if (elf_tdata (abfd)->core->signal == 0)
elf_tdata (abfd)->core->signal = prstat.pr_cursig;
if (elf_tdata (abfd)->core->pid == 0)
elf_tdata (abfd)->core->pid = prstat.pr_pid;
/* pr_who exists on:
solaris 2.5+
@ -8017,9 +8020,9 @@ elfcore_grok_prstatus (bfd *abfd, Elf_Internal_Note *note)
linux 2.[01]
*/
#if defined (HAVE_PRSTATUS_T_PR_WHO)
elf_tdata (abfd)->core_lwpid = prstat.pr_who;
elf_tdata (abfd)->core->lwpid = prstat.pr_who;
#else
elf_tdata (abfd)->core_lwpid = prstat.pr_pid;
elf_tdata (abfd)->core->lwpid = prstat.pr_pid;
#endif
}
#if defined (HAVE_PRSTATUS32_T)
@ -8034,10 +8037,10 @@ elfcore_grok_prstatus (bfd *abfd, Elf_Internal_Note *note)
/* Do not overwrite the core signal if it
has already been set by another thread. */
if (elf_tdata (abfd)->core_signal == 0)
elf_tdata (abfd)->core_signal = prstat.pr_cursig;
if (elf_tdata (abfd)->core_pid == 0)
elf_tdata (abfd)->core_pid = prstat.pr_pid;
if (elf_tdata (abfd)->core->signal == 0)
elf_tdata (abfd)->core->signal = prstat.pr_cursig;
if (elf_tdata (abfd)->core->pid == 0)
elf_tdata (abfd)->core->pid = prstat.pr_pid;
/* pr_who exists on:
solaris 2.5+
@ -8046,9 +8049,9 @@ elfcore_grok_prstatus (bfd *abfd, Elf_Internal_Note *note)
linux 2.[01]
*/
#if defined (HAVE_PRSTATUS32_T_PR_WHO)
elf_tdata (abfd)->core_lwpid = prstat.pr_who;
elf_tdata (abfd)->core->lwpid = prstat.pr_who;
#else
elf_tdata (abfd)->core_lwpid = prstat.pr_pid;
elf_tdata (abfd)->core->lwpid = prstat.pr_pid;
#endif
}
#endif /* HAVE_PRSTATUS32_T */
@ -8240,13 +8243,13 @@ elfcore_grok_psinfo (bfd *abfd, Elf_Internal_Note *note)
memcpy (&psinfo, note->descdata, sizeof (psinfo));
#if defined (HAVE_PSINFO_T_PR_PID) || defined (HAVE_PRPSINFO_T_PR_PID)
elf_tdata (abfd)->core_pid = psinfo.pr_pid;
elf_tdata (abfd)->core->pid = psinfo.pr_pid;
#endif
elf_tdata (abfd)->core_program
elf_tdata (abfd)->core->program
= _bfd_elfcore_strndup (abfd, psinfo.pr_fname,
sizeof (psinfo.pr_fname));
elf_tdata (abfd)->core_command
elf_tdata (abfd)->core->command
= _bfd_elfcore_strndup (abfd, psinfo.pr_psargs,
sizeof (psinfo.pr_psargs));
}
@ -8259,13 +8262,13 @@ elfcore_grok_psinfo (bfd *abfd, Elf_Internal_Note *note)
memcpy (&psinfo, note->descdata, sizeof (psinfo));
#if defined (HAVE_PSINFO32_T_PR_PID) || defined (HAVE_PRPSINFO32_T_PR_PID)
elf_tdata (abfd)->core_pid = psinfo.pr_pid;
elf_tdata (abfd)->core->pid = psinfo.pr_pid;
#endif
elf_tdata (abfd)->core_program
elf_tdata (abfd)->core->program
= _bfd_elfcore_strndup (abfd, psinfo.pr_fname,
sizeof (psinfo.pr_fname));
elf_tdata (abfd)->core_command
elf_tdata (abfd)->core->command
= _bfd_elfcore_strndup (abfd, psinfo.pr_psargs,
sizeof (psinfo.pr_psargs));
}
@ -8283,7 +8286,7 @@ elfcore_grok_psinfo (bfd *abfd, Elf_Internal_Note *note)
implementations, so strip it off if it exists. */
{
char *command = elf_tdata (abfd)->core_command;
char *command = elf_tdata (abfd)->core->command;
int n = strlen (command);
if (0 < n && command[n - 1] == ' ')
@ -8308,7 +8311,7 @@ elfcore_grok_pstatus (bfd *abfd, Elf_Internal_Note *note)
memcpy (&pstat, note->descdata, sizeof (pstat));
elf_tdata (abfd)->core_pid = pstat.pr_pid;
elf_tdata (abfd)->core->pid = pstat.pr_pid;
}
#if defined (HAVE_PSTATUS32_T)
else if (note->descsz == sizeof (pstatus32_t))
@ -8318,7 +8321,7 @@ elfcore_grok_pstatus (bfd *abfd, Elf_Internal_Note *note)
memcpy (&pstat, note->descdata, sizeof (pstat));
elf_tdata (abfd)->core_pid = pstat.pr_pid;
elf_tdata (abfd)->core->pid = pstat.pr_pid;
}
#endif
/* Could grab some more details from the "representative"
@ -8348,11 +8351,11 @@ elfcore_grok_lwpstatus (bfd *abfd, Elf_Internal_Note *note)
memcpy (&lwpstat, note->descdata, sizeof (lwpstat));
elf_tdata (abfd)->core_lwpid = lwpstat.pr_lwpid;
elf_tdata (abfd)->core->lwpid = lwpstat.pr_lwpid;
/* Do not overwrite the core signal if it has already been set by
another thread. */
if (elf_tdata (abfd)->core_signal == 0)
elf_tdata (abfd)->core_signal = lwpstat.pr_cursig;
if (elf_tdata (abfd)->core->signal == 0)
elf_tdata (abfd)->core->signal = lwpstat.pr_cursig;
/* Make a ".reg/999" section. */
@ -8435,11 +8438,11 @@ elfcore_grok_win32pstatus (bfd *abfd, Elf_Internal_Note *note)
switch (type)
{
case 1 /* NOTE_INFO_PROCESS */:
/* FIXME: need to add ->core_command. */
/* FIXME: need to add ->core->command. */
/* process_info.pid */
elf_tdata (abfd)->core_pid = bfd_get_32 (abfd, note->descdata + 8);
elf_tdata (abfd)->core->pid = bfd_get_32 (abfd, note->descdata + 8);
/* process_info.signal */
elf_tdata (abfd)->core_signal = bfd_get_32 (abfd, note->descdata + 12);
elf_tdata (abfd)->core->signal = bfd_get_32 (abfd, note->descdata + 12);
break;
case 2 /* NOTE_INFO_THREAD */:
@ -8764,15 +8767,15 @@ static bfd_boolean
elfcore_grok_netbsd_procinfo (bfd *abfd, Elf_Internal_Note *note)
{
/* Signal number at offset 0x08. */
elf_tdata (abfd)->core_signal
elf_tdata (abfd)->core->signal
= bfd_h_get_32 (abfd, (bfd_byte *) note->descdata + 0x08);
/* Process ID at offset 0x50. */
elf_tdata (abfd)->core_pid
elf_tdata (abfd)->core->pid
= bfd_h_get_32 (abfd, (bfd_byte *) note->descdata + 0x50);
/* Command name at 0x7c (max 32 bytes, including nul). */
elf_tdata (abfd)->core_command
elf_tdata (abfd)->core->command
= _bfd_elfcore_strndup (abfd, note->descdata + 0x7c, 31);
return elfcore_make_note_pseudosection (abfd, ".note.netbsdcore.procinfo",
@ -8785,7 +8788,7 @@ elfcore_grok_netbsd_note (bfd *abfd, Elf_Internal_Note *note)
int lwp;
if (elfcore_netbsd_get_lwpid (note, &lwp))
elf_tdata (abfd)->core_lwpid = lwp;
elf_tdata (abfd)->core->lwpid = lwp;
if (note->type == NT_NETBSDCORE_PROCINFO)
{
@ -8848,15 +8851,15 @@ static bfd_boolean
elfcore_grok_openbsd_procinfo (bfd *abfd, Elf_Internal_Note *note)
{
/* Signal number at offset 0x08. */
elf_tdata (abfd)->core_signal
elf_tdata (abfd)->core->signal
= bfd_h_get_32 (abfd, (bfd_byte *) note->descdata + 0x08);
/* Process ID at offset 0x20. */
elf_tdata (abfd)->core_pid
elf_tdata (abfd)->core->pid
= bfd_h_get_32 (abfd, (bfd_byte *) note->descdata + 0x20);
/* Command name at 0x48 (max 32 bytes, including nul). */
elf_tdata (abfd)->core_command
elf_tdata (abfd)->core->command
= _bfd_elfcore_strndup (abfd, note->descdata + 0x48, 31);
return TRUE;
@ -8919,7 +8922,7 @@ elfcore_grok_nto_status (bfd *abfd, Elf_Internal_Note *note, long *tid)
unsigned flags;
/* nto_procfs_status 'pid' field is at offset 0. */
elf_tdata (abfd)->core_pid = bfd_get_32 (abfd, (bfd_byte *) ddata);
elf_tdata (abfd)->core->pid = bfd_get_32 (abfd, (bfd_byte *) ddata);
/* nto_procfs_status 'tid' field is at offset 4. Pass it back. */
*tid = bfd_get_32 (abfd, (bfd_byte *) ddata + 4);
@ -8930,15 +8933,15 @@ elfcore_grok_nto_status (bfd *abfd, Elf_Internal_Note *note, long *tid)
/* nto_procfs_status 'what' field is at offset 14. */
if ((sig = bfd_get_16 (abfd, (bfd_byte *) ddata + 14)) > 0)
{
elf_tdata (abfd)->core_signal = sig;
elf_tdata (abfd)->core_lwpid = *tid;
elf_tdata (abfd)->core->signal = sig;
elf_tdata (abfd)->core->lwpid = *tid;
}
/* _DEBUG_FLAG_CURTID (current thread) is 0x80. Some cores
do not come from signals so we make sure we set the current
thread just in case. */
if (flags & 0x00000080)
elf_tdata (abfd)->core_lwpid = *tid;
elf_tdata (abfd)->core->lwpid = *tid;
/* Make a ".qnx_core_status/%d" section. */
sprintf (buf, ".qnx_core_status/%ld", *tid);
@ -8986,7 +8989,7 @@ elfcore_grok_nto_regs (bfd *abfd,
sect->alignment_power = 2;
/* This is the current thread. */
if (elf_tdata (abfd)->core_lwpid == tid)
if (elf_tdata (abfd)->core->lwpid == tid)
return elfcore_maybe_make_sect (abfd, base, sect);
return TRUE;

View file

@ -53,10 +53,10 @@ elf32_am33lin_grok_prstatus (bfd *abfd, Elf_Internal_Note *note)
case 184:
case 188: /* Linux/am33 */
/* pr_cursig */
elf_tdata (abfd)->core_signal = bfd_get_16 (abfd, note->descdata + 12);
elf_tdata (abfd)->core->signal = bfd_get_16 (abfd, note->descdata + 12);
/* pr_pid */
elf_tdata (abfd)->core_lwpid = bfd_get_32 (abfd, note->descdata + 24);
elf_tdata (abfd)->core->lwpid = bfd_get_32 (abfd, note->descdata + 24);
/* pr_reg */
offset = 72;
@ -79,9 +79,9 @@ elf32_am33lin_grok_psinfo (bfd *abfd, Elf_Internal_Note *note)
return FALSE;
case 124: /* Linux/am33 elf_prpsinfo */
elf_tdata (abfd)->core_program
elf_tdata (abfd)->core->program
= _bfd_elfcore_strndup (abfd, note->descdata + 28, 16);
elf_tdata (abfd)->core_command
elf_tdata (abfd)->core->command
= _bfd_elfcore_strndup (abfd, note->descdata + 44, 80);
}
@ -90,7 +90,7 @@ elf32_am33lin_grok_psinfo (bfd *abfd, Elf_Internal_Note *note)
implementations, so strip it off if it exists. */
{
char *command = elf_tdata (abfd)->core_command;
char *command = elf_tdata (abfd)->core->command;
int n = strlen (command);
if (0 < n && command[n - 1] == ' ')

View file

@ -1945,10 +1945,10 @@ elf32_arm_nabi_grok_prstatus (bfd *abfd, Elf_Internal_Note *note)
case 148: /* Linux/ARM 32-bit. */
/* pr_cursig */
elf_tdata (abfd)->core_signal = bfd_get_16 (abfd, note->descdata + 12);
elf_tdata (abfd)->core->signal = bfd_get_16 (abfd, note->descdata + 12);
/* pr_pid */
elf_tdata (abfd)->core_lwpid = bfd_get_32 (abfd, note->descdata + 24);
elf_tdata (abfd)->core->lwpid = bfd_get_32 (abfd, note->descdata + 24);
/* pr_reg */
offset = 72;
@ -1971,11 +1971,11 @@ elf32_arm_nabi_grok_psinfo (bfd *abfd, Elf_Internal_Note *note)
return FALSE;
case 124: /* Linux/ARM elf_prpsinfo. */
elf_tdata (abfd)->core_pid
elf_tdata (abfd)->core->pid
= bfd_get_32 (abfd, note->descdata + 12);
elf_tdata (abfd)->core_program
elf_tdata (abfd)->core->program
= _bfd_elfcore_strndup (abfd, note->descdata + 28, 16);
elf_tdata (abfd)->core_command
elf_tdata (abfd)->core->command
= _bfd_elfcore_strndup (abfd, note->descdata + 44, 80);
}
@ -1983,7 +1983,7 @@ elf32_arm_nabi_grok_psinfo (bfd *abfd, Elf_Internal_Note *note)
onto the end of the args in some (at least one anyway)
implementations, so strip it off if it exists. */
{
char *command = elf_tdata (abfd)->core_command;
char *command = elf_tdata (abfd)->core->command;
int n = strlen (command);
if (0 < n && command[n - 1] == ' ')

View file

@ -511,10 +511,10 @@ cris_elf_grok_prstatus (bfd *abfd, Elf_Internal_Note *note)
case 202: /* Linux/CRISv32 */
/* pr_cursig */
elf_tdata (abfd)->core_signal = bfd_get_16 (abfd, note->descdata + 12);
elf_tdata (abfd)->core->signal = bfd_get_16 (abfd, note->descdata + 12);
/* pr_pid */
elf_tdata (abfd)->core_lwpid = bfd_get_32 (abfd, note->descdata + 22);
elf_tdata (abfd)->core->lwpid = bfd_get_32 (abfd, note->descdata + 22);
/* pr_reg */
offset = 70;
@ -530,10 +530,10 @@ cris_elf_grok_prstatus (bfd *abfd, Elf_Internal_Note *note)
case 214: /* Linux/CRIS */
/* pr_cursig */
elf_tdata (abfd)->core_signal = bfd_get_16 (abfd, note->descdata + 12);
elf_tdata (abfd)->core->signal = bfd_get_16 (abfd, note->descdata + 12);
/* pr_pid */
elf_tdata (abfd)->core_lwpid = bfd_get_32 (abfd, note->descdata + 22);
elf_tdata (abfd)->core->lwpid = bfd_get_32 (abfd, note->descdata + 22);
/* pr_reg */
offset = 70;
@ -557,9 +557,9 @@ cris_elf_grok_psinfo (bfd *abfd, Elf_Internal_Note *note)
return FALSE;
case 124: /* Linux/CRISv32 elf_prpsinfo */
elf_tdata (abfd)->core_program
elf_tdata (abfd)->core->program
= _bfd_elfcore_strndup (abfd, note->descdata + 28, 16);
elf_tdata (abfd)->core_command
elf_tdata (abfd)->core->command
= _bfd_elfcore_strndup (abfd, note->descdata + 44, 80);
}
else
@ -569,9 +569,9 @@ cris_elf_grok_psinfo (bfd *abfd, Elf_Internal_Note *note)
return FALSE;
case 124: /* Linux/CRIS elf_prpsinfo */
elf_tdata (abfd)->core_program
elf_tdata (abfd)->core->program
= _bfd_elfcore_strndup (abfd, note->descdata + 28, 16);
elf_tdata (abfd)->core_command
elf_tdata (abfd)->core->command
= _bfd_elfcore_strndup (abfd, note->descdata + 44, 80);
}
@ -580,7 +580,7 @@ cris_elf_grok_psinfo (bfd *abfd, Elf_Internal_Note *note)
implementations, so strip it off if it exists. */
{
char *command = elf_tdata (abfd)->core_command;
char *command = elf_tdata (abfd)->core->command;
int n = strlen (command);
if (0 < n && command[n - 1] == ' ')

View file

@ -6746,10 +6746,10 @@ elf32_frv_grok_prstatus (bfd *abfd, Elf_Internal_Note *note)
struct. */
case 268:
/* `pr_cursig' is at offset 12. */
elf_tdata (abfd)->core_signal = bfd_get_16 (abfd, note->descdata + 12);
elf_tdata (abfd)->core->signal = bfd_get_16 (abfd, note->descdata + 12);
/* `pr_pid' is at offset 24. */
elf_tdata (abfd)->core_lwpid = bfd_get_32 (abfd, note->descdata + 24);
elf_tdata (abfd)->core->lwpid = bfd_get_32 (abfd, note->descdata + 24);
/* `pr_reg' is at offset 72. */
offset = 72;
@ -6785,11 +6785,11 @@ elf32_frv_grok_psinfo (bfd *abfd, Elf_Internal_Note *note)
case 124:
/* `pr_fname' is found at offset 28 and is 16 bytes long. */
elf_tdata (abfd)->core_program
elf_tdata (abfd)->core->program
= _bfd_elfcore_strndup (abfd, note->descdata + 28, 16);
/* `pr_psargs' is found at offset 44 and is 80 bytes long. */
elf_tdata (abfd)->core_command
elf_tdata (abfd)->core->command
= _bfd_elfcore_strndup (abfd, note->descdata + 44, 80);
}
@ -6798,7 +6798,7 @@ elf32_frv_grok_psinfo (bfd *abfd, Elf_Internal_Note *note)
implementations, so strip it off if it exists. */
{
char *command = elf_tdata (abfd)->core_command;
char *command = elf_tdata (abfd)->core->command;
int n = strlen (command);
if (0 < n && command[n - 1] == ' ')

View file

@ -1706,10 +1706,10 @@ elf32_hppa_grok_prstatus (bfd *abfd, Elf_Internal_Note *note)
case 396: /* Linux/hppa */
/* pr_cursig */
elf_tdata (abfd)->core_signal = bfd_get_16 (abfd, note->descdata + 12);
elf_tdata (abfd)->core->signal = bfd_get_16 (abfd, note->descdata + 12);
/* pr_pid */
elf_tdata (abfd)->core_lwpid = bfd_get_32 (abfd, note->descdata + 24);
elf_tdata (abfd)->core->lwpid = bfd_get_32 (abfd, note->descdata + 24);
/* pr_reg */
offset = 72;
@ -1732,9 +1732,9 @@ elf32_hppa_grok_psinfo (bfd *abfd, Elf_Internal_Note *note)
return FALSE;
case 124: /* Linux/hppa elf_prpsinfo. */
elf_tdata (abfd)->core_program
elf_tdata (abfd)->core->program
= _bfd_elfcore_strndup (abfd, note->descdata + 28, 16);
elf_tdata (abfd)->core_command
elf_tdata (abfd)->core->command
= _bfd_elfcore_strndup (abfd, note->descdata + 44, 80);
}
@ -1742,7 +1742,7 @@ elf32_hppa_grok_psinfo (bfd *abfd, Elf_Internal_Note *note)
onto the end of the args in some (at least one anyway)
implementations, so strip it off if it exists. */
{
char *command = elf_tdata (abfd)->core_command;
char *command = elf_tdata (abfd)->core->command;
int n = strlen (command);
if (0 < n && command[n - 1] == ' ')

View file

@ -425,10 +425,10 @@ elf_i386_grok_prstatus (bfd *abfd, Elf_Internal_Note *note)
return FALSE;
/* pr_cursig */
elf_tdata (abfd)->core_signal = bfd_get_32 (abfd, note->descdata + 20);
elf_tdata (abfd)->core->signal = bfd_get_32 (abfd, note->descdata + 20);
/* pr_pid */
elf_tdata (abfd)->core_lwpid = bfd_get_32 (abfd, note->descdata + 24);
elf_tdata (abfd)->core->lwpid = bfd_get_32 (abfd, note->descdata + 24);
/* pr_reg */
offset = 28;
@ -443,10 +443,10 @@ elf_i386_grok_prstatus (bfd *abfd, Elf_Internal_Note *note)
case 144: /* Linux/i386 */
/* pr_cursig */
elf_tdata (abfd)->core_signal = bfd_get_16 (abfd, note->descdata + 12);
elf_tdata (abfd)->core->signal = bfd_get_16 (abfd, note->descdata + 12);
/* pr_pid */
elf_tdata (abfd)->core_lwpid = bfd_get_32 (abfd, note->descdata + 24);
elf_tdata (abfd)->core->lwpid = bfd_get_32 (abfd, note->descdata + 24);
/* pr_reg */
offset = 72;
@ -471,9 +471,9 @@ elf_i386_grok_psinfo (bfd *abfd, Elf_Internal_Note *note)
if (pr_version != 1)
return FALSE;
elf_tdata (abfd)->core_program
elf_tdata (abfd)->core->program
= _bfd_elfcore_strndup (abfd, note->descdata + 8, 17);
elf_tdata (abfd)->core_command
elf_tdata (abfd)->core->command
= _bfd_elfcore_strndup (abfd, note->descdata + 25, 81);
}
else
@ -484,11 +484,11 @@ elf_i386_grok_psinfo (bfd *abfd, Elf_Internal_Note *note)
return FALSE;
case 124: /* Linux/i386 elf_prpsinfo. */
elf_tdata (abfd)->core_pid
elf_tdata (abfd)->core->pid
= bfd_get_32 (abfd, note->descdata + 12);
elf_tdata (abfd)->core_program
elf_tdata (abfd)->core->program
= _bfd_elfcore_strndup (abfd, note->descdata + 28, 16);
elf_tdata (abfd)->core_command
elf_tdata (abfd)->core->command
= _bfd_elfcore_strndup (abfd, note->descdata + 44, 80);
}
}
@ -497,7 +497,7 @@ elf_i386_grok_psinfo (bfd *abfd, Elf_Internal_Note *note)
onto the end of the args in some (at least one anyway)
implementations, so strip it off if it exists. */
{
char *command = elf_tdata (abfd)->core_command;
char *command = elf_tdata (abfd)->core->command;
int n = strlen (command);
if (0 < n && command[n - 1] == ' ')

View file

@ -4777,10 +4777,10 @@ elf_m68k_grok_prstatus (bfd *abfd, Elf_Internal_Note *note)
case 154: /* Linux/m68k */
/* pr_cursig */
elf_tdata (abfd)->core_signal = bfd_get_16 (abfd, note->descdata + 12);
elf_tdata (abfd)->core->signal = bfd_get_16 (abfd, note->descdata + 12);
/* pr_pid */
elf_tdata (abfd)->core_lwpid = bfd_get_32 (abfd, note->descdata + 22);
elf_tdata (abfd)->core->lwpid = bfd_get_32 (abfd, note->descdata + 22);
/* pr_reg */
offset = 70;
@ -4803,11 +4803,11 @@ elf_m68k_grok_psinfo (bfd *abfd, Elf_Internal_Note *note)
return FALSE;
case 124: /* Linux/m68k elf_prpsinfo. */
elf_tdata (abfd)->core_pid
elf_tdata (abfd)->core->pid
= bfd_get_32 (abfd, note->descdata + 12);
elf_tdata (abfd)->core_program
elf_tdata (abfd)->core->program
= _bfd_elfcore_strndup (abfd, note->descdata + 28, 16);
elf_tdata (abfd)->core_command
elf_tdata (abfd)->core->command
= _bfd_elfcore_strndup (abfd, note->descdata + 44, 80);
}
@ -4815,7 +4815,7 @@ elf_m68k_grok_psinfo (bfd *abfd, Elf_Internal_Note *note)
onto the end of the args in some (at least one anyway)
implementations, so strip it off if it exists. */
{
char *command = elf_tdata (abfd)->core_command;
char *command = elf_tdata (abfd)->core->command;
int n = strlen (command);
if (n > 0 && command[n - 1] == ' ')

View file

@ -2186,10 +2186,10 @@ elf32_mips_grok_prstatus (bfd *abfd, Elf_Internal_Note *note)
case 256: /* Linux/MIPS */
/* pr_cursig */
elf_tdata (abfd)->core_signal = bfd_get_16 (abfd, note->descdata + 12);
elf_tdata (abfd)->core->signal = bfd_get_16 (abfd, note->descdata + 12);
/* pr_pid */
elf_tdata (abfd)->core_lwpid = bfd_get_32 (abfd, note->descdata + 24);
elf_tdata (abfd)->core->lwpid = bfd_get_32 (abfd, note->descdata + 24);
/* pr_reg */
offset = 72;
@ -2212,9 +2212,9 @@ elf32_mips_grok_psinfo (bfd *abfd, Elf_Internal_Note *note)
return FALSE;
case 128: /* Linux/MIPS elf_prpsinfo */
elf_tdata (abfd)->core_program
elf_tdata (abfd)->core->program
= _bfd_elfcore_strndup (abfd, note->descdata + 32, 16);
elf_tdata (abfd)->core_command
elf_tdata (abfd)->core->command
= _bfd_elfcore_strndup (abfd, note->descdata + 48, 80);
}
@ -2223,7 +2223,7 @@ elf32_mips_grok_psinfo (bfd *abfd, Elf_Internal_Note *note)
implementations, so strip it off if it exists. */
{
char *command = elf_tdata (abfd)->core_command;
char *command = elf_tdata (abfd)->core->command;
int n = strlen (command);
if (0 < n && command[n - 1] == ' ')

View file

@ -880,10 +880,10 @@ nios2_grok_prstatus (bfd *abfd, Elf_Internal_Note *note)
case 212: /* Linux/Nios II */
/* pr_cursig */
elf_tdata (abfd)->core_signal = bfd_get_16 (abfd, note->descdata + 12);
elf_tdata (abfd)->core->signal = bfd_get_16 (abfd, note->descdata + 12);
/* pr_pid */
elf_tdata (abfd)->core_pid = bfd_get_32 (abfd, note->descdata + 24);
elf_tdata (abfd)->core->pid = bfd_get_32 (abfd, note->descdata + 24);
/* pr_reg */
offset = 72;
@ -907,9 +907,9 @@ nios2_grok_psinfo (bfd *abfd, Elf_Internal_Note *note)
return FALSE;
case 124: /* Linux/Nios II elf_prpsinfo */
elf_tdata (abfd)->core_program
elf_tdata (abfd)->core->program
= _bfd_elfcore_strndup (abfd, note->descdata + 28, 16);
elf_tdata (abfd)->core_command
elf_tdata (abfd)->core->command
= _bfd_elfcore_strndup (abfd, note->descdata + 44, 80);
}
@ -918,7 +918,7 @@ nios2_grok_psinfo (bfd *abfd, Elf_Internal_Note *note)
implementations, so strip it off if it exists. */
{
char *command = elf_tdata (abfd)->core_command;
char *command = elf_tdata (abfd)->core->command;
int n = strlen (command);
if (0 < n && command[n - 1] == ' ')

View file

@ -2216,10 +2216,10 @@ ppc_elf_grok_prstatus (bfd *abfd, Elf_Internal_Note *note)
case 268: /* Linux/PPC. */
/* pr_cursig */
elf_tdata (abfd)->core_signal = bfd_get_16 (abfd, note->descdata + 12);
elf_tdata (abfd)->core->signal = bfd_get_16 (abfd, note->descdata + 12);
/* pr_pid */
elf_tdata (abfd)->core_lwpid = bfd_get_32 (abfd, note->descdata + 24);
elf_tdata (abfd)->core->lwpid = bfd_get_32 (abfd, note->descdata + 24);
/* pr_reg */
offset = 72;
@ -2242,11 +2242,11 @@ ppc_elf_grok_psinfo (bfd *abfd, Elf_Internal_Note *note)
return FALSE;
case 128: /* Linux/PPC elf_prpsinfo. */
elf_tdata (abfd)->core_pid
elf_tdata (abfd)->core->pid
= bfd_get_32 (abfd, note->descdata + 16);
elf_tdata (abfd)->core_program
elf_tdata (abfd)->core->program
= _bfd_elfcore_strndup (abfd, note->descdata + 32, 16);
elf_tdata (abfd)->core_command
elf_tdata (abfd)->core->command
= _bfd_elfcore_strndup (abfd, note->descdata + 48, 80);
}
@ -2255,7 +2255,7 @@ ppc_elf_grok_psinfo (bfd *abfd, Elf_Internal_Note *note)
implementations, so strip it off if it exists. */
{
char *command = elf_tdata (abfd)->core_command;
char *command = elf_tdata (abfd)->core->command;
int n = strlen (command);
if (0 < n && command[n - 1] == ' ')

View file

@ -3869,10 +3869,10 @@ elf_s390_grok_prstatus (bfd * abfd, Elf_Internal_Note * note)
case 224: /* S/390 Linux. */
/* pr_cursig */
elf_tdata (abfd)->core_signal = bfd_get_16 (abfd, note->descdata + 12);
elf_tdata (abfd)->core->signal = bfd_get_16 (abfd, note->descdata + 12);
/* pr_pid */
elf_tdata (abfd)->core_lwpid = bfd_get_32 (abfd, note->descdata + 24);
elf_tdata (abfd)->core->lwpid = bfd_get_32 (abfd, note->descdata + 24);
/* pr_reg */
offset = 72;

View file

@ -3906,10 +3906,12 @@ s3_bfd_score_elf_grok_prstatus (bfd *abfd, Elf_Internal_Note *note)
case 148: /* Linux/Score 32-bit. */
/* pr_cursig */
elf_tdata (abfd)->core_signal = score_bfd_get_16 (abfd, note->descdata + 12);
elf_tdata (abfd)->core->signal
= score_bfd_get_16 (abfd, note->descdata + 12);
/* pr_pid */
elf_tdata (abfd)->core_lwpid = score_bfd_get_32 (abfd, note->descdata + 24);
elf_tdata (abfd)->core->lwpid
= score_bfd_get_32 (abfd, note->descdata + 24);
/* pr_reg */
offset = 72;
@ -3919,7 +3921,8 @@ s3_bfd_score_elf_grok_prstatus (bfd *abfd, Elf_Internal_Note *note)
}
/* Make a ".reg/999" section. */
return _bfd_elfcore_make_pseudosection (abfd, ".reg", raw_size, note->descpos + offset);
return _bfd_elfcore_make_pseudosection (abfd, ".reg", raw_size,
note->descpos + offset);
}
static bfd_boolean
@ -3931,8 +3934,10 @@ s3_bfd_score_elf_grok_psinfo (bfd *abfd, Elf_Internal_Note *note)
return FALSE;
case 124: /* Linux/Score elf_prpsinfo. */
elf_tdata (abfd)->core_program = _bfd_elfcore_strndup (abfd, note->descdata + 28, 16);
elf_tdata (abfd)->core_command = _bfd_elfcore_strndup (abfd, note->descdata + 44, 80);
elf_tdata (abfd)->core->program
= _bfd_elfcore_strndup (abfd, note->descdata + 28, 16);
elf_tdata (abfd)->core->command
= _bfd_elfcore_strndup (abfd, note->descdata + 44, 80);
}
/* Note that for some reason, a spurious space is tacked
@ -3940,7 +3945,7 @@ s3_bfd_score_elf_grok_psinfo (bfd *abfd, Elf_Internal_Note *note)
implementations, so strip it off if it exists. */
{
char *command = elf_tdata (abfd)->core_command;
char *command = elf_tdata (abfd)->core->command;
int n = strlen (command);
if (0 < n && command[n - 1] == ' ')

View file

@ -3722,10 +3722,10 @@ s7_bfd_score_elf_grok_prstatus (bfd *abfd, Elf_Internal_Note *note)
case 272: /* Linux/Score elf_prstatus */
/* pr_cursig */
elf_tdata (abfd)->core_signal = bfd_get_16 (abfd, note->descdata + 12);
elf_tdata (abfd)->core->signal = bfd_get_16 (abfd, note->descdata + 12);
/* pr_pid */
elf_tdata (abfd)->core_lwpid = bfd_get_32 (abfd, note->descdata + 24);
elf_tdata (abfd)->core->lwpid = bfd_get_32 (abfd, note->descdata + 24);
/* pr_reg */
offset = 72;
@ -3737,7 +3737,8 @@ s7_bfd_score_elf_grok_prstatus (bfd *abfd, Elf_Internal_Note *note)
}
/* Make a ".reg/999" section. */
return _bfd_elfcore_make_pseudosection (abfd, ".reg", raw_size, note->descpos + offset);
return _bfd_elfcore_make_pseudosection (abfd, ".reg", raw_size,
note->descpos + offset);
}
bfd_boolean
@ -3750,10 +3751,12 @@ s7_bfd_score_elf_grok_psinfo (bfd *abfd, Elf_Internal_Note *note)
case 128: /* Linux/Score elf_prpsinfo. */
/* pr_fname */
elf_tdata (abfd)->core_program = _bfd_elfcore_strndup (abfd, note->descdata + 32, 16);
elf_tdata (abfd)->core->program
= _bfd_elfcore_strndup (abfd, note->descdata + 32, 16);
/* pr_psargs */
elf_tdata (abfd)->core_command = _bfd_elfcore_strndup (abfd, note->descdata + 48, 80);
elf_tdata (abfd)->core->command
= _bfd_elfcore_strndup (abfd, note->descdata + 48, 80);
break;
}
@ -3762,7 +3765,7 @@ s7_bfd_score_elf_grok_psinfo (bfd *abfd, Elf_Internal_Note *note)
implementations, so strip it off if it exists. */
{
char *command = elf_tdata (abfd)->core_command;
char *command = elf_tdata (abfd)->core->command;
int n = strlen (command);
if (0 < n && command[n - 1] == ' ')

View file

@ -7292,10 +7292,10 @@ elf32_shlin_grok_prstatus (bfd *abfd, Elf_Internal_Note *note)
case 168: /* Linux/SH */
/* pr_cursig */
elf_tdata (abfd)->core_signal = bfd_get_16 (abfd, note->descdata + 12);
elf_tdata (abfd)->core->signal = bfd_get_16 (abfd, note->descdata + 12);
/* pr_pid */
elf_tdata (abfd)->core_lwpid = bfd_get_32 (abfd, note->descdata + 24);
elf_tdata (abfd)->core->lwpid = bfd_get_32 (abfd, note->descdata + 24);
/* pr_reg */
offset = 72;
@ -7318,9 +7318,9 @@ elf32_shlin_grok_psinfo (bfd *abfd, Elf_Internal_Note *note)
return FALSE;
case 124: /* Linux/SH elf_prpsinfo */
elf_tdata (abfd)->core_program
elf_tdata (abfd)->core->program
= _bfd_elfcore_strndup (abfd, note->descdata + 28, 16);
elf_tdata (abfd)->core_command
elf_tdata (abfd)->core->command
= _bfd_elfcore_strndup (abfd, note->descdata + 44, 80);
}
@ -7329,7 +7329,7 @@ elf32_shlin_grok_psinfo (bfd *abfd, Elf_Internal_Note *note)
implementations, so strip it off if it exists. */
{
char *command = elf_tdata (abfd)->core_command;
char *command = elf_tdata (abfd)->core->command;
int n = strlen (command);
if (0 < n && command[n - 1] == ' ')

View file

@ -41,16 +41,16 @@ elf32_sparc_grok_psinfo (bfd *abfd, Elf_Internal_Note *note)
return FALSE;
case 260: /* Solaris prpsinfo_t. */
elf_tdata (abfd)->core_program
elf_tdata (abfd)->core->program
= _bfd_elfcore_strndup (abfd, note->descdata + 84, 16);
elf_tdata (abfd)->core_command
elf_tdata (abfd)->core->command
= _bfd_elfcore_strndup (abfd, note->descdata + 100, 80);
break;
case 336: /* Solaris psinfo_t. */
elf_tdata (abfd)->core_program
elf_tdata (abfd)->core->program
= _bfd_elfcore_strndup (abfd, note->descdata + 88, 16);
elf_tdata (abfd)->core_command
elf_tdata (abfd)->core->command
= _bfd_elfcore_strndup (abfd, note->descdata + 104, 80);
break;
}

View file

@ -38,11 +38,11 @@ tilegx_elf_grok_prstatus (bfd *abfd, Elf_Internal_Note *note)
return FALSE;
/* pr_cursig */
elf_tdata (abfd)->core_signal =
elf_tdata (abfd)->core->signal =
bfd_get_16 (abfd, note->descdata + TILEGX_PRSTATUS_OFFSET_PR_CURSIG);
/* pr_pid */
elf_tdata (abfd)->core_pid =
elf_tdata (abfd)->core->pid =
bfd_get_32 (abfd, note->descdata + TILEGX_PRSTATUS_OFFSET_PR_PID);
/* pr_reg */
@ -60,9 +60,9 @@ tilegx_elf_grok_psinfo (bfd *abfd, Elf_Internal_Note *note)
if (note->descsz != TILEGX_PRPSINFO_SIZEOF)
return FALSE;
elf_tdata (abfd)->core_program
elf_tdata (abfd)->core->program
= _bfd_elfcore_strndup (abfd, note->descdata + TILEGX_PRPSINFO_OFFSET_PR_FNAME, 16);
elf_tdata (abfd)->core_command
elf_tdata (abfd)->core->command
= _bfd_elfcore_strndup (abfd, note->descdata + TILEGX_PRPSINFO_OFFSET_PR_PSARGS, ELF_PR_PSARGS_SIZE);
@ -70,7 +70,7 @@ tilegx_elf_grok_psinfo (bfd *abfd, Elf_Internal_Note *note)
onto the end of the args in some (at least one anyway)
implementations, so strip it off if it exists. */
{
char *command = elf_tdata (abfd)->core_command;
char *command = elf_tdata (abfd)->core->command;
int n = strlen (command);
if (0 < n && command[n - 1] == ' ')

View file

@ -944,11 +944,11 @@ tilepro_elf_grok_prstatus (bfd *abfd, Elf_Internal_Note *note)
return FALSE;
/* pr_cursig */
elf_tdata (abfd)->core_signal =
elf_tdata (abfd)->core->signal =
bfd_get_16 (abfd, note->descdata + TILEPRO_PRSTATUS_OFFSET_PR_CURSIG);
/* pr_pid */
elf_tdata (abfd)->core_pid =
elf_tdata (abfd)->core->pid =
bfd_get_32 (abfd, note->descdata + TILEPRO_PRSTATUS_OFFSET_PR_PID);
/* pr_reg */
@ -966,11 +966,11 @@ tilepro_elf_grok_psinfo (bfd *abfd, Elf_Internal_Note *note)
if (note->descsz != TILEPRO_PRPSINFO_SIZEOF)
return FALSE;
elf_tdata (abfd)->core_program
elf_tdata (abfd)->core->program
= _bfd_elfcore_strndup (abfd,
note->descdata + TILEPRO_PRPSINFO_OFFSET_PR_FNAME,
16);
elf_tdata (abfd)->core_command
elf_tdata (abfd)->core->command
= _bfd_elfcore_strndup (abfd,
note->descdata + TILEPRO_PRPSINFO_OFFSET_PR_PSARGS,
ELF_PR_PSARGS_SIZE);
@ -980,7 +980,7 @@ tilepro_elf_grok_psinfo (bfd *abfd, Elf_Internal_Note *note)
onto the end of the args in some (at least one anyway)
implementations, so strip it off if it exists. */
{
char *command = elf_tdata (abfd)->core_command;
char *command = elf_tdata (abfd)->core->command;
int n = strlen (command);
if (0 < n && command[n - 1] == ' ')

View file

@ -3782,10 +3782,10 @@ elf_xtensa_grok_prstatus (bfd *abfd, Elf_Internal_Note *note)
based on the size. Just assume this is GNU/Linux. */
/* pr_cursig */
elf_tdata (abfd)->core_signal = bfd_get_16 (abfd, note->descdata + 12);
elf_tdata (abfd)->core->signal = bfd_get_16 (abfd, note->descdata + 12);
/* pr_pid */
elf_tdata (abfd)->core_lwpid = bfd_get_32 (abfd, note->descdata + 24);
elf_tdata (abfd)->core->lwpid = bfd_get_32 (abfd, note->descdata + 24);
/* pr_reg */
offset = 72;
@ -3806,9 +3806,9 @@ elf_xtensa_grok_psinfo (bfd *abfd, Elf_Internal_Note *note)
return FALSE;
case 128: /* GNU/Linux elf_prpsinfo */
elf_tdata (abfd)->core_program
elf_tdata (abfd)->core->program
= _bfd_elfcore_strndup (abfd, note->descdata + 32, 16);
elf_tdata (abfd)->core_command
elf_tdata (abfd)->core->command
= _bfd_elfcore_strndup (abfd, note->descdata + 48, 80);
}
@ -3817,7 +3817,7 @@ elf_xtensa_grok_psinfo (bfd *abfd, Elf_Internal_Note *note)
implementations, so strip it off if it exists. */
{
char *command = elf_tdata (abfd)->core_command;
char *command = elf_tdata (abfd)->core->command;
int n = strlen (command);
if (0 < n && command[n - 1] == ' ')

View file

@ -1531,11 +1531,11 @@ elf64_aarch64_grok_prstatus (bfd *abfd, Elf_Internal_Note *note)
case 408: /* sizeof(struct elf_prstatus) on Linux/arm64. */
/* pr_cursig */
elf_tdata (abfd)->core_signal
elf_tdata (abfd)->core->signal
= bfd_get_16 (abfd, note->descdata + 12);
/* pr_pid */
elf_tdata (abfd)->core_lwpid
elf_tdata (abfd)->core->lwpid
= bfd_get_32 (abfd, note->descdata + 32);
/* pr_reg */

View file

@ -2591,10 +2591,10 @@ elf64_hppa_grok_prstatus (bfd *abfd, Elf_Internal_Note *note)
case 760: /* Linux/hppa */
/* pr_cursig */
elf_tdata (abfd)->core_signal = bfd_get_16 (abfd, note->descdata + 12);
elf_tdata (abfd)->core->signal = bfd_get_16 (abfd, note->descdata + 12);
/* pr_pid */
elf_tdata (abfd)->core_lwpid = bfd_get_32 (abfd, note->descdata + 32);
elf_tdata (abfd)->core->lwpid = bfd_get_32 (abfd, note->descdata + 32);
/* pr_reg */
offset = 112;
@ -2620,16 +2620,16 @@ elf64_hppa_grok_psinfo (bfd *abfd, Elf_Internal_Note *note)
return FALSE;
case 136: /* Linux/hppa elf_prpsinfo. */
elf_tdata (abfd)->core_program
elf_tdata (abfd)->core->program
= _bfd_elfcore_strndup (abfd, note->descdata + 40, 16);
elf_tdata (abfd)->core_command
elf_tdata (abfd)->core->command
= _bfd_elfcore_strndup (abfd, note->descdata + 56, 80);
}
/* Note that for some reason, a spurious space is tacked
onto the end of the args in some (at least one anyway)
implementations, so strip it off if it exists. */
command = elf_tdata (abfd)->core_command;
command = elf_tdata (abfd)->core->command;
n = strlen (command);
if (0 < n && command[n - 1] == ' ')
@ -2772,7 +2772,7 @@ elf64_hppa_section_from_phdr (bfd *abfd, Elf_Internal_Phdr *hdr, int sec_index,
if (bfd_bread (&sig, 4, abfd) != 4)
return FALSE;
elf_tdata (abfd)->core_signal = sig;
elf_tdata (abfd)->core->signal = sig;
if (!_bfd_elf_make_section_from_phdr (abfd, hdr, sec_index, typename))
return FALSE;

View file

@ -4008,10 +4008,10 @@ elf64_mips_grok_prstatus (bfd *abfd, Elf_Internal_Note *note)
case 480: /* Linux/MIPS - N64 kernel */
/* pr_cursig */
elf_tdata (abfd)->core_signal = bfd_get_16 (abfd, note->descdata + 12);
elf_tdata (abfd)->core->signal = bfd_get_16 (abfd, note->descdata + 12);
/* pr_pid */
elf_tdata (abfd)->core_lwpid = bfd_get_32 (abfd, note->descdata + 32);
elf_tdata (abfd)->core->lwpid = bfd_get_32 (abfd, note->descdata + 32);
/* pr_reg */
offset = 112;
@ -4034,9 +4034,9 @@ elf64_mips_grok_psinfo (bfd *abfd, Elf_Internal_Note *note)
return FALSE;
case 136: /* Linux/MIPS - N64 kernel elf_prpsinfo */
elf_tdata (abfd)->core_program
elf_tdata (abfd)->core->program
= _bfd_elfcore_strndup (abfd, note->descdata + 40, 16);
elf_tdata (abfd)->core_command
elf_tdata (abfd)->core->command
= _bfd_elfcore_strndup (abfd, note->descdata + 56, 80);
}
@ -4045,7 +4045,7 @@ elf64_mips_grok_psinfo (bfd *abfd, Elf_Internal_Note *note)
implementations, so strip it off if it exists. */
{
char *command = elf_tdata (abfd)->core_command;
char *command = elf_tdata (abfd)->core->command;
int n = strlen (command);
if (0 < n && command[n - 1] == ' ')

View file

@ -2677,10 +2677,10 @@ ppc64_elf_grok_prstatus (bfd *abfd, Elf_Internal_Note *note)
return FALSE;
/* pr_cursig */
elf_tdata (abfd)->core_signal = bfd_get_16 (abfd, note->descdata + 12);
elf_tdata (abfd)->core->signal = bfd_get_16 (abfd, note->descdata + 12);
/* pr_pid */
elf_tdata (abfd)->core_lwpid = bfd_get_32 (abfd, note->descdata + 32);
elf_tdata (abfd)->core->lwpid = bfd_get_32 (abfd, note->descdata + 32);
/* pr_reg */
offset = 112;
@ -2697,11 +2697,11 @@ ppc64_elf_grok_psinfo (bfd *abfd, Elf_Internal_Note *note)
if (note->descsz != 136)
return FALSE;
elf_tdata (abfd)->core_pid
elf_tdata (abfd)->core->pid
= bfd_get_32 (abfd, note->descdata + 24);
elf_tdata (abfd)->core_program
elf_tdata (abfd)->core->program
= _bfd_elfcore_strndup (abfd, note->descdata + 40, 16);
elf_tdata (abfd)->core_command
elf_tdata (abfd)->core->command
= _bfd_elfcore_strndup (abfd, note->descdata + 56, 80);
return TRUE;

View file

@ -38,11 +38,11 @@ tilegx_elf_grok_prstatus (bfd *abfd, Elf_Internal_Note *note)
return FALSE;
/* pr_cursig */
elf_tdata (abfd)->core_signal =
elf_tdata (abfd)->core->signal =
bfd_get_16 (abfd, note->descdata + TILEGX_PRSTATUS_OFFSET_PR_CURSIG);
/* pr_pid */
elf_tdata (abfd)->core_pid =
elf_tdata (abfd)->core->pid =
bfd_get_32 (abfd, note->descdata + TILEGX_PRSTATUS_OFFSET_PR_PID);
/* pr_reg */
@ -60,9 +60,9 @@ tilegx_elf_grok_psinfo (bfd *abfd, Elf_Internal_Note *note)
if (note->descsz != TILEGX_PRPSINFO_SIZEOF)
return FALSE;
elf_tdata (abfd)->core_program
elf_tdata (abfd)->core->program
= _bfd_elfcore_strndup (abfd, note->descdata + TILEGX_PRPSINFO_OFFSET_PR_FNAME, 16);
elf_tdata (abfd)->core_command
elf_tdata (abfd)->core->command
= _bfd_elfcore_strndup (abfd, note->descdata + TILEGX_PRPSINFO_OFFSET_PR_PSARGS, ELF_PR_PSARGS_SIZE);
@ -70,7 +70,7 @@ tilegx_elf_grok_psinfo (bfd *abfd, Elf_Internal_Note *note)
onto the end of the args in some (at least one anyway)
implementations, so strip it off if it exists. */
{
char *command = elf_tdata (abfd)->core_command;
char *command = elf_tdata (abfd)->core->command;
int n = strlen (command);
if (0 < n && command[n - 1] == ' ')

View file

@ -348,10 +348,10 @@ elf_x86_64_grok_prstatus (bfd *abfd, Elf_Internal_Note *note)
case 296: /* sizeof(istruct elf_prstatus) on Linux/x32 */
/* pr_cursig */
elf_tdata (abfd)->core_signal = bfd_get_16 (abfd, note->descdata + 12);
elf_tdata (abfd)->core->signal = bfd_get_16 (abfd, note->descdata + 12);
/* pr_pid */
elf_tdata (abfd)->core_lwpid = bfd_get_32 (abfd, note->descdata + 24);
elf_tdata (abfd)->core->lwpid = bfd_get_32 (abfd, note->descdata + 24);
/* pr_reg */
offset = 72;
@ -361,11 +361,11 @@ elf_x86_64_grok_prstatus (bfd *abfd, Elf_Internal_Note *note)
case 336: /* sizeof(istruct elf_prstatus) on Linux/x86_64 */
/* pr_cursig */
elf_tdata (abfd)->core_signal
elf_tdata (abfd)->core->signal
= bfd_get_16 (abfd, note->descdata + 12);
/* pr_pid */
elf_tdata (abfd)->core_lwpid
elf_tdata (abfd)->core->lwpid
= bfd_get_32 (abfd, note->descdata + 32);
/* pr_reg */
@ -389,20 +389,20 @@ elf_x86_64_grok_psinfo (bfd *abfd, Elf_Internal_Note *note)
return FALSE;
case 124: /* sizeof(struct elf_prpsinfo) on Linux/x32 */
elf_tdata (abfd)->core_pid
elf_tdata (abfd)->core->pid
= bfd_get_32 (abfd, note->descdata + 12);
elf_tdata (abfd)->core_program
elf_tdata (abfd)->core->program
= _bfd_elfcore_strndup (abfd, note->descdata + 28, 16);
elf_tdata (abfd)->core_command
elf_tdata (abfd)->core->command
= _bfd_elfcore_strndup (abfd, note->descdata + 44, 80);
break;
case 136: /* sizeof(struct elf_prpsinfo) on Linux/x86_64 */
elf_tdata (abfd)->core_pid
elf_tdata (abfd)->core->pid
= bfd_get_32 (abfd, note->descdata + 24);
elf_tdata (abfd)->core_program
elf_tdata (abfd)->core->program
= _bfd_elfcore_strndup (abfd, note->descdata + 40, 16);
elf_tdata (abfd)->core_command
elf_tdata (abfd)->core->command
= _bfd_elfcore_strndup (abfd, note->descdata + 56, 80);
}
@ -411,7 +411,7 @@ elf_x86_64_grok_psinfo (bfd *abfd, Elf_Internal_Note *note)
implementations, so strip it off if it exists. */
{
char *command = elf_tdata (abfd)->core_command;
char *command = elf_tdata (abfd)->core->command;
int n = strlen (command);
if (0 < n && command[n - 1] == ' ')

View file

@ -22,19 +22,19 @@
char*
elf_core_file_failing_command (bfd *abfd)
{
return elf_tdata (abfd)->core_command;
return elf_tdata (abfd)->core->command;
}
int
elf_core_file_failing_signal (bfd *abfd)
{
return elf_tdata (abfd)->core_signal;
return elf_tdata (abfd)->core->signal;
}
int
elf_core_file_pid (bfd *abfd)
{
return elf_tdata (abfd)->core_pid;
return elf_tdata (abfd)->core->pid;
}
bfd_boolean
@ -51,7 +51,7 @@ elf_core_file_matches_executable_p (bfd *core_bfd, bfd *exec_bfd)
}
/* See if the name in the corefile matches the executable name. */
corename = elf_tdata (core_bfd)->core_program;
corename = elf_tdata (core_bfd)->core->program;
if (corename != NULL)
{
const char* execname = strrchr (exec_bfd->filename, '/');

View file

@ -3257,10 +3257,10 @@ elf32_mips_grok_prstatus (bfd *abfd, Elf_Internal_Note *note)
case 440: /* Linux/MIPS N32 */
/* pr_cursig */
elf_tdata (abfd)->core_signal = bfd_get_16 (abfd, note->descdata + 12);
elf_tdata (abfd)->core->signal = bfd_get_16 (abfd, note->descdata + 12);
/* pr_pid */
elf_tdata (abfd)->core_lwpid = bfd_get_32 (abfd, note->descdata + 24);
elf_tdata (abfd)->core->lwpid = bfd_get_32 (abfd, note->descdata + 24);
/* pr_reg */
offset = 72;
@ -3283,9 +3283,9 @@ elf32_mips_grok_psinfo (bfd *abfd, Elf_Internal_Note *note)
return FALSE;
case 128: /* Linux/MIPS elf_prpsinfo */
elf_tdata (abfd)->core_program
elf_tdata (abfd)->core->program
= _bfd_elfcore_strndup (abfd, note->descdata + 32, 16);
elf_tdata (abfd)->core_command
elf_tdata (abfd)->core->command
= _bfd_elfcore_strndup (abfd, note->descdata + 48, 80);
}
@ -3294,7 +3294,7 @@ elf32_mips_grok_psinfo (bfd *abfd, Elf_Internal_Note *note)
implementations, so strip it off if it exists. */
{
char *command = elf_tdata (abfd)->core_command;
char *command = elf_tdata (abfd)->core->command;
int n = strlen (command);
if (0 < n && command[n - 1] == ' ')