* [elf64-hppa] Add grok_{prstatus,psinfo} methods
@ 2005-12-22 15:56 Randolph Chung
2005-12-27 16:56 ` Nick Clifton
0 siblings, 1 reply; 7+ messages in thread
From: Randolph Chung @ 2005-12-22 15:56 UTC (permalink / raw)
To: binutils
[-- Attachment #1: Type: text/plain, Size: 154 bytes --]
This adds the grok_prstatus/psinfo methods for the elf64-hppa target for
Linux core dumps.
Tested on hppa64-gnu-linux. Please commit if okay.
randolph
[-- Attachment #2: elfpa.diff --]
[-- Type: text/x-patch, Size: 2514 bytes --]
2005-12-22 Randolph Chung <tausq@debian.org>
* elf64-hppa.c (elf64_hppa_grok_prstatus): New function.
(elf64_hppa_grok_psinfo): Likewise.
(elf_backend_grok_pstatus, elf_backend_grok_psinfo): Define.
Index: elf64-hppa.c
===================================================================
RCS file: /cvs/src/src/bfd/elf64-hppa.c,v
retrieving revision 1.67
diff -u -p -r1.67 elf64-hppa.c
--- elf64-hppa.c 4 Dec 2005 14:58:11 -0000 1.67
+++ elf64-hppa.c 22 Dec 2005 15:51:21 -0000
@@ -2542,6 +2542,67 @@ elf64_hppa_finish_dynamic_sections (outp
return TRUE;
}
+/* Support for core dump NOTE sections. */
+
+static bfd_boolean
+elf64_hppa_grok_prstatus (bfd *abfd, Elf_Internal_Note *note)
+{
+ int offset;
+ size_t size;
+
+ switch (note->descsz)
+ {
+ default:
+ return FALSE;
+
+ case 760: /* Linux/hppa */
+ /* pr_cursig */
+ 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 + 32);
+
+ /* pr_reg */
+ offset = 112;
+ size = 640;
+
+ break;
+ }
+
+ /* Make a ".reg/999" section. */
+ return _bfd_elfcore_make_pseudosection (abfd, ".reg",
+ size, note->descpos + offset);
+}
+
+static bfd_boolean
+elf64_hppa_grok_psinfo (bfd *abfd, Elf_Internal_Note *note)
+{
+ switch (note->descsz)
+ {
+ default:
+ return FALSE;
+
+ case 136: /* Linux/hppa elf_prpsinfo. */
+ elf_tdata (abfd)->core_program
+ = _bfd_elfcore_strndup (abfd, note->descdata + 40, 16);
+ 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. */
+ {
+ char *command = elf_tdata (abfd)->core_command;
+ int n = strlen (command);
+
+ if (0 < n && command[n - 1] == ' ')
+ command[n - 1] = '\0';
+ }
+
+ return TRUE;
+}
+
/* Return the number of additional phdrs we will need.
The generic ELF code only creates PT_PHDRs for executables. The HP
@@ -2775,6 +2836,8 @@ const struct elf_size_info hppa64_elf_si
elf64_hppa_finish_dynamic_symbol
#define elf_backend_finish_dynamic_sections \
elf64_hppa_finish_dynamic_sections
+#define elf_backend_grok_prstatus elf64_hppa_grok_prstatus
+#define elf_backend_grok_psinfo elf64_hppa_grok_psinfo
/* Stuff for the BFD linker: */
#define bfd_elf64_bfd_link_hash_table_create \
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [elf64-hppa] Add grok_{prstatus,psinfo} methods
2005-12-22 15:56 [elf64-hppa] Add grok_{prstatus,psinfo} methods Randolph Chung
@ 2005-12-27 16:56 ` Nick Clifton
2005-12-28 4:18 ` Randolph Chung
2006-03-13 22:44 ` Randolph Chung
0 siblings, 2 replies; 7+ messages in thread
From: Nick Clifton @ 2005-12-27 16:56 UTC (permalink / raw)
To: Randolph Chung; +Cc: binutils
[-- Attachment #1: Type: text/plain, Size: 354 bytes --]
Hi Randolph,
> This adds the grok_prstatus/psinfo methods for the elf64-hppa target for
> Linux core dumps.
Before we can consider reviewing or accepting this patch you need to
have a copyright assignment in place with the FSF. Please could you
fill out the attached form and send it off in order to start this
process rolling ?
Cheers
Nick
[-- Attachment #2: future --]
[-- Type: text/plain, Size: 1005 bytes --]
---------------------------------------------------------------------------
request-assign.future:
Please email the following information to fsf-records@gnu.org, and we
will send you the assignment form for your past and future changes.
Please use your full name as the subject line of the message.
[What is the name of the program or package you're contributing to?]
[Did you copy any files or text written by someone else in these changes?
Even if that material is free software, we need to know about it.]
[Do you have an employer who might have a basis to claim to own
your changes? Do you attend a school which might make such a claim?]
[For the copyright registration, what country are you a citizen of?]
[What year were you born?]
[Please write your email address here.]
[Please write your snail address here.]
[Which files have you changed so far, and which new files have you written
so far?]
---------------------------------------------------------------------------
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [elf64-hppa] Add grok_{prstatus,psinfo} methods
2005-12-27 16:56 ` Nick Clifton
@ 2005-12-28 4:18 ` Randolph Chung
2006-03-13 22:44 ` Randolph Chung
1 sibling, 0 replies; 7+ messages in thread
From: Randolph Chung @ 2005-12-28 4:18 UTC (permalink / raw)
To: Nick Clifton; +Cc: binutils
> Before we can consider reviewing or accepting this patch you need to
> have a copyright assignment in place with the FSF. Please could you
> fill out the attached form and send it off in order to start this
> process rolling ?
Um, I should already have one in place since 2 years ago.
randolph
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [elf64-hppa] Add grok_{prstatus,psinfo} methods
2005-12-27 16:56 ` Nick Clifton
2005-12-28 4:18 ` Randolph Chung
@ 2006-03-13 22:44 ` Randolph Chung
2006-03-21 2:19 ` [ping] " Randolph Chung
1 sibling, 1 reply; 7+ messages in thread
From: Randolph Chung @ 2006-03-13 22:44 UTC (permalink / raw)
To: Nick Clifton; +Cc: binutils
>> This adds the grok_prstatus/psinfo methods for the elf64-hppa target
>> for Linux core dumps.
>
> Before we can consider reviewing or accepting this patch you need to
> have a copyright assignment in place with the FSF. Please could you
> fill out the attached form and send it off in order to start this
> process rolling ?
I just got confirmation from FSF that the paperwork has finally been
completed. So if this patch is still ok, please apply.
http://sourceware.org/ml/binutils/2005-12/msg00199.html
randolph
^ permalink raw reply [flat|nested] 7+ messages in thread
* [ping] Re: [elf64-hppa] Add grok_{prstatus,psinfo} methods
2006-03-13 22:44 ` Randolph Chung
@ 2006-03-21 2:19 ` Randolph Chung
2006-04-01 1:19 ` [ping^2] " Randolph Chung
0 siblings, 1 reply; 7+ messages in thread
From: Randolph Chung @ 2006-03-21 2:19 UTC (permalink / raw)
To: binutils
Randolph Chung wrote:
>>> This adds the grok_prstatus/psinfo methods for the elf64-hppa target
>>> for Linux core dumps.
>>
>> Before we can consider reviewing or accepting this patch you need to
>> have a copyright assignment in place with the FSF. Please could you
>> fill out the attached form and send it off in order to start this
>> process rolling ?
>
> I just got confirmation from FSF that the paperwork has finally been
> completed. So if this patch is still ok, please apply.
>
> http://sourceware.org/ml/binutils/2005-12/msg00199.html
comments? if ok can somebody pls apply it?
thanks
randolph
^ permalink raw reply [flat|nested] 7+ messages in thread
* [ping^2] Re: [elf64-hppa] Add grok_{prstatus,psinfo} methods
2006-03-21 2:19 ` [ping] " Randolph Chung
@ 2006-04-01 1:19 ` Randolph Chung
2006-04-07 14:57 ` Nick Clifton
0 siblings, 1 reply; 7+ messages in thread
From: Randolph Chung @ 2006-04-01 1:19 UTC (permalink / raw)
To: binutils; +Cc: nickc
Nick, you were the last person to comment on this patch; please let me
know if this is ok.
Randolph Chung wrote:
> Randolph Chung wrote:
>>>> This adds the grok_prstatus/psinfo methods for the elf64-hppa target
>>>> for Linux core dumps.
>>> Before we can consider reviewing or accepting this patch you need to
>>> have a copyright assignment in place with the FSF. Please could you
>>> fill out the attached form and send it off in order to start this
>>> process rolling ?
>> I just got confirmation from FSF that the paperwork has finally been
>> completed. So if this patch is still ok, please apply.
>>
>> http://sourceware.org/ml/binutils/2005-12/msg00199.html
>
> comments? if ok can somebody pls apply it?
randolph
--
Randolph Chung
Debian GNU/Linux Developer, hppa/ia64 ports
http://www.tausq.org/
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [ping^2] Re: [elf64-hppa] Add grok_{prstatus,psinfo} methods
2006-04-01 1:19 ` [ping^2] " Randolph Chung
@ 2006-04-07 14:57 ` Nick Clifton
0 siblings, 0 replies; 7+ messages in thread
From: Nick Clifton @ 2006-04-07 14:57 UTC (permalink / raw)
To: Randolph Chung; +Cc: binutils
Hi Randolph,
> Nick, you were the last person to comment on this patch; please let me
> know if this is ok.
I am very sorry - I have been away on vacation and then very busy
catching up on my email after I got back, so I have only just gotten
around to your patch now.
The patch is fine, and I have checked it in.
Cheers
Nick
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2006-04-07 14:56 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-12-22 15:56 [elf64-hppa] Add grok_{prstatus,psinfo} methods Randolph Chung
2005-12-27 16:56 ` Nick Clifton
2005-12-28 4:18 ` Randolph Chung
2006-03-13 22:44 ` Randolph Chung
2006-03-21 2:19 ` [ping] " Randolph Chung
2006-04-01 1:19 ` [ping^2] " Randolph Chung
2006-04-07 14:57 ` Nick Clifton
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).