From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16544 invoked by alias); 27 Sep 2010 07:47:57 -0000 Received: (qmail 16536 invoked by uid 22791); 27 Sep 2010 07:47:55 -0000 X-SWARE-Spam-Status: No, hits=-0.3 required=5.0 tests=AWL,BAYES_20,MSGID_MULTIPLE_AT,TW_BJ X-Spam-Check-By: sourceware.org Received: from mailhost.u-strasbg.fr (HELO mailhost.u-strasbg.fr) (130.79.200.155) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 27 Sep 2010 07:47:50 +0000 Received: from md2.u-strasbg.fr (md2.u-strasbg.fr [IPv6:2001:660:2402::187]) by mailhost.u-strasbg.fr (8.14.3/jtpda-5.5pre1) with ESMTP id o8R7lODv074966 ; Mon, 27 Sep 2010 09:47:25 +0200 (CEST) (envelope-from pierre.muller@ics-cnrs.unistra.fr) Received: from mailserver.u-strasbg.fr (ms5.u-strasbg.fr [IPv6:2001:660:2402:d::14]) by md2.u-strasbg.fr (8.14.4/jtpda-5.5pre1) with ESMTP id o8R7lNvJ026102 ; Mon, 27 Sep 2010 09:47:23 +0200 (CEST) (envelope-from pierre.muller@ics-cnrs.unistra.fr) Received: from d620muller (gw-ics.u-strasbg.fr [130.79.210.225]) (user=mullerp mech=LOGIN) by mailserver.u-strasbg.fr (8.14.4/jtpda-5.5pre1) with ESMTP id o8R7lM6O011821 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO) ; Mon, 27 Sep 2010 09:47:23 +0200 (CEST) (envelope-from pierre.muller@ics-cnrs.unistra.fr) From: "Pierre Muller" To: "'Pierre Muller'" , "'Joel Brobecker'" Cc: References: <004201cb50f2$18d8f310$4a8ad930$@muller@ics-cnrs.unistra.fr> <20100913181100.GC3845@adacore.com> <000c01cb53e1$56476e60$02d64b20$@muller@ics-cnrs.unistra.fr> <004001cb5402$2ba93b90$82fbb2b0$@muller@ics-cnrs.unistra.fr> In-Reply-To: <004001cb5402$2ba93b90$82fbb2b0$@muller@ics-cnrs.unistra.fr> Subject: [PING][RFC] hpux code fix ( was [RFA 5/5] New patches to support --enable-targets=all for mingw64) Date: Mon, 27 Sep 2010 17:34:00 -0000 Message-ID: <003901cb5e18$38b54160$aa1fc420$@muller@ics-cnrs.unistra.fr> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2010-09/txt/msg00448.txt.bz2 Sadly, it seems that no-one is maintainer of hppa port anymore... Joel, could you please still take a short look on this? Thanks in advance, Pierre Muller Pascal language support maintainer for GDB > -----Message d'origine----- > De=A0: gdb-patches-owner@sourceware.org [mailto:gdb-patches- > owner@sourceware.org] De la part de Pierre Muller > Envoy=E9=A0: Tuesday, September 14, 2010 1:44 PM > =C0=A0: 'Joel Brobecker' > Cc=A0: gdb-patches@sourceware.org > Objet=A0: [RFC] hpux code fix ( was [RFA 5/5] New patches to support -- > enable-targets=3Dall for mingw64) >=20 > I finally wrote a patch that moves the > OS specific uname call to hppa-hpux-nat.c > and adds a new set/show command allowing to > override the default hpux_major_release version > (that I set to 11). >=20 > The only trouble is that I have no way to > test this patch for the native part... > The compilation with --enable-targets=3Dall > works and the tdep parts seem to work as expected. >=20 > Could someone test this out? >=20 > Comments welcome, >=20 >=20 > Pierre Muller > Pascal language support maintainer for GDB >=20 > ChangeLog entry: >=20 > 2010-09-14 Pierre Muller >=20 > * solib-som.h (hpux_major_release): Declare new external > variable. > * hppa-hpux-nat.c: Add sys/utsname.h include. > (_initialize_hppa_hpux_nat): Set default value of > hpux_major_release to ouptut of uname call. > * solib-som.c: Remove HPUX specific code. > (DEFAULT_HPUX_MAJOR_RELEASE): New macro. > (hpux_major_release): New global variable. > (show_hpux_major_release): New function. > (get_hpux_major_release): Simply return current > HPUX_MAJOR_RELEASE. > (_initialize_som_solib): Add new set/show commands hpux-major- > release. >=20 >=20 > Index: solib-som.h > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > RCS file: /cvs/src/src/gdb/solib-som.h,v > retrieving revision 1.8 > diff -u -p -r1.8 solib-som.h > --- solib-som.h 1 Jan 2010 07:31:41 -0000 1.8 > +++ solib-som.h 14 Sep 2010 10:37:04 -0000 > @@ -24,6 +24,8 @@ struct objfile; > struct section_offsets; > struct gdbarch; >=20 > +extern int hpux_major_release; > + > void som_solib_select (struct gdbarch *gdbarch); >=20 > int som_solib_section_offsets (struct objfile *objfile, > Index: hppa-hpux-nat.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > RCS file: /cvs/src/src/gdb/hppa-hpux-nat.c,v > retrieving revision 1.20 > diff -u -p -r1.20 hppa-hpux-nat.c > --- hppa-hpux-nat.c 1 Jan 2010 07:31:33 -0000 1.20 > +++ hppa-hpux-nat.c 14 Sep 2010 10:37:04 -0000 > @@ -25,6 +25,7 @@ >=20 > #include "gdb_assert.h" > #include > +#include > #include >=20 > #ifdef HAVE_TTRACE > @@ -32,6 +33,7 @@ > #endif >=20 > #include "hppa-tdep.h" > +#include "solib-som.h" > #include "inf-ptrace.h" > #include "inf-ttrace.h" >=20 > @@ -254,7 +256,12 @@ void > _initialize_hppa_hpux_nat (void) > { > struct target_ops *t; > + struct utsname x; > + char *p; >=20 > + uname (&x); > + p =3D strchr (x.release, '.'); > + hpux_major_release =3D p ? atoi (p + 1) : 11; > #ifdef HAVE_TTRACE > t =3D inf_ttrace_target (); > #else > Index: solib-som.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > RCS file: /cvs/src/src/gdb/solib-som.c,v > retrieving revision 1.29 > diff -u -p -r1.29 solib-som.c > --- solib-som.c 16 May 2010 23:49:58 -0000 1.29 > +++ solib-som.c 14 Sep 2010 10:37:04 -0000 > @@ -26,13 +26,14 @@ > #include "gdbcore.h" > #include "target.h" > #include "inferior.h" > +#include "command.h" > +#include "gdbcmd.h" >=20 > #include "hppa-tdep.h" > #include "solist.h" > #include "solib.h" > #include "solib-som.h" >=20 > -#include > #include >=20 > #undef SOLIB_SOM_DBG > @@ -133,21 +134,22 @@ som_relocate_section_addresses (struct s > /* Get HP-UX major release number. Returns zero if the > release is not known. */ >=20 > +#define DEFAULT_HPUX_MAJOR_RELEASE 11 > +int > +hpux_major_release =3D DEFAULT_HPUX_MAJOR_RELEASE; > + > +static void > +show_hpux_major_release (struct ui_file *file, int from_tty, > + struct cmd_list_element *c, const char *value) > +{ > + fprintf_filtered (file, _("\ > +Currently assumed major release version for HPUX is %d.\n"), > + hpux_major_release); > +} > + > static int > get_hpux_major_release (void) > { > - static int hpux_major_release =3D -1; > - > - if (hpux_major_release =3D=3D -1) > - { > - struct utsname x; > - char *p; > - > - uname (&x); > - p =3D strchr (x.release, '.'); > - hpux_major_release =3D p ? atoi (p + 1) : 0; > - } > - > return hpux_major_release; > } >=20 > @@ -810,6 +812,13 @@ _initialize_som_solib (void) > som_so_ops.open_symbol_file_object =3D som_open_symbol_file_object; > som_so_ops.in_dynsym_resolve_code =3D som_in_dynsym_resolve_code; > som_so_ops.bfd_open =3D solib_bfd_open; > + add_setshow_integer_cmd ("hpux-major-release", class_support, > + &hpux_major_release, _("\ > +Set assumed HPUX major release version."), _("\ > +Show assumed HPUX major release version."), NULL, > + NULL, > + show_hpux_major_release, > + &setlist, &showlist); > } >=20 > void