X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=gdb%2Fsolib-pa64.c;h=321441d01793167bf49b0e9c3bffd1561dda0de8;hb=a9dc948127c2cb5127cec5ca87dbc19f17dd16cf;hp=fb6ad25c7ae794f5ae7b0eaafcc9db76af5c81ba;hpb=8a3fe4f86c51d363e10efed1046ebcbdc853ae99;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/solib-pa64.c b/gdb/solib-pa64.c index fb6ad25c7a..321441d017 100644 --- a/gdb/solib-pa64.c +++ b/gdb/solib-pa64.c @@ -1,12 +1,12 @@ /* Handle PA64 shared libraries for GDB, the GNU Debugger. - Copyright 2004 Free Software Foundation, Inc. + Copyright (C) 2004, 2007, 2008 Free Software Foundation, Inc. This file is part of GDB. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, @@ -15,9 +15,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. + along with this program. If not, see . HP in their infinite stupidity choose not to use standard ELF dynamic linker interfaces. They also choose not to make their ELF dymamic @@ -41,12 +39,14 @@ #include "hppa-tdep.h" #include "solist.h" +#include "solib.h" #include "solib-pa64.h" #undef SOLIB_PA64_DBG -/* If we are building for a SOM-only target, then we don't need this. */ -#ifndef PA_SOM_ONLY +/* We can build this file only when running natively on 64-bit HP/UX. + We check for that by checking for the elf_hp.h header file. */ +#ifdef HAVE_ELF_HP_H /* FIXME: kettenis/20041213: These includes should be eliminated. */ #include @@ -211,7 +211,7 @@ read_dynamic_info (asection *dyninfo_sect, dld_cache_t *dld_cache_p) CORE_ADDR dyn_ptr; char *pbuf; - pbuf = alloca (TARGET_PTR_BIT / HOST_CHAR_BIT); + pbuf = alloca (gdbarch_ptr_bit (current_gdbarch) / HOST_CHAR_BIT); dyn_tag = bfd_h_get_64 (symfile_objfile->obfd, (bfd_byte*) &x_dynp->d_tag); @@ -659,9 +659,10 @@ _initialize_pa64_solib (void) memset (&dld_cache, 0, sizeof (dld_cache)); } -void pa64_solib_select (struct gdbarch_tdep *tdep) +void pa64_solib_select (struct gdbarch *gdbarch) { - current_target_so_ops = &pa64_so_ops; + struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); + set_solib_ops (gdbarch, &pa64_so_ops); tdep->solib_thread_start_addr = pa64_solib_thread_start_addr; tdep->solib_get_got_by_pc = pa64_solib_get_got_by_pc; @@ -669,7 +670,7 @@ void pa64_solib_select (struct gdbarch_tdep *tdep) tdep->solib_get_text_base = pa64_solib_get_text_base; } -#else /* PA_SOM_ONLY */ +#else /* HAVE_ELF_HP_H */ extern initialize_file_ftype _initialize_pa64_solib; /* -Wmissing-prototypes */ @@ -678,7 +679,7 @@ _initialize_pa64_solib (void) { } -void pa64_solib_select (struct gdbarch_tdep *tdep) +void pa64_solib_select (struct gdbarch *gdbarch) { /* For a SOM-only target, there is no pa64 solib support. This is needed for hppa-hpux-tdep.c to build. */