diff options
author | Randolph Chung <tausq@debian.org> | 2005-12-09 11:25:04 +0000 |
---|---|---|
committer | Randolph Chung <tausq@debian.org> | 2005-12-09 11:25:04 +0000 |
commit | 6b79fde800e9f096339a9ca6974575c7e6fc757f (patch) | |
tree | 897a2d4d78bbe8e0d4ca80b73950910b44bbc16c | |
parent | 1218e655b1daa68f2b23900c118cd6cc064513bc (diff) | |
download | ppe42-binutils-6b79fde800e9f096339a9ca6974575c7e6fc757f.tar.gz ppe42-binutils-6b79fde800e9f096339a9ca6974575c7e6fc757f.zip |
2005-12-09 Randolph Chung <tausq@debian.org>
PR corefiles/2026
* hppa-hpux-tdep.c (hppa_hpux_core_osabi_sniffer): Check for HPUX ELF
core files.
(_initialize_hppa_hpux_tdep): Install sniffer for ELF core files.
* config/pa/hpux.mh: Compile corelow.o.
-rw-r--r-- | gdb/ChangeLog | 8 | ||||
-rw-r--r-- | gdb/hppa-hpux-tdep.c | 21 |
2 files changed, 29 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 5971c56157..29a3c0870b 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,13 @@ 2005-12-09 Randolph Chung <tausq@debian.org> + PR corefiles/2026 + * hppa-hpux-tdep.c (hppa_hpux_core_osabi_sniffer): Check for HPUX ELF + core files. + (_initialize_hppa_hpux_tdep): Install sniffer for ELF core files. + * config/pa/hpux.mh: Compile corelow.o. + +2005-12-09 Randolph Chung <tausq@debian.org> + * hppa-tdep.c (hppa64_convert_code_addr_to_fptr): New function. (hppa64_push_dummy_call): If passing a function pointer, ensure it is a function descriptor address instead of the function entry diff --git a/gdb/hppa-hpux-tdep.c b/gdb/hppa-hpux-tdep.c index fab8d6e7b7..b0cdd5dc36 100644 --- a/gdb/hppa-hpux-tdep.c +++ b/gdb/hppa-hpux-tdep.c @@ -2064,6 +2064,24 @@ hppa_hpux_core_osabi_sniffer (bfd *abfd) { if (strcmp (bfd_get_target (abfd), "hpux-core") == 0) return GDB_OSABI_HPUX_SOM; + else if (strcmp (bfd_get_target (abfd), "elf64-hppa") == 0) + { + asection *section; + + section = bfd_get_section_by_name (abfd, ".kernel"); + if (section) + { + bfd_size_type size; + char *contents; + + size = bfd_section_size (abfd, section); + contents = alloca (size); + if (bfd_get_section_contents (abfd, section, contents, + (file_ptr) 0, size) + && strcmp (contents, "HP-UX") == 0) + return GDB_OSABI_HPUX_ELF; + } + } return GDB_OSABI_UNKNOWN; } @@ -2076,6 +2094,9 @@ _initialize_hppa_hpux_tdep (void) gdbarch_register_osabi_sniffer (bfd_arch_unknown, bfd_target_unknown_flavour, hppa_hpux_core_osabi_sniffer); + gdbarch_register_osabi_sniffer (bfd_arch_hppa, + bfd_target_elf_flavour, + hppa_hpux_core_osabi_sniffer); gdbarch_register_osabi (bfd_arch_hppa, 0, GDB_OSABI_HPUX_SOM, hppa_hpux_som_init_abi); |