Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* Patch for gdb build on hppa hp-ux
@ 2007-04-06 21:53 Steve Ellcey
  2007-04-07 17:20 ` Daniel Jacobowitz
  2007-04-09  2:13 ` Daniel Jacobowitz
  0 siblings, 2 replies; 15+ messages in thread
From: Steve Ellcey @ 2007-04-06 21:53 UTC (permalink / raw)
  To: gdb-patches

This patch fixes a build problem on hppa hp-ux.  This is the first of
two patches I have that allow me to build gdb on hppa hp-ux.  The build
has been broken (for me at least) for some time.  This is the only HP
specific change that was needed.  Tested by building gdb on hppa hp-ux.

OK to checkin?

Steve Ellcey
sje@cup.hp.com


2007-04-06  Steve Ellcey  <sje@cup.hp.com>

	* hpread.c (hpread_get_next_skip_over_anon_unions): Fix
	CHECK_TYPEDEF usage.

Index: hpread.c
===================================================================
RCS file: /cvs/src/src/gdb/hpread.c,v
retrieving revision 1.62
diff -p -u -r1.62 hpread.c
--- hpread.c	9 Jan 2007 17:58:51 -0000	1.62
+++ hpread.c	6 Apr 2007 21:47:21 -0000
@@ -6316,7 +6316,7 @@ hpread_get_next_skip_over_anon_unions (i
       /* Get type of item we're looking at now; recursively processes the types
          of these intermediate items we skip over, so they aren't lost. */
       anon_type = hpread_type_lookup ((*fieldp)->dfield.type, objfile);
-      anon_type = CHECK_TYPEDEF (anon_type);
+      CHECK_TYPEDEF (anon_type);
       bitoffset = (*fieldp)->dfield.bitoffset;
       name = VT (objfile) + (*fieldp)->dfield.name;
       /* First skip over one item to avoid stack death on recursion */


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Patch for gdb build on hppa hp-ux
  2007-04-06 21:53 Patch for gdb build on hppa hp-ux Steve Ellcey
@ 2007-04-07 17:20 ` Daniel Jacobowitz
  2007-04-09  2:13 ` Daniel Jacobowitz
  1 sibling, 0 replies; 15+ messages in thread
From: Daniel Jacobowitz @ 2007-04-07 17:20 UTC (permalink / raw)
  To: Steve Ellcey; +Cc: gdb-patches

On Fri, Apr 06, 2007 at 02:53:09PM -0700, Steve Ellcey wrote:
> This patch fixes a build problem on hppa hp-ux.  This is the first of
> two patches I have that allow me to build gdb on hppa hp-ux.  The build
> has been broken (for me at least) for some time.  This is the only HP
> specific change that was needed.  Tested by building gdb on hppa hp-ux.
> 
> OK to checkin?

OK, although this file will be going away shortly - I ran out of time
before ESC, but I'm going to finish removing the files we agreed on
this month.

-- 
Daniel Jacobowitz
CodeSourcery


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Patch for gdb build on hppa hp-ux
  2007-04-06 21:53 Patch for gdb build on hppa hp-ux Steve Ellcey
  2007-04-07 17:20 ` Daniel Jacobowitz
@ 2007-04-09  2:13 ` Daniel Jacobowitz
  2007-04-09 23:25   ` Steve Ellcey
  1 sibling, 1 reply; 15+ messages in thread
From: Daniel Jacobowitz @ 2007-04-09  2:13 UTC (permalink / raw)
  To: Steve Ellcey; +Cc: gdb-patches

On Fri, Apr 06, 2007 at 02:53:09PM -0700, Steve Ellcey wrote:
> This patch fixes a build problem on hppa hp-ux.  This is the first of
> two patches I have that allow me to build gdb on hppa hp-ux.  The build
> has been broken (for me at least) for some time.  This is the only HP
> specific change that was needed.  Tested by building gdb on hppa hp-ux.

Since you can build on HP/UX, could you test this patch for me?  It
removes support for HP aCC, both the custom C++ ABI (which has fingers
in a lot of other places too, but this is a start) and the custom
debug format.  It should not affect the testsuite when using gcc with
SOM.

Thanks in advance!

-- 
Daniel Jacobowitz
CodeSourcery

2007-04-08  Daniel Jacobowitz  <dan@codesourcery.com>

	* Makefile.in (SFILES): Remove hpacc-abi.c.
	(COMMON_OBS): Remove hpacc-abi.o.
	(ALLDEPFILES): Remove hpread.c and $(HPREAD_SOURCE).
	(hpacc-abi.o, hpread.o): Delete rules.
	* somread.c: Delete extern declarations from hpread.c.
	(som_symfile_read): Do not call do_pxdb or hpread_build_psymtabs.
	(som_symfile_finish): Do not call hpread_symfile_finish.
	(som_symfile_init): Do not call hpread_symfile_init.
	* config/pa/hppa64.mt (TDEPFILES): Remove hpread.o.
	* config/pa/hppahpux.mt (TDEPFILES): Likewise.
	* hpacc-abi.c, hpread.c: Deleted.

	* gdbint.texinfo (SOM): Correct location of the SOM reader.

Index: Makefile.in
===================================================================
RCS file: /cvs/src/src/gdb/Makefile.in,v
retrieving revision 1.890
diff -u -p -r1.890 Makefile.in
--- Makefile.in	30 Mar 2007 22:50:32 -0000	1.890
+++ Makefile.in	9 Apr 2007 02:09:23 -0000
@@ -538,7 +538,6 @@ SFILES = ada-exp.y ada-lang.c ada-typepr
 	frame-base.c \
 	frame-unwind.c \
 	gdbarch.c arch-utils.c gdbtypes.c gnu-v2-abi.c gnu-v3-abi.c \
-	hpacc-abi.c \
 	inf-loop.c \
 	infcall.c \
 	infcmd.c inflow.c infrun.c \
@@ -971,7 +970,7 @@ COMMON_OBS = $(DEPFILES) $(CONFIG_OBS) $
 	user-regs.o \
 	frame.o frame-unwind.o doublest.o \
 	frame-base.o \
-	gnu-v2-abi.o gnu-v3-abi.o hpacc-abi.o cp-abi.o cp-support.o \
+	gnu-v2-abi.o gnu-v3-abi.o cp-abi.o cp-support.o \
 	cp-namespace.o \
 	reggroups.o regset.o \
 	trad-frame.o \
@@ -1456,7 +1455,6 @@ ALLDEPFILES = \
 	hppa-tdep.c hppa-hpux-tdep.c hppa-hpux-nat.c \
 	hppa-linux-tdep.c hppa-linux-nat.c \
 	hppabsd-nat.c hppabsd-tdep.c \
-	hpread.c \
 	i386-tdep.c i386-linux-nat.c \
 	i386v4-nat.c i386-cygwin-tdep.c \
 	i386bsd-nat.c i386bsd-tdep.c i386fbsd-nat.c i386fbsd-tdep.c \
@@ -1485,7 +1483,7 @@ ALLDEPFILES = \
 	mips64obsd-nat.c mips64obsd-tdep.c \
 	nbsd-nat.c nbsd-tdep.c obsd-tdep.c \
 	solib-osf.c \
-	somread.c solib-som.c $(HPREAD_SOURCE) \
+	somread.c solib-som.c \
 	posix-hdep.c \
 	ppc-sysv-tdep.c ppc-linux-nat.c ppc-linux-tdep.c \
 	ppcnbsd-nat.c ppcnbsd-tdep.c \
@@ -2067,8 +2065,6 @@ go32-nat.o: go32-nat.c $(defs_h) $(infer
 h8300-tdep.o: h8300-tdep.c $(defs_h) $(value_h) $(arch_utils_h) $(regcache_h) \
 	$(gdbcore_h) $(objfiles_h) $(gdb_assert_h) $(dis_asm_h) \
 	 $(dwarf2_frame_h) $(frame_base_h) $(frame_unwind_h)
-hpacc-abi.o: hpacc-abi.c $(defs_h) $(value_h) $(gdb_regex_h) $(gdb_string_h) \
-	$(gdbtypes_h) $(gdbcore_h) $(cp_abi_h) $(gnu_v2_abi_h)
 hppabsd-nat.o: hppabsd-nat.c $(defs_h) $(inferior_h) $(regcache_h) \
 	$(target_h) $(hppa_tdep_h) $(inf_ptrace_h)
 hppabsd-tdep.o: hppabsd-tdep.c $(defs_h) $(arch_utils_h) $(symtab_h) \
@@ -2095,10 +2091,6 @@ hppa-tdep.o: hppa-tdep.c $(defs_h) $(bfd
 	$(symtab_h) $(dis_asm_h) $(trad_frame_h) $(frame_unwind_h) \
 	$(frame_base_h) $(gdbcore_h) $(gdbcmd_h) $(objfiles_h) \
 	$(hppa_tdep_h) $(gdbtypes_h)
-hpread.o: hpread.c $(defs_h) $(bfd_h) $(gdb_string_h) $(hp_symtab_h) \
-	$(syms_h) $(symtab_h) $(symfile_h) $(objfiles_h) $(buildsym_h) \
-	$(complaints_h) $(gdb_stabs_h) $(gdbtypes_h) $(demangle_h) \
-	$(solib_som_h) $(gdb_assert_h) $(hppa_tdep_h) $(gdb_string_h)
 hpux-thread.o: hpux-thread.c $(defs_h) $(gdbthread_h) $(target_h) \
 	$(inferior_h) $(regcache_h) $(gdb_stat_h) $(gdbcore_h) \
 	$(hppa_tdep_h)
Index: somread.c
===================================================================
RCS file: /cvs/src/src/gdb/somread.c,v
retrieving revision 1.32
diff -u -p -r1.32 somread.c
--- somread.c	9 Jan 2007 17:58:58 -0000	1.32
+++ somread.c	9 Apr 2007 02:09:23 -0000
@@ -40,16 +40,6 @@
 /* Prototypes for local functions.  */
 static int init_import_symbols (struct objfile *objfile);
 
-/* FIXME: These should really be in a common header somewhere */
-
-extern void hpread_build_psymtabs (struct objfile *, int);
-
-extern void hpread_symfile_finish (struct objfile *);
-
-extern void hpread_symfile_init (struct objfile *);
-
-extern void do_pxdb (bfd *);
-
 /*
 
    LOCAL FUNCTION
@@ -327,8 +317,6 @@ som_symfile_read (struct objfile *objfil
   bfd *abfd = objfile->obfd;
   struct cleanup *back_to;
 
-  do_pxdb (symfile_bfd_open (objfile->name));
-
   init_minimal_symbol_collection ();
   back_to = make_cleanup_discard_minimal_symbols ();
 
@@ -363,12 +351,6 @@ som_symfile_read (struct objfile *objfil
      This is emitted by gcc.  */
   stabsect_build_psymtabs (objfile, mainline,
 			   "$GDB_SYMBOLS$", "$GDB_STRINGS$", "$TEXT$");
-
-  /* Now read the native debug information. 
-     This builds the psymtab. This used to be done via a scan of
-     the DNTT, but is now done via the PXDB-built quick-lookup tables
-     together with a scan of the GNTT. See hp-psymtab-read.c. */
-  hpread_build_psymtabs (objfile, mainline);
 }
 
 /* Initialize anything that needs initializing when a completely new symbol
@@ -396,7 +378,6 @@ som_symfile_finish (struct objfile *objf
     {
       xfree (objfile->deprecated_sym_stab_info);
     }
-  hpread_symfile_finish (objfile);
 }
 
 /* SOM specific initialization routine for reading symbols.  */
@@ -408,7 +389,6 @@ som_symfile_init (struct objfile *objfil
      find this causes a significant slowdown in gdb then we could
      set it in the debug symbol readers only when necessary.  */
   objfile->flags |= OBJF_REORDERED;
-  hpread_symfile_init (objfile);
 }
 
 /* SOM specific parsing routine for section offsets.
Index: config/pa/hppa64.mt
===================================================================
RCS file: /cvs/src/src/gdb/config/pa/hppa64.mt,v
retrieving revision 1.8
diff -u -p -r1.8 hppa64.mt
--- config/pa/hppa64.mt	26 Mar 2006 08:18:17 -0000	1.8
+++ config/pa/hppa64.mt	9 Apr 2007 02:09:23 -0000
@@ -1,3 +1,3 @@
 # Target: HP PA-RISC 2.0 running HPUX 11.00 in wide mode
-TDEPFILES= hppa-tdep.o hppa-hpux-tdep.o solib-som.o solib-pa64.o somread.o hpread.o solib.o
+TDEPFILES= hppa-tdep.o hppa-hpux-tdep.o solib-som.o solib-pa64.o somread.o solib.o
 DEPRECATED_TM_FILE= tm-hppah.h
Index: config/pa/hppahpux.mt
===================================================================
RCS file: /cvs/src/src/gdb/config/pa/hppahpux.mt,v
retrieving revision 1.7
diff -u -p -r1.7 hppahpux.mt
--- config/pa/hppahpux.mt	13 Dec 2004 04:06:16 -0000	1.7
+++ config/pa/hppahpux.mt	9 Apr 2007 02:09:23 -0000
@@ -1,4 +1,4 @@
 # Target: HP PA-RISC running hpux
 MT_CFLAGS = -DPA_SOM_ONLY=1
-TDEPFILES= hppa-tdep.o hppa-hpux-tdep.o corelow.o somread.o hpread.o solib-som.o solib-pa64.o solib.o
+TDEPFILES= hppa-tdep.o hppa-hpux-tdep.o corelow.o somread.o solib-som.o solib-pa64.o solib.o
 DEPRECATED_TM_FILE= tm-hppah.h
Index: doc/gdbint.texinfo
===================================================================
RCS file: /cvs/src/src/gdb/doc/gdbint.texinfo,v
retrieving revision 1.257
diff -u -p -r1.257 gdbint.texinfo
--- doc/gdbint.texinfo	30 Mar 2007 17:21:48 -0000	1.257
+++ doc/gdbint.texinfo	9 Apr 2007 02:09:24 -0000
@@ -2112,7 +2112,7 @@ The basic ELF reader is in @file{elfread
 SOM is HP's object file and debug format (not to be confused with IBM's
 SOM, which is a cross-language ABI).
 
-The SOM reader is in @file{hpread.c}.
+The SOM reader is in @file{somread.c}.
 
 @section Debugging File Formats
 


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Patch for gdb build on hppa hp-ux
  2007-04-09  2:13 ` Daniel Jacobowitz
@ 2007-04-09 23:25   ` Steve Ellcey
  2007-04-10 12:05     ` Daniel Jacobowitz
  0 siblings, 1 reply; 15+ messages in thread
From: Steve Ellcey @ 2007-04-09 23:25 UTC (permalink / raw)
  To: drow; +Cc: gdb-patches

Daniel Jacobowitz wrote:

> Since you can build on HP/UX, could you test this patch for me?  It
> removes support for HP aCC, both the custom C++ ABI (which has fingers
> in a lot of other places too, but this is a start) and the custom
> debug format.  It should not affect the testsuite when using gcc with
> SOM.
> 
> Thanks in advance!

Looks good.  After I added a local change to use -Wno-char-subscripts
when building gdb (patch to be submitted) I was able to build with your
patch.  I also ran the gdb testsuite and it went from 432 unexpected
errors down to 357 after adding your patch.  Most of the new passes are
in the gdb.cp section.

Steve Ellcey
sje@cup.hp.com


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Patch for gdb build on hppa hp-ux
  2007-04-09 23:25   ` Steve Ellcey
@ 2007-04-10 12:05     ` Daniel Jacobowitz
  2007-04-10 12:11       ` Daniel Jacobowitz
                         ` (2 more replies)
  0 siblings, 3 replies; 15+ messages in thread
From: Daniel Jacobowitz @ 2007-04-10 12:05 UTC (permalink / raw)
  To: Steve Ellcey; +Cc: gdb-patches

On Mon, Apr 09, 2007 at 04:25:38PM -0700, Steve Ellcey wrote:
> Looks good.  After I added a local change to use -Wno-char-subscripts
> when building gdb (patch to be submitted) I was able to build with your
> patch.  I also ran the gdb testsuite and it went from 432 unexpected
> errors down to 357 after adding your patch.  Most of the new passes are
> in the gdb.cp section.

That's peculiar, but I'll accept it.  It must come from not calling
pxdb or trying to parse system libraries for debug information, since
the hpacc-abi.c code apparently has not been enabled in years; I went
trying to figure out how it was turned on today and lo and behold, it
never is.

I checked in the patch.  Steve, Eli, does this NEWS addition look
reasonable?  I believe it's accurate for what I've removed, but I am
not a user of HP-UX or aCC, so I'm guessing a little bit.

-- 
Daniel Jacobowitz
CodeSourcery

2007-04-10  Daniel Jacobowitz  <dan@codesourcery.com>

	* NEWS: Mention removal of HP aCC support.

Index: NEWS
===================================================================
RCS file: /cvs/src/src/gdb/NEWS,v
retrieving revision 1.220
diff -u -p -r1.220 NEWS
--- NEWS	31 Mar 2007 10:42:22 -0000	1.220
+++ NEWS	10 Apr 2007 12:04:27 -0000
@@ -127,6 +127,13 @@ DWARF 1 support
 	A debug information format.  The predecessor to DWARF 2 and 
 	DWARF 3, which are still supported.
 
+Support for the HP aCC compiler on HP-UX/PA-RISC
+
+	SOM-encapsulated symbolic debugging information, automatic
+	invocation of pxdb, and the aCC custom C++ ABI.  This does not
+	affect HP-UX for Itanic or GCC for HP-UX/PA-RISC.  Code compiled
+	with aCC can still be debugged on an assembly level.
+
 *** Changes in GDB 6.6
 
 * New targets


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Patch for gdb build on hppa hp-ux
  2007-04-10 12:05     ` Daniel Jacobowitz
@ 2007-04-10 12:11       ` Daniel Jacobowitz
  2007-04-10 17:32       ` Steve Ellcey
  2007-04-10 19:03       ` Eli Zaretskii
  2 siblings, 0 replies; 15+ messages in thread
From: Daniel Jacobowitz @ 2007-04-10 12:11 UTC (permalink / raw)
  To: Steve Ellcey, gdb-patches; +Cc: Eli Zaretskii

On Tue, Apr 10, 2007 at 08:05:47AM -0400, Daniel Jacobowitz wrote:
> On Mon, Apr 09, 2007 at 04:25:38PM -0700, Steve Ellcey wrote:
> > Looks good.  After I added a local change to use -Wno-char-subscripts
> > when building gdb (patch to be submitted) I was able to build with your
> > patch.  I also ran the gdb testsuite and it went from 432 unexpected
> > errors down to 357 after adding your patch.  Most of the new passes are
> > in the gdb.cp section.
> 
> That's peculiar, but I'll accept it.  It must come from not calling
> pxdb or trying to parse system libraries for debug information, since
> the hpacc-abi.c code apparently has not been enabled in years; I went
> trying to figure out how it was turned on today and lo and behold, it
> never is.
> 
> I checked in the patch.  Steve, Eli, does this NEWS addition look
> reasonable?  I believe it's accurate for what I've removed, but I am
> not a user of HP-UX or aCC, so I'm guessing a little bit.

Sorry, meant to CC Eli on that last message obviously!

-- 
Daniel Jacobowitz
CodeSourcery

2007-04-10  Daniel Jacobowitz  <dan@codesourcery.com>

	* NEWS: Mention removal of HP aCC support.

Index: NEWS
===================================================================
RCS file: /cvs/src/src/gdb/NEWS,v
retrieving revision 1.220
diff -u -p -r1.220 NEWS
--- NEWS	31 Mar 2007 10:42:22 -0000	1.220
+++ NEWS	10 Apr 2007 12:04:27 -0000
@@ -127,6 +127,13 @@ DWARF 1 support
 	A debug information format.  The predecessor to DWARF 2 and 
 	DWARF 3, which are still supported.
 
+Support for the HP aCC compiler on HP-UX/PA-RISC
+
+	SOM-encapsulated symbolic debugging information, automatic
+	invocation of pxdb, and the aCC custom C++ ABI.  This does not
+	affect HP-UX for Itanic or GCC for HP-UX/PA-RISC.  Code compiled
+	with aCC can still be debugged on an assembly level.
+
 *** Changes in GDB 6.6
 
 * New targets


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Patch for gdb build on hppa hp-ux
  2007-04-10 12:05     ` Daniel Jacobowitz
  2007-04-10 12:11       ` Daniel Jacobowitz
@ 2007-04-10 17:32       ` Steve Ellcey
  2007-04-10 17:41         ` Daniel Jacobowitz
  2007-04-10 19:03       ` Eli Zaretskii
  2 siblings, 1 reply; 15+ messages in thread
From: Steve Ellcey @ 2007-04-10 17:32 UTC (permalink / raw)
  To: drow; +Cc: gdb-patches

> +Support for the HP aCC compiler on HP-UX/PA-RISC
> +
> +	SOM-encapsulated symbolic debugging information, automatic
> +	invocation of pxdb, and the aCC custom C++ ABI.  This does not
> +	affect HP-UX for Itanic or GCC for HP-UX/PA-RISC.  Code compiled
> +	with aCC can still be debugged on an assembly level.
> +

I would prefer you say IA64 or Itanium and not Itanic.

Steve Ellcey
sje@cup.hp.com


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Patch for gdb build on hppa hp-ux
  2007-04-10 17:32       ` Steve Ellcey
@ 2007-04-10 17:41         ` Daniel Jacobowitz
  0 siblings, 0 replies; 15+ messages in thread
From: Daniel Jacobowitz @ 2007-04-10 17:41 UTC (permalink / raw)
  To: Steve Ellcey; +Cc: gdb-patches

On Tue, Apr 10, 2007 at 10:32:07AM -0700, Steve Ellcey wrote:
> > +Support for the HP aCC compiler on HP-UX/PA-RISC
> > +
> > +	SOM-encapsulated symbolic debugging information, automatic
> > +	invocation of pxdb, and the aCC custom C++ ABI.  This does not
> > +	affect HP-UX for Itanic or GCC for HP-UX/PA-RISC.  Code compiled
> > +	with aCC can still be debugged on an assembly level.
> > +
> 
> I would prefer you say IA64 or Itanium and not Itanic.

Whoops, thank you.  I even looked it up and worked out that I should
say Itanium, and then forgot to fix it.

-- 
Daniel Jacobowitz
CodeSourcery


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Patch for gdb build on hppa hp-ux
  2007-04-10 12:05     ` Daniel Jacobowitz
  2007-04-10 12:11       ` Daniel Jacobowitz
  2007-04-10 17:32       ` Steve Ellcey
@ 2007-04-10 19:03       ` Eli Zaretskii
  2007-04-10 20:22         ` Daniel Jacobowitz
  2 siblings, 1 reply; 15+ messages in thread
From: Eli Zaretskii @ 2007-04-10 19:03 UTC (permalink / raw)
  To: Daniel Jacobowitz; +Cc: sje, gdb-patches

> Date: Tue, 10 Apr 2007 08:05:47 -0400
> From: Daniel Jacobowitz <drow@false.org>
> Cc: gdb-patches@gcc.gnu.org
> 
> I checked in the patch.  Steve, Eli, does this NEWS addition look
> reasonable?

Almost.

> +	SOM-encapsulated symbolic debugging information, automatic
> +	invocation of pxdb, and the aCC custom C++ ABI.

This is not a complete sentence.

>                                                          This does not
> +	affect HP-UX for Itanic or GCC for HP-UX/PA-RISC.
                         ^^^^^^
Itanium, I think.

Otherwise, okay.  Thanks.


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Patch for gdb build on hppa hp-ux
  2007-04-10 19:03       ` Eli Zaretskii
@ 2007-04-10 20:22         ` Daniel Jacobowitz
  2007-04-13 14:04           ` Daniel Jacobowitz
  0 siblings, 1 reply; 15+ messages in thread
From: Daniel Jacobowitz @ 2007-04-10 20:22 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: sje, gdb-patches

On Tue, Apr 10, 2007 at 10:03:27PM +0300, Eli Zaretskii wrote:
> > +	SOM-encapsulated symbolic debugging information, automatic
> > +	invocation of pxdb, and the aCC custom C++ ABI.
> 
> This is not a complete sentence.

This is a list of items and descriptions; the other items are:

target abug
target cpu32bug
target est
target rom68k

        Various m68k-only ROM monitors.

DWARF 1 support

        A debug information format.  The predecessor to DWARF 2 and
        DWARF 3, which are still supported.

Would you rather I used complete sentences throughout, or is that too
wordy?

I'm asking since I have a sizable patch deleting everything else
from the list of obsolete files, and that adds another dozen things to
this list.

-- 
Daniel Jacobowitz
CodeSourcery


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Patch for gdb build on hppa hp-ux
  2007-04-10 20:22         ` Daniel Jacobowitz
@ 2007-04-13 14:04           ` Daniel Jacobowitz
  2007-04-13 17:07             ` [patch] "single step" atomic instruction sequences as a whole on PPC Luis Machado
  0 siblings, 1 reply; 15+ messages in thread
From: Daniel Jacobowitz @ 2007-04-13 14:04 UTC (permalink / raw)
  To: Eli Zaretskii, sje, gdb-patches

On Tue, Apr 10, 2007 at 04:22:13PM -0400, Daniel Jacobowitz wrote:
> On Tue, Apr 10, 2007 at 10:03:27PM +0300, Eli Zaretskii wrote:
> > > +	SOM-encapsulated symbolic debugging information, automatic
> > > +	invocation of pxdb, and the aCC custom C++ ABI.
> > 
> > This is not a complete sentence.

Since you approved similar descriptive items in the other deletion
patch, I checked this in with only the Itanium correction.  Please let
me know if you'd like me to change it.

-- 
Daniel Jacobowitz
CodeSourcery


^ permalink raw reply	[flat|nested] 15+ messages in thread

* [patch] "single step" atomic instruction sequences as a whole on  PPC
  2007-04-13 14:04           ` Daniel Jacobowitz
@ 2007-04-13 17:07             ` Luis Machado
  2007-04-28 23:34               ` [RFC] " Luis Machado
  0 siblings, 1 reply; 15+ messages in thread
From: Luis Machado @ 2007-04-13 17:07 UTC (permalink / raw)
  To: Daniel Jacobowitz; +Cc: gdb-patches

[-- Attachment #1: Type: text/plain, Size: 229 bytes --]

Daniel,

Follows attached the ppc portion of the patch for single stepping of
atomic instruction sequences.

You did mention that it had some cosmetic issues, so i'd like to have
your thoughts and comments on that.

Thanks,
Luis

[-- Attachment #2: ppc-atomic-single-stepping.diff --]
[-- Type: text/x-patch, Size: 4466 bytes --]

2007-04-13  Luis Machado  <luisgpm@br.ibm.com>

	* rs6000-tdep.c: Defines masks for POWER instructions that set
	and use the reservation flag (LWARX,LDARX,STWCX,STDCX).
	* rs6000-tdep.c (deal_with_atomic_sequence): Handles single
	stepping through an atomic sequence of instructions.
	* rs6000-tdep.c (rs6000_software_single_step): Added a function
	call to check if we are stepping through an atomic sequence of 
	instructions.
	* rs6000-tdep.c (rs6000_gdbarch_init): Initializes a function to
	check for atomic instruction sequences while single stepping.

Index: gdb/rs6000-tdep.c
===================================================================
--- gdb.orig/rs6000-tdep.c	2007-04-13 06:13:20.000000000 -0700
+++ gdb/rs6000-tdep.c	2007-04-13 08:52:43.000000000 -0700
@@ -719,6 +719,93 @@
     return little_breakpoint;
 }
 
+#define LWARX_MASK 0xfc0007fe
+#define LWARX_INSTRUCTION 0x7c000028
+#define LDARX_INSTRUCTION 0x7c0000A8
+#define STWCX_MASK 0xfc0007ff
+#define STWCX_INSTRUCTION 0x7c00012d
+#define STDCX_INSTRUCTION 0x7c0001ad
+#define BC_MASK 0xfc000000
+#define BC_INSTRUCTION 0x40000000
+#define IMMEDIATE_PART(insn)  (((insn & ~3) << 16) >> 16)
+#define ABSOLUTE_P(insn) ((int) ((insn >> 1) & 1))
+
+static int 
+deal_with_atomic_sequence (enum target_signal sig, int insert_breakpoints_p)
+{
+  CORE_ADDR pc = read_pc ();
+  CORE_ADDR breaks[2] = {-1, -1};
+  CORE_ADDR loc = pc;
+  int insn = read_memory_integer (loc, PPC_INSN_SIZE);
+  int last_break = 0;
+  int i;
+
+  if (insert_breakpoints_p)
+    {
+        
+  /* Assume all atomic sequences start with an lwarx or ldarx instruction. */
+  if ((insn & LWARX_MASK) != LWARX_INSTRUCTION
+   && (insn & LWARX_MASK) != LDARX_INSTRUCTION)
+     return 0;
+
+  /* Assume that no atomic sequence is longer than 6 instructions. */
+  for (i = 1; i < 5; ++i)
+    {
+      loc += PPC_INSN_SIZE;
+      insn = read_memory_integer (loc, PPC_INSN_SIZE);
+
+      /* Assume at most one conditional branch instruction between
+ 	  the lwarx and stwcx instructions.*/
+      if ((insn & BC_MASK) == BC_INSTRUCTION)
+	    {
+	    last_break = 1;
+	    breaks[1] = IMMEDIATE_PART (insn);
+	    if ( ! ABSOLUTE_P(insn))
+	      breaks[1] += loc;
+	      continue;
+	    }
+
+        if ((insn & STWCX_MASK) == STWCX_INSTRUCTION
+         || (insn & STWCX_MASK) == STDCX_INSTRUCTION)
+	      break;
+    }
+
+  /* Assume that the atomic sequence ends with a stwcx instruction
+       followed by a conditional branch instruction. */
+  if ((insn & STWCX_MASK) != STWCX_INSTRUCTION
+   && (insn & STWCX_MASK) != STDCX_INSTRUCTION)
+    warning (_("Tried to step over an atomic sequence of instructions at %s\n \
+                but could not find the end of the sequence."),
+            core_addr_to_string(pc));
+
+  loc += PPC_INSN_SIZE;
+  insn = read_memory_integer (loc, PPC_INSN_SIZE);
+
+  if ((insn & BC_MASK) != BC_INSTRUCTION)
+    warning (_("Tried to step over an atomic sequence of instructions at %s\n \
+                but the instruction sequence ended in an unexpected way."),
+            core_addr_to_string(pc));
+
+  breaks[0] = loc;
+
+  /* This should never happen, but make sure we don't put
+     two breakpoints on the same address. */
+  if (last_break && breaks[1] == breaks[0])
+    last_break = 0;
+
+  for (i = 0; i <= last_break; ++i)
+    insert_single_step_breakpoint (breaks[i]);
+
+  printf_unfiltered (_("Stepping over an atomic sequence of instructions beginning at %s\n"),
+		     core_addr_to_string (pc));
+
+  gdb_flush (gdb_stdout);
+    }
+  else
+      remove_single_step_breakpoints();
+
+  return 1;
+}
 
 /* AIX does not support PT_STEP. Simulate it. */
 
@@ -740,6 +827,9 @@
 
       insn = read_memory_integer (loc, 4);
 
+      if (deal_with_atomic_sequence (signal, insert_breakpoints_p))
+        return 1;
+      
       breaks[0] = loc + breakp_sz;
       opcode = insn >> 26;
       breaks[1] = branch_dest (opcode, insn, loc, breaks[0]);
@@ -3467,6 +3557,9 @@
   set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
   set_gdbarch_breakpoint_from_pc (gdbarch, rs6000_breakpoint_from_pc);
 
+  /* Watch for locking instruction sequences during single stepping */
+  set_gdbarch_software_single_step(gdbarch, deal_with_atomic_sequence);
+  
   /* Handle the 64-bit SVR4 minimal-symbol convention of using "FN"
      for the descriptor and ".FN" for the entry-point -- a user
      specifying "break FN" will unexpectedly end up with a breakpoint

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [RFC] "single step" atomic instruction sequences as a whole on PPC
  2007-04-13 17:07             ` [patch] "single step" atomic instruction sequences as a whole on PPC Luis Machado
@ 2007-04-28 23:34               ` Luis Machado
  2007-04-28 23:45                 ` Ulrich Weigand
  0 siblings, 1 reply; 15+ messages in thread
From: Luis Machado @ 2007-04-28 23:34 UTC (permalink / raw)
  To: Daniel Jacobowitz; +Cc: gdb-patches

[-- Attachment #1: Type: text/plain, Size: 291 bytes --]

Daniel,

Follows attached the ppc portion of the patch for single stepping of
atomic instruction sequences.

You did mention that it had some cosmetic issues, so i'd like to have
thoughts and comments on that.

I'm re-submitting this one as it didn't make its way to the list.

Thanks,
Luis

[-- Attachment #2: ppc-atomic-single-stepping.diff --]
[-- Type: text/x-patch, Size: 4509 bytes --]

2007-04-13  Paul Gilliam  <pgilliam@us.ibm.com>
						Luis Machado  <luisgpm@br.ibm.com>

	* rs6000-tdep.c: Defines masks for POWER instructions that set
	and use the reservation flag (LWARX,LDARX,STWCX,STDCX).
	* rs6000-tdep.c (deal_with_atomic_sequence): Handles single
	stepping through an atomic sequence of instructions.
	* rs6000-tdep.c (rs6000_software_single_step): Added a function
	call to check if we are stepping through an atomic sequence of 
	instructions.
	* rs6000-tdep.c (rs6000_gdbarch_init): Initializes a function to
	check for atomic instruction sequences while single stepping.

Index: gdb/rs6000-tdep.c
===================================================================
--- gdb.orig/rs6000-tdep.c	2007-04-28 16:22:11.000000000 -0700
+++ gdb/rs6000-tdep.c	2007-04-28 16:25:17.000000000 -0700
@@ -719,6 +719,93 @@
     return little_breakpoint;
 }
 
+#define LWARX_MASK 0xfc0007fe
+#define LWARX_INSTRUCTION 0x7c000028
+#define LDARX_INSTRUCTION 0x7c0000A8
+#define STWCX_MASK 0xfc0007ff
+#define STWCX_INSTRUCTION 0x7c00012d
+#define STDCX_INSTRUCTION 0x7c0001ad
+#define BC_MASK 0xfc000000
+#define BC_INSTRUCTION 0x40000000
+#define IMMEDIATE_PART(insn)  (((insn & ~3) << 16) >> 16)
+#define ABSOLUTE_P(insn) ((int) ((insn >> 1) & 1))
+
+static int 
+deal_with_atomic_sequence (enum target_signal sig, int insert_breakpoints_p)
+{
+  CORE_ADDR pc = read_pc ();
+  CORE_ADDR breaks[2] = {-1, -1};
+  CORE_ADDR loc = pc;
+  int insn = read_memory_integer (loc, PPC_INSN_SIZE);
+  int last_break = 0;
+  int i;
+
+  if (insert_breakpoints_p)
+    {
+        
+  /* Assume all atomic sequences start with an lwarx or ldarx instruction. */
+  if ((insn & LWARX_MASK) != LWARX_INSTRUCTION
+   && (insn & LWARX_MASK) != LDARX_INSTRUCTION)
+     return 0;
+
+  /* Assume that no atomic sequence is longer than 6 instructions. */
+  for (i = 1; i < 5; ++i)
+    {
+      loc += PPC_INSN_SIZE;
+      insn = read_memory_integer (loc, PPC_INSN_SIZE);
+
+      /* Assume at most one conditional branch instruction between
+ 	  the lwarx and stwcx instructions.*/
+      if ((insn & BC_MASK) == BC_INSTRUCTION)
+	    {
+	    last_break = 1;
+	    breaks[1] = IMMEDIATE_PART (insn);
+	    if ( ! ABSOLUTE_P(insn))
+	      breaks[1] += loc;
+	      continue;
+	    }
+
+        if ((insn & STWCX_MASK) == STWCX_INSTRUCTION
+         || (insn & STWCX_MASK) == STDCX_INSTRUCTION)
+	      break;
+    }
+
+  /* Assume that the atomic sequence ends with a stwcx instruction
+       followed by a conditional branch instruction. */
+  if ((insn & STWCX_MASK) != STWCX_INSTRUCTION
+   && (insn & STWCX_MASK) != STDCX_INSTRUCTION)
+    warning (_("Tried to step over an atomic sequence of instructions at %s\n \
+                but could not find the end of the sequence."),
+            core_addr_to_string(pc));
+
+  loc += PPC_INSN_SIZE;
+  insn = read_memory_integer (loc, PPC_INSN_SIZE);
+
+  if ((insn & BC_MASK) != BC_INSTRUCTION)
+    warning (_("Tried to step over an atomic sequence of instructions at %s\n \
+                but the instruction sequence ended in an unexpected way."),
+            core_addr_to_string(pc));
+
+  breaks[0] = loc;
+
+  /* This should never happen, but make sure we don't put
+     two breakpoints on the same address. */
+  if (last_break && breaks[1] == breaks[0])
+    last_break = 0;
+
+  for (i = 0; i <= last_break; ++i)
+    insert_single_step_breakpoint (breaks[i]);
+
+  printf_unfiltered (_("Stepping over an atomic sequence of instructions beginning at %s\n"),
+		     core_addr_to_string (pc));
+
+  gdb_flush (gdb_stdout);
+    }
+  else
+      remove_single_step_breakpoints();
+
+  return 1;
+}
 
 /* AIX does not support PT_STEP. Simulate it. */
 
@@ -737,7 +824,10 @@
 
   insn = read_memory_integer (loc, 4);
 
-  breaks[0] = loc + breakp_sz;
+	if (deal_with_atomic_sequence (signal, insert_breakpoints_p))
+		return 1;
+
+	breaks[0] = loc + breakp_sz;
   opcode = insn >> 26;
   breaks[1] = branch_dest (opcode, insn, loc, breaks[0]);
 
@@ -3461,6 +3551,9 @@
   set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
   set_gdbarch_breakpoint_from_pc (gdbarch, rs6000_breakpoint_from_pc);
 
+  /* Watch for locking instruction sequences during single stepping */
+  set_gdbarch_software_single_step(gdbarch, deal_with_atomic_sequence);
+  
   /* Handle the 64-bit SVR4 minimal-symbol convention of using "FN"
      for the descriptor and ".FN" for the entry-point -- a user
      specifying "break FN" will unexpectedly end up with a breakpoint

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [RFC] "single step" atomic instruction sequences as a whole on PPC
  2007-04-28 23:34               ` [RFC] " Luis Machado
@ 2007-04-28 23:45                 ` Ulrich Weigand
  2007-04-29  1:53                   ` Luis Machado
  0 siblings, 1 reply; 15+ messages in thread
From: Ulrich Weigand @ 2007-04-28 23:45 UTC (permalink / raw)
  To: luisgpm; +Cc: Daniel Jacobowitz, gdb-patches

Luis Machado wrote:

> +static int 
> +deal_with_atomic_sequence (enum target_signal sig, int insert_breakpoints_p)

This doesn't actually work on mainline any more, the software_single_step
API was changed:
http://sourceware.org/ml/gdb-patches/2007-04/msg00218.html

Please update your patch accordingly.

Bye,
Ulrich

-- 
  Dr. Ulrich Weigand
  GNU Toolchain for Linux on System z and Cell BE
  Ulrich.Weigand@de.ibm.com


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [RFC] "single step" atomic instruction sequences as a whole on  PPC
  2007-04-28 23:45                 ` Ulrich Weigand
@ 2007-04-29  1:53                   ` Luis Machado
  0 siblings, 0 replies; 15+ messages in thread
From: Luis Machado @ 2007-04-29  1:53 UTC (permalink / raw)
  To: Ulrich Weigand; +Cc: Daniel Jacobowitz, gdb-patches

Oops. Sorry about that Ulrich. I'll re-work it based on your
modification for the single stepping routines.

Luis

On Sun, 2007-04-29 at 01:36 +0200, Ulrich Weigand wrote:
> Luis Machado wrote:
> 
> > +static int 
> > +deal_with_atomic_sequence (enum target_signal sig, int insert_breakpoints_p)
> 
> This doesn't actually work on mainline any more, the software_single_step
> API was changed:
> http://sourceware.org/ml/gdb-patches/2007-04/msg00218.html
> 
> Please update your patch accordingly.
> 
> Bye,
> Ulrich
> 


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2007-04-28 23:47 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-04-06 21:53 Patch for gdb build on hppa hp-ux Steve Ellcey
2007-04-07 17:20 ` Daniel Jacobowitz
2007-04-09  2:13 ` Daniel Jacobowitz
2007-04-09 23:25   ` Steve Ellcey
2007-04-10 12:05     ` Daniel Jacobowitz
2007-04-10 12:11       ` Daniel Jacobowitz
2007-04-10 17:32       ` Steve Ellcey
2007-04-10 17:41         ` Daniel Jacobowitz
2007-04-10 19:03       ` Eli Zaretskii
2007-04-10 20:22         ` Daniel Jacobowitz
2007-04-13 14:04           ` Daniel Jacobowitz
2007-04-13 17:07             ` [patch] "single step" atomic instruction sequences as a whole on PPC Luis Machado
2007-04-28 23:34               ` [RFC] " Luis Machado
2007-04-28 23:45                 ` Ulrich Weigand
2007-04-29  1:53                   ` Luis Machado

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox