]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
2015-09-22 Andrew Pinski <apinski@cavium.com> users/pinskia/gdb-aarch64-ilp32
authorAndrew Pinski <apinski@cavium.com>
Thu, 10 Sep 2015 12:02:38 +0000 (20:02 +0800)
committerAndrew Pinski <apinski@cavium.com>
Thu, 10 Sep 2015 12:02:38 +0000 (20:02 +0800)
* elfxx-aarch64.c (_bfd_aarch64_elf_grok_prstatus):
Add ILP32 sized prstatus.
(_bfd_aarch64_elf_grok_psinfo): Likewise.

bfd/ChangeLog
bfd/elfxx-aarch64.c

index 108e4bdeff5af81b7ef25865d3ae722b7c650989..027dcc71d91e2a82f14befb21eaddd7d446406a2 100644 (file)
@@ -1,3 +1,9 @@
+2015-09-22  Andrew Pinski  <apinski@cavium.com>
+
+       * elfxx-aarch64.c (_bfd_aarch64_elf_grok_prstatus):
+       Add ILP32 sized prstatus.
+       (_bfd_aarch64_elf_grok_psinfo): Likewise.
+
 2015-09-07  Andrew Pinski  <apinski@cavium.com>
 
        * cpu-aarch64.c (compatible):
index 34bd1a690226690d6ad58668b8c56fb0821daed7..f34ad9fddffd1bdc6d6b4255b5a70c5639ec13db 100644 (file)
@@ -556,6 +556,22 @@ _bfd_aarch64_elf_grok_prstatus (bfd *abfd, Elf_Internal_Note *note)
        size = 272;
 
        break;
+
+      case 352:                /* sizeof(struct elf_prstatus) on Linux/arm64_ilp32.  */
+       /* pr_cursig */
+       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);
+
+       /* pr_reg */
+       offset = 72;
+       size = 272;
+
+       break;
+
     }
 
   /* Make a ".reg/999" section.  */
@@ -577,6 +593,15 @@ _bfd_aarch64_elf_grok_psinfo (bfd *abfd, Elf_Internal_Note *note)
        = _bfd_elfcore_strndup (abfd, note->descdata + 40, 16);
       elf_tdata (abfd)->core->command
        = _bfd_elfcore_strndup (abfd, note->descdata + 56, 80);
+      break;
+
+    case 124:        /* This is sizeof(struct elf_prpsinfo) on Linux/aarch64_ilp32.  */
+      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
+       = _bfd_elfcore_strndup (abfd, note->descdata + 44, 80);
+      break;
     }
 
   /* Note that for some reason, a spurious space is tacked
@@ -598,6 +623,7 @@ char *
 _bfd_aarch64_elf_write_core_note (bfd *abfd, char *buf, int *bufsiz, int note_type,
                                  ...)
 {
+  /* TODO ILP32 support. */
   switch (note_type)
     {
     default: