public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [commit+7.4][arm/bfd] Fill in core_pid to fix GDB corethreads.exp failures
@ 2011-12-21 21:26 Ulrich Weigand
  0 siblings, 0 replies; only message in thread
From: Ulrich Weigand @ 2011-12-21 21:26 UTC (permalink / raw)
  To: gdb-patches, binutils; +Cc: patches

Hello,

I've noticed another couple of additional test suite failures in GDB 7.4:
FAIL: gdb.threads/corethreads.exp: thread0 found
FAIL: gdb.threads/corethreads.exp: thread1 found

These test verify that GDB shows proper pthread_t thread IDs for core
files.  This works only if bfd_core_file_pid returns the correct PID,
which only works if the ->core_pid field is filled in by target code.

This has been added on a number of platforms, but not ARM so far.

The (obvious) patch below fixes this by filling in this field in
elf32_arm_nabi_grok_psinfo.

Tested on arm-linux-gnueabi, fixes the above test cases.
Committed to mainline and (GDB) 7.4 branch.

Bye,
Ulrich


ChangeLog:

bfd/
	* elf32-arm.c (elf32_arm_nabi_grok_psinfo): Fill in core_pid.


Index: bfd/elf32-arm.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-arm.c,v
retrieving revision 1.281
diff -u -p -r1.281 elf32-arm.c
--- bfd/elf32-arm.c	17 Nov 2011 00:20:01 -0000	1.281
+++ bfd/elf32-arm.c	21 Dec 2011 20:18:30 -0000
@@ -1966,6 +1966,8 @@ elf32_arm_nabi_grok_psinfo (bfd *abfd, E
 	return FALSE;
 
       case 124:		/* Linux/ARM elf_prpsinfo.  */
+	elf_tdata (abfd)->core_pid
+	 = bfd_get_32 (abfd, note->descdata + 12);
 	elf_tdata (abfd)->core_program
 	 = _bfd_elfcore_strndup (abfd, note->descdata + 28, 16);
 	elf_tdata (abfd)->core_command
-- 
  Dr. Ulrich Weigand
  GNU Toolchain for Linux on System z and Cell BE
  Ulrich.Weigand@de.ibm.com

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-12-21 21:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-12-21 21:26 [commit+7.4][arm/bfd] Fill in core_pid to fix GDB corethreads.exp failures Ulrich Weigand

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).