Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [patch/rfc] Obsolete i[3456]86-*-os9k target
@ 2002-07-14 10:35 Andrew Cagney
  2002-07-14 10:39 ` Daniel Jacobowitz
  0 siblings, 1 reply; 8+ messages in thread
From: Andrew Cagney @ 2002-07-14 10:35 UTC (permalink / raw)
  To: gdb-patches

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

Hello,

(this includes os9kread.c but didn't zap any of the os9k stuff in things 
like stabs read :-(  That got too messy.

This patch makes the os9k platform (i[3456]86-*-os9k) platform obsolete. 
  Failing objections, I'll commit it in a few days.

enjoy,
Andrew

[-- Attachment #2: diffs --]
[-- Type: text/plain, Size: 4904 bytes --]

2002-07-14  Andrew Cagney  <ac131313@redhat.com>

	* NEWS: Mention that the i[34]86-*-os9k has been made obsolete.
	* stabsread.c: Make os9k sections of the code obsolete.
	* configure.tgt: Make i[3456]86-*-os9k target obsolete.
	* config/i386/i386os9k.mt: Make file obsolete.
	* Makefile.in (ALLDEPFILES): Remove remote-os9k.c.
	(COMMON_OBS): Remove os9kread.o
	(SFILES): Remove os9kread.c.
	(os9kread.o, remote-os9k.o): Make target obsolete.
	* remote-os9k.c: Make file obsolete.
	* os9kread.c: Make file obsolete.
	* Makefile.in

Index: Makefile.in
===================================================================
RCS file: /cvs/src/src/gdb/Makefile.in,v
retrieving revision 1.219
diff -u -r1.219 Makefile.in
--- Makefile.in	12 Jul 2002 15:23:10 -0000	1.219
+++ Makefile.in	14 Jul 2002 17:01:39 -0000
@@ -544,7 +544,7 @@
 	scm-valprint.c source.c stabsread.c stack.c symfile.c \
 	symmisc.c symtab.c linespec.c target.c thread.c top.c tracepoint.c \
 	typeprint.c utils.c valarith.c valops.c valprint.c values.c \
-	serial.c ser-unix.c mdebugread.c os9kread.c \
+	serial.c ser-unix.c mdebugread.c \
 	tui/tui.c tui/tui.h tui/tuiCommand.c tui/tuiCommand.h \
 	tui/tuiData.c tui/tuiData.h tui/tuiDataWin.c tui/tuiDataWin.h \
 	tui/tuiDisassem.c tui/tuiDisassem.h tui/tuiGeneralWin.c \
@@ -743,7 +743,7 @@
 	scm-exp.o scm-lang.o scm-valprint.o complaints.o typeprint.o \
 	c-typeprint.o ch-typeprint.o f-typeprint.o m2-typeprint.o \
 	c-valprint.o cp-valprint.o ch-valprint.o f-valprint.o m2-valprint.o \
-	nlmread.o serial.o mdebugread.o os9kread.o top.o utils.o \
+	nlmread.o serial.o mdebugread.o top.o utils.o \
 	ui-file.o \
 	frame.o doublest.o \
 	gnu-v2-abi.o gnu-v3-abi.o hpacc-abi.o cp-abi.o
@@ -1238,7 +1238,7 @@
 	procfs.c \
 	remote-array.c remote-bug.c remote-e7000.c \
 	remote-es.c remote-hms.c remote-mips.c \
-	remote-nindy.c remote-os9k.c remote-rdp.c remote-sim.c \
+	remote-nindy.c remote-rdp.c remote-sim.c \
 	remote-st.c remote-utils.c dcache.c \
 	remote-vx.c \
 	rs6000-nat.c rs6000-tdep.c \
@@ -1797,14 +1797,14 @@
 
 mipsm3-nat.o: mipsm3-nat.c $(defs_h) $(inferior_h) $(regcache_h)
 
-# os9kread assumes that sizeof(char*) <= sizeof(int).  This looses on
-# 64 bit targets where often, sizeof(int)=4 but sizeof(char*)=9.
-os9kread.o: os9kread.c $(buildsym_h) $(complaints_h) $(bfd_h) $(defs_h) \
-	        $(expression_h) $(gdb_stabs_h) $(gdbcore_h) $(gdbtypes_h) \
-		$(language_h) $(objfiles_h) $(stabsread_h) $(symfile_h) \
-		$(symtab_h) $(target_h) $(gdb_string_h)
-	$(CC) -c $(INTERNAL_WARN_CFLAGS) $(NO_WERROR_CFLAGS) \
-		$(srcdir)/os9kread.c
+# OBSOLETE # os9kread assumes that sizeof(char*) <= sizeof(int).  This looses on
+# OBSOLETE # 64 bit targets where often, sizeof(int)=4 but sizeof(char*)=9.
+# OBSOLETE os9kread.o: os9kread.c $(buildsym_h) $(complaints_h) $(bfd_h) $(defs_h) \
+# OBSOLETE 	        $(expression_h) $(gdb_stabs_h) $(gdbcore_h) $(gdbtypes_h) \
+# OBSOLETE 		$(language_h) $(objfiles_h) $(stabsread_h) $(symfile_h) \
+# OBSOLETE 		$(symtab_h) $(target_h) $(gdb_string_h)
+# OBSOLETE 	$(CC) -c $(INTERNAL_WARN_CFLAGS) $(NO_WERROR_CFLAGS) \
+# OBSOLETE 		$(srcdir)/os9kread.c
 
 mem-break.o: mem-break.c $(defs_h) $(symtab_h) $(breakpoint_h) $(inferior_h) \
 	$(target_h)
@@ -2004,9 +2004,9 @@
 	nindy-share/env.h nindy-share/stop.h $(remote_utils_h) \
 	$(symfile_h) $(regcache_h)
 
-remote-os9k.o: remote-os9k.c $(defs_h) $(gdbcore_h) \
-	$(command_h) $(monitor_h) $(remote_utils_h) $(symtab_h) $(symfile_h) \
-	$(objfiles_h) $(gdb_stabs_h) $(gdb_string_h) $(regcache_h)
+# OBSOLETE remote-os9k.o: remote-os9k.c $(defs_h) $(gdbcore_h) \
+# OBSOLETE 	$(command_h) $(monitor_h) $(remote_utils_h) $(symtab_h) $(symfile_h) \
+# OBSOLETE 	$(objfiles_h) $(gdb_stabs_h) $(gdb_string_h) $(regcache_h)
 
 remote-sds.o: remote-sds.c $(bfd_h) $(defs_h) $(gdbcmd_h) \
 	$(inferior_h) $(remote_utils_h) $(symfile_h) $(terminal_h) \
Index: NEWS
===================================================================
RCS file: /cvs/src/src/gdb/NEWS,v
retrieving revision 1.77
diff -u -r1.77 NEWS
--- NEWS	14 Jul 2002 00:28:46 -0000	1.77
+++ NEWS	14 Jul 2002 17:03:00 -0000
@@ -61,6 +61,7 @@
 permanently REMOVED.
 
 Mitsubishi D30V					d30v-*-*
+OS/9000					i[34]86-*-os9k
 
 * REMOVED configurations and files
 
Index: configure.tgt
===================================================================
RCS file: /cvs/src/src/gdb/configure.tgt,v
retrieving revision 1.72
diff -u -r1.72 configure.tgt
--- configure.tgt	14 Jul 2002 00:15:19 -0000	1.72
+++ configure.tgt	14 Jul 2002 17:03:10 -0000
@@ -96,7 +96,7 @@
 i[3456]86-*-netbsdelf*)	gdb_target=nbsdelf ;;
 i[3456]86-*-netbsd* | i[3456]86-*-openbsd*)
 			gdb_target=nbsdaout ;;
-i[3456]86-*-os9k)	gdb_target=i386os9k ;;
+# OBSOLETE i[3456]86-*-os9k)	gdb_target=i386os9k ;;
 i[3456]86-*-go32*)	gdb_target=i386aout ;;
 i[3456]86-*-msdosdjgpp*) gdb_target=go32 ;;
 i[3456]86-*-lynxos*)	gdb_target=i386lynx ;;

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

* Re: [patch/rfc] Obsolete i[3456]86-*-os9k target
  2002-07-14 10:35 [patch/rfc] Obsolete i[3456]86-*-os9k target Andrew Cagney
@ 2002-07-14 10:39 ` Daniel Jacobowitz
  2002-07-14 20:53   ` Elena Zannoni
  0 siblings, 1 reply; 8+ messages in thread
From: Daniel Jacobowitz @ 2002-07-14 10:39 UTC (permalink / raw)
  To: gdb-patches

On Sun, Jul 14, 2002 at 01:11:23PM -0400, Andrew Cagney wrote:
> Hello,
> 
> (this includes os9kread.c but didn't zap any of the os9k stuff in things 
> like stabs read :-(  That got too messy.
> 
> This patch makes the os9k platform (i[3456]86-*-os9k) platform obsolete. 
>  Failing objections, I'll commit it in a few days.
> 
> enjoy,
> Andrew

Thank you, thank you thank you thank you.  One crufty reader down the
drain.

-- 
Daniel Jacobowitz                           Carnegie Mellon University
MontaVista Software                         Debian GNU/Linux Developer


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

* Re: [patch/rfc] Obsolete i[3456]86-*-os9k target
  2002-07-14 10:39 ` Daniel Jacobowitz
@ 2002-07-14 20:53   ` Elena Zannoni
  2002-07-16 10:19     ` Andrew Cagney
  0 siblings, 1 reply; 8+ messages in thread
From: Elena Zannoni @ 2002-07-14 20:53 UTC (permalink / raw)
  To: Daniel Jacobowitz; +Cc: gdb-patches

Daniel Jacobowitz writes:
 > On Sun, Jul 14, 2002 at 01:11:23PM -0400, Andrew Cagney wrote:
 > > Hello,
 > > 
 > > (this includes os9kread.c but didn't zap any of the os9k stuff in things 
 > > like stabs read :-(  That got too messy.
 > > 
 > > This patch makes the os9k platform (i[3456]86-*-os9k) platform obsolete. 
 > >  Failing objections, I'll commit it in a few days.
 > > 
 > > enjoy,
 > > Andrew
 > 
 > Thank you, thank you thank you thank you.  One crufty reader down the
 > drain.
 > 

Don't forget to flush... :-)
I'll take a look at the remaining bits.

Elena


 > -- 
 > Daniel Jacobowitz                           Carnegie Mellon University
 > MontaVista Software                         Debian GNU/Linux Developer


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

* Re: [patch/rfc] Obsolete i[3456]86-*-os9k target
  2002-07-14 20:53   ` Elena Zannoni
@ 2002-07-16 10:19     ` Andrew Cagney
  2002-07-16 13:41       ` Elena Zannoni
  0 siblings, 1 reply; 8+ messages in thread
From: Andrew Cagney @ 2002-07-16 10:19 UTC (permalink / raw)
  To: Elena Zannoni; +Cc: Daniel Jacobowitz, gdb-patches

> Daniel Jacobowitz writes:
>  > On Sun, Jul 14, 2002 at 01:11:23PM -0400, Andrew Cagney wrote:
>  > > Hello,
>  > > 
>  > > (this includes os9kread.c but didn't zap any of the os9k stuff in things 
>  > > like stabs read :-(  That got too messy.
>  > > 
>  > > This patch makes the os9k platform (i[3456]86-*-os9k) platform obsolete. 
>  > >  Failing objections, I'll commit it in a few days.
>  > > 
>  > > enjoy,
>  > > Andrew
>  > 
>  > Thank you, thank you thank you thank you.  One crufty reader down the
>  > drain.
>  > 
> 
> Don't forget to flush... :-)

Done.  Hmm, looks like ...

> I'll take a look at the remaining bits.

... a brush is needed.

I started changing:

	if (os8k_stabs)
	  <then>
	else
	  <else>

into:

	/* OBSOLETE if (os8k_stabs) */
	/* OBSOLETE  <then> */
	/* OBSOLETE else */
	<else>

but gave up.  Some of those if() clauses got pretty weired.  Not sure 
what the reader maintainers want to do.

enjoy,
Andrew



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

* Re: [patch/rfc] Obsolete i[3456]86-*-os9k target
  2002-07-16 13:41       ` Elena Zannoni
@ 2002-07-16 13:41         ` Andrew Cagney
  2002-07-16 13:42           ` Elena Zannoni
  0 siblings, 1 reply; 8+ messages in thread
From: Andrew Cagney @ 2002-07-16 13:41 UTC (permalink / raw)
  To: Elena Zannoni; +Cc: Daniel Jacobowitz, gdb-patches

>  > I started changing:
>  > 
>  > 	if (os8k_stabs)
>  > 	  <then>
>  > 	else
>  > 	  <else>
>  > 
>  > into:
>  > 
>  > 	/* OBSOLETE if (os8k_stabs) */
>  > 	/* OBSOLETE  <then> */
>  > 	/* OBSOLETE else */
>  > 	<else>
>  > 
>  > but gave up.  Some of those if() clauses got pretty weired.  Not sure 
>  > what the reader maintainers want to do.
> 
> I'll try to come up a patch that to 'if 0' those bits. I think that
> the indentation and extra curly braces can be fixed later, once we
> pull the code out for good. We definitely need to deactivate these parts,
> otherwise os9k_stabs would be undefined.

Hmm, another way of disabling it it might be:

	if (os9k_stabs) /* OBSOLETE */
	...

The reason behind adding the word OBSOLETE is that it makes searching 
easier - just grep out any line with OBSOLETE in it.

Andrew



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

* Re: [patch/rfc] Obsolete i[3456]86-*-os9k target
  2002-07-16 10:19     ` Andrew Cagney
@ 2002-07-16 13:41       ` Elena Zannoni
  2002-07-16 13:41         ` Andrew Cagney
  0 siblings, 1 reply; 8+ messages in thread
From: Elena Zannoni @ 2002-07-16 13:41 UTC (permalink / raw)
  To: Andrew Cagney; +Cc: Elena Zannoni, Daniel Jacobowitz, gdb-patches

Andrew Cagney writes:
 > > Daniel Jacobowitz writes:
 > >  > On Sun, Jul 14, 2002 at 01:11:23PM -0400, Andrew Cagney wrote:
 > >  > > Hello,
 > >  > > 
 > >  > > (this includes os9kread.c but didn't zap any of the os9k stuff in things 
 > >  > > like stabs read :-(  That got too messy.
 > >  > > 
 > >  > > This patch makes the os9k platform (i[3456]86-*-os9k) platform obsolete. 
 > >  > >  Failing objections, I'll commit it in a few days.
 > >  > > 
 > >  > > enjoy,
 > >  > > Andrew
 > >  > 
 > >  > Thank you, thank you thank you thank you.  One crufty reader down the
 > >  > drain.
 > >  > 
 > > 
 > > Don't forget to flush... :-)
 > 
 > Done.  Hmm, looks like ...
 > 
 > > I'll take a look at the remaining bits.
 > 
 > ... a brush is needed.
 > 
 > I started changing:
 > 
 > 	if (os8k_stabs)
 > 	  <then>
 > 	else
 > 	  <else>
 > 
 > into:
 > 
 > 	/* OBSOLETE if (os8k_stabs) */
 > 	/* OBSOLETE  <then> */
 > 	/* OBSOLETE else */
 > 	<else>
 > 
 > but gave up.  Some of those if() clauses got pretty weired.  Not sure 
 > what the reader maintainers want to do.

I'll try to come up a patch that to 'if 0' those bits. I think that
the indentation and extra curly braces can be fixed later, once we
pull the code out for good. We definitely need to deactivate these parts,
otherwise os9k_stabs would be undefined.

Elena


 > 
 > enjoy,
 > Andrew
 > 


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

* Re: [patch/rfc] Obsolete i[3456]86-*-os9k target
  2002-07-16 13:41         ` Andrew Cagney
@ 2002-07-16 13:42           ` Elena Zannoni
  2002-07-18 10:55             ` Elena Zannoni
  0 siblings, 1 reply; 8+ messages in thread
From: Elena Zannoni @ 2002-07-16 13:42 UTC (permalink / raw)
  To: Andrew Cagney; +Cc: Elena Zannoni, Daniel Jacobowitz, gdb-patches

Andrew Cagney writes:
 > >  > I started changing:
 > >  > 
 > >  > 	if (os8k_stabs)
 > >  > 	  <then>
 > >  > 	else
 > >  > 	  <else>
 > >  > 
 > >  > into:
 > >  > 
 > >  > 	/* OBSOLETE if (os8k_stabs) */
 > >  > 	/* OBSOLETE  <then> */
 > >  > 	/* OBSOLETE else */
 > >  > 	<else>
 > >  > 
 > >  > but gave up.  Some of those if() clauses got pretty weired.  Not sure 
 > >  > what the reader maintainers want to do.
 > > 
 > > I'll try to come up a patch that to 'if 0' those bits. I think that
 > > the indentation and extra curly braces can be fixed later, once we
 > > pull the code out for good. We definitely need to deactivate these parts,
 > > otherwise os9k_stabs would be undefined.
 > 
 > Hmm, another way of disabling it it might be:
 > 
 > 	if (os9k_stabs) /* OBSOLETE */
 > 	...
 > 
 > The reason behind adding the word OBSOLETE is that it makes searching 
 > easier - just grep out any line with OBSOLETE in it.
 > 
 > Andrew
 > 


Well, how about refining on the following patch, I think it should be
pretty easy from this starting point.

Elena

Index: stabsread.c
===================================================================
RCS file: /cvs/uberbaum/gdb/stabsread.c,v
retrieving revision 1.35
diff -u -p -r1.35 stabsread.c
--- stabsread.c	14 Jun 2002 14:34:25 -0000	1.35
+++ stabsread.c	16 Jul 2002 19:28:53 -0000
@@ -256,6 +256,7 @@ static struct symbol *current_symbol = N
       *(pp) = next_symbol_text (objfile);	\
   } while (0)
 \f
+#if 0 /* OBSOLETE OS9K */
 /* FIXME: These probably should be our own types (like rs6000_builtin_type
    has its own types) rather than builtin_type_*.  */
 static struct type **os9k_type_vector[] =
@@ -284,6 +285,7 @@ os9k_init_type_vector (struct type **tv)
   for (i = 0; i < sizeof (os9k_type_vector) / sizeof (struct type **); i++)
     tv[i] = (os9k_type_vector[i] == 0 ? 0 : *(os9k_type_vector[i]));
 }
+#endif /* OBSOLETE OS9K */
 
 /* Look up a dbx type-number pair.  Return the address of the slot
    where the type for that number-pair is stored.
@@ -351,9 +353,11 @@ Invalid symbol data: type number (%d,%d)
 	  memset (&type_vector[old_len], 0,
 		  (type_vector_length - old_len) * sizeof (struct type *));
 
+#if 0 /* OBSOLETE OS9K */
 	  if (os9k_stabs)
 	    /* Deal with OS9000 fundamental types.  */
 	    os9k_init_type_vector (type_vector);
+#endif /* OBSOLETE OS9K */
 	}
       return (&type_vector[index]);
     }
@@ -2052,9 +2056,11 @@ define_symbol (CORE_ADDR valu, char *str
 	}
 #endif
       SYMBOL_NAMESPACE (sym) = VAR_NAMESPACE;
+#if 0 /* OBSOLETE OS9K */
       if (os9k_stabs)
 	add_symbol_to_list (sym, &global_symbols);
       else
+#endif /* OBSOLETE OS9K */
 	add_symbol_to_list (sym, &local_symbols);
       break;
 
@@ -2589,6 +2595,7 @@ again:
       break;
 
     case 'f':			/* Function returning another type */
+#if 0 /* OBSOLETE OS9K */
       if (os9k_stabs && **pp == '(')
 	{
 	  /* Function prototype; parse it.
@@ -2604,6 +2611,8 @@ again:
 		++ * pp;
 	    }
 	}
+#endif /* OBSOLETE OS9K */
+
       type1 = read_type (pp, objfile);
       type = make_function_type (type1, dbx_lookup_type (typenums));
       break;
@@ -2684,22 +2693,36 @@ again:
       }
 
     case 'k':			/* Const qualifier on some type (Sun) */
+#if 0 /* OBSOLETE OS9K */
+      /* ezannoni 2002-07-16: This can be safely deleted, because 'c'
+	 means complex type in AIX stabs, while it means const qualifier
+	 in os9k stabs.  Obviously we were supporting only the os9k meaning.
+	 We were erroring out if we were reading AIX stabs.  Right now the
+	 erroring out will happen in the default clause of the switch.  */
     case 'c':			/* Const qualifier on some type (OS9000) */
       /* Because 'c' means other things to AIX and 'k' is perfectly good,
          only accept 'c' in the os9k_stabs case.  */
       if (type_descriptor == 'c' && !os9k_stabs)
 	return error_type (pp, objfile);
+#endif /* OBSOLETE OS9K */
       type = read_type (pp, objfile);
       type = make_cv_type (1, TYPE_VOLATILE (type), type,
 			   dbx_lookup_type (typenums));
       break;
 
     case 'B':			/* Volatile qual on some type (Sun) */
+#if 0 /* OBSOLETE OS9K */
+      /* ezannoni 2002-07-16: This can be safely deleted, because 'i'
+	 means imported type in AIX stabs, while it means volatile qualifier
+	 in os9k stabs.  Obviously we were supporting only the os9k meaning.
+	 We were erroring out if we were reading AIX stabs.  Right now the
+	 erroring out will happen in the default clause of the switch.  */
     case 'i':			/* Volatile qual on some type (OS9000) */
       /* Because 'i' means other things to AIX and 'B' is perfectly good,
          only accept 'i' in the os9k_stabs case.  */
       if (type_descriptor == 'i' && !os9k_stabs)
 	return error_type (pp, objfile);
+#endif /* OBSOLETE OS9K */
       type = read_type (pp, objfile);
       type = make_cv_type (TYPE_CONST (type), 1, type,
 			   dbx_lookup_type (typenums));
@@ -2804,10 +2827,12 @@ again:
       break;
 
     case 'b':
+#if 0 /* OBSOLETE OS9K */
       if (os9k_stabs)
 	/* Const and volatile qualified type.  */
 	type = read_type (pp, objfile);
       else
+#endif /* OBSOLETE OS9K */
 	{
 	  /* Sun ACC builtin int type */
 	  type = read_sun_builtin_type (pp, typenums, objfile);
@@ -3666,8 +3691,10 @@ read_struct_fields (struct field_info *f
 
   while (**pp != ';' && **pp != '\0')
     {
+#if 0 /* OBSOLETE OS9K */
       if (os9k_stabs && **pp == ',')
 	break;
+#endif /* OBSOLETE OS9K */
       STABS_CONTINUE (pp, objfile);
       /* Get space to record the next field's data.  */
       new = (struct nextfield *) xmalloc (sizeof (struct nextfield));
@@ -4329,9 +4356,11 @@ read_array_type (register char **pp, reg
      Fortran adjustable arrays use Adigits or Tdigits for lower or upper;
      for these, produce a type like float[][].  */
 
+#if 0 /* OBSOLETE OS9K */
   if (os9k_stabs)
     index_type = builtin_type_int;
   else
+#endif /* OBSOLETE OS9K */
     {
       index_type = read_type (pp, objfile);
       if (**pp != ';')
@@ -4345,7 +4374,12 @@ read_array_type (register char **pp, reg
       (*pp)++;
       adjustable = 1;
     }
+#if 0 /* OBSOLETE OS9K */
   lower = read_huge_number (pp, os9k_stabs ? ',' : ';', &nbits);
+#else /* OBSOLETE OS9K */
+  lower = read_huge_number (pp, ';', &nbits);
+#endif /* OBSOLETE OS9K */
+
   if (nbits != 0)
     return error_type (pp, objfile);
 
@@ -4405,6 +4439,7 @@ read_enum_type (register char **pp, regi
   osyms = *symlist;
   o_nsyms = osyms ? osyms->nsyms : 0;
 
+#if 0 /* OBSOLETE OS9K */
   if (os9k_stabs)
     {
       /* Size.  Perhaps this does not have to be conditionalized on
@@ -4414,6 +4449,7 @@ read_enum_type (register char **pp, regi
       if (nbits != 0)
 	return error_type (pp, objfile);
     }
+#endif /* OBSOLETE OS9K */
 
   /* The aix4 compiler emits an extra field before the enum members;
      my guess is it's a type of some sort.  Just ignore it.  */
@@ -4652,9 +4688,11 @@ read_huge_number (char **pp, int end, in
       p++;
     }
 
+#if 0 /* OBSOLETE OS9K */
   if (os9k_stabs)
     upper_limit = ULONG_MAX / radix;
   else
+#endif /* OBSOLETE OS9K */
     upper_limit = LONG_MAX / radix;
 
   while ((c = *p++) >= '0' && c < ('0' + radix))
@@ -5366,7 +5404,9 @@ start_stabs (void)
   /* FIXME: If common_block_name is not already NULL, we should complain().  */
   common_block_name = NULL;
 
+#if 0 /* OBSOLETE OS9K */
   os9k_stabs = 0;
+#endif /* OBSOLETE OS9K */
 }
 
 /* Call after end_symtab() */


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

* Re: [patch/rfc] Obsolete i[3456]86-*-os9k target
  2002-07-16 13:42           ` Elena Zannoni
@ 2002-07-18 10:55             ` Elena Zannoni
  0 siblings, 0 replies; 8+ messages in thread
From: Elena Zannoni @ 2002-07-18 10:55 UTC (permalink / raw)
  To: gdb-patches; +Cc: Andrew Cagney


I committed this (with OBSOLETE added to each line as well).

Elena


Elena Zannoni writes:
 > Andrew Cagney writes:
 >  > >  > I started changing:
 >  > >  > 
 >  > >  > 	if (os8k_stabs)
 >  > >  > 	  <then>
 >  > >  > 	else
 >  > >  > 	  <else>
 >  > >  > 
 >  > >  > into:
 >  > >  > 
 >  > >  > 	/* OBSOLETE if (os8k_stabs) */
 >  > >  > 	/* OBSOLETE  <then> */
 >  > >  > 	/* OBSOLETE else */
 >  > >  > 	<else>
 >  > >  > 
 >  > >  > but gave up.  Some of those if() clauses got pretty weired.  Not sure 
 >  > >  > what the reader maintainers want to do.
 >  > > 
 >  > > I'll try to come up a patch that to 'if 0' those bits. I think that
 >  > > the indentation and extra curly braces can be fixed later, once we
 >  > > pull the code out for good. We definitely need to deactivate these parts,
 >  > > otherwise os9k_stabs would be undefined.
 >  > 
 >  > Hmm, another way of disabling it it might be:
 >  > 
 >  > 	if (os9k_stabs) /* OBSOLETE */
 >  > 	...
 >  > 
 >  > The reason behind adding the word OBSOLETE is that it makes searching 
 >  > easier - just grep out any line with OBSOLETE in it.
 >  > 
 >  > Andrew
 >  > 
 > 
 > 
 > Well, how about refining on the following patch, I think it should be
 > pretty easy from this starting point.
 > 
 > Elena
 > 
 > Index: stabsread.c
 > ===================================================================
 > RCS file: /cvs/uberbaum/gdb/stabsread.c,v
 > retrieving revision 1.35
 > diff -u -p -r1.35 stabsread.c
 > --- stabsread.c	14 Jun 2002 14:34:25 -0000	1.35
 > +++ stabsread.c	16 Jul 2002 19:28:53 -0000
 > @@ -256,6 +256,7 @@ static struct symbol *current_symbol = N
 >        *(pp) = next_symbol_text (objfile);	\
 >    } while (0)
 >  \f
 > +#if 0 /* OBSOLETE OS9K */
 >  /* FIXME: These probably should be our own types (like rs6000_builtin_type
 >     has its own types) rather than builtin_type_*.  */
 >  static struct type **os9k_type_vector[] =
 > @@ -284,6 +285,7 @@ os9k_init_type_vector (struct type **tv)
 >    for (i = 0; i < sizeof (os9k_type_vector) / sizeof (struct type **); i++)
 >      tv[i] = (os9k_type_vector[i] == 0 ? 0 : *(os9k_type_vector[i]));
 >  }
 > +#endif /* OBSOLETE OS9K */
 >  
 >  /* Look up a dbx type-number pair.  Return the address of the slot
 >     where the type for that number-pair is stored.
 > @@ -351,9 +353,11 @@ Invalid symbol data: type number (%d,%d)
 >  	  memset (&type_vector[old_len], 0,
 >  		  (type_vector_length - old_len) * sizeof (struct type *));
 >  
 > +#if 0 /* OBSOLETE OS9K */
 >  	  if (os9k_stabs)
 >  	    /* Deal with OS9000 fundamental types.  */
 >  	    os9k_init_type_vector (type_vector);
 > +#endif /* OBSOLETE OS9K */
 >  	}
 >        return (&type_vector[index]);
 >      }
 > @@ -2052,9 +2056,11 @@ define_symbol (CORE_ADDR valu, char *str
 >  	}
 >  #endif
 >        SYMBOL_NAMESPACE (sym) = VAR_NAMESPACE;
 > +#if 0 /* OBSOLETE OS9K */
 >        if (os9k_stabs)
 >  	add_symbol_to_list (sym, &global_symbols);
 >        else
 > +#endif /* OBSOLETE OS9K */
 >  	add_symbol_to_list (sym, &local_symbols);
 >        break;
 >  
 > @@ -2589,6 +2595,7 @@ again:
 >        break;
 >  
 >      case 'f':			/* Function returning another type */
 > +#if 0 /* OBSOLETE OS9K */
 >        if (os9k_stabs && **pp == '(')
 >  	{
 >  	  /* Function prototype; parse it.
 > @@ -2604,6 +2611,8 @@ again:
 >  		++ * pp;
 >  	    }
 >  	}
 > +#endif /* OBSOLETE OS9K */
 > +
 >        type1 = read_type (pp, objfile);
 >        type = make_function_type (type1, dbx_lookup_type (typenums));
 >        break;
 > @@ -2684,22 +2693,36 @@ again:
 >        }
 >  
 >      case 'k':			/* Const qualifier on some type (Sun) */
 > +#if 0 /* OBSOLETE OS9K */
 > +      /* ezannoni 2002-07-16: This can be safely deleted, because 'c'
 > +	 means complex type in AIX stabs, while it means const qualifier
 > +	 in os9k stabs.  Obviously we were supporting only the os9k meaning.
 > +	 We were erroring out if we were reading AIX stabs.  Right now the
 > +	 erroring out will happen in the default clause of the switch.  */
 >      case 'c':			/* Const qualifier on some type (OS9000) */
 >        /* Because 'c' means other things to AIX and 'k' is perfectly good,
 >           only accept 'c' in the os9k_stabs case.  */
 >        if (type_descriptor == 'c' && !os9k_stabs)
 >  	return error_type (pp, objfile);
 > +#endif /* OBSOLETE OS9K */
 >        type = read_type (pp, objfile);
 >        type = make_cv_type (1, TYPE_VOLATILE (type), type,
 >  			   dbx_lookup_type (typenums));
 >        break;
 >  
 >      case 'B':			/* Volatile qual on some type (Sun) */
 > +#if 0 /* OBSOLETE OS9K */
 > +      /* ezannoni 2002-07-16: This can be safely deleted, because 'i'
 > +	 means imported type in AIX stabs, while it means volatile qualifier
 > +	 in os9k stabs.  Obviously we were supporting only the os9k meaning.
 > +	 We were erroring out if we were reading AIX stabs.  Right now the
 > +	 erroring out will happen in the default clause of the switch.  */
 >      case 'i':			/* Volatile qual on some type (OS9000) */
 >        /* Because 'i' means other things to AIX and 'B' is perfectly good,
 >           only accept 'i' in the os9k_stabs case.  */
 >        if (type_descriptor == 'i' && !os9k_stabs)
 >  	return error_type (pp, objfile);
 > +#endif /* OBSOLETE OS9K */
 >        type = read_type (pp, objfile);
 >        type = make_cv_type (TYPE_CONST (type), 1, type,
 >  			   dbx_lookup_type (typenums));
 > @@ -2804,10 +2827,12 @@ again:
 >        break;
 >  
 >      case 'b':
 > +#if 0 /* OBSOLETE OS9K */
 >        if (os9k_stabs)
 >  	/* Const and volatile qualified type.  */
 >  	type = read_type (pp, objfile);
 >        else
 > +#endif /* OBSOLETE OS9K */
 >  	{
 >  	  /* Sun ACC builtin int type */
 >  	  type = read_sun_builtin_type (pp, typenums, objfile);
 > @@ -3666,8 +3691,10 @@ read_struct_fields (struct field_info *f
 >  
 >    while (**pp != ';' && **pp != '\0')
 >      {
 > +#if 0 /* OBSOLETE OS9K */
 >        if (os9k_stabs && **pp == ',')
 >  	break;
 > +#endif /* OBSOLETE OS9K */
 >        STABS_CONTINUE (pp, objfile);
 >        /* Get space to record the next field's data.  */
 >        new = (struct nextfield *) xmalloc (sizeof (struct nextfield));
 > @@ -4329,9 +4356,11 @@ read_array_type (register char **pp, reg
 >       Fortran adjustable arrays use Adigits or Tdigits for lower or upper;
 >       for these, produce a type like float[][].  */
 >  
 > +#if 0 /* OBSOLETE OS9K */
 >    if (os9k_stabs)
 >      index_type = builtin_type_int;
 >    else
 > +#endif /* OBSOLETE OS9K */
 >      {
 >        index_type = read_type (pp, objfile);
 >        if (**pp != ';')
 > @@ -4345,7 +4374,12 @@ read_array_type (register char **pp, reg
 >        (*pp)++;
 >        adjustable = 1;
 >      }
 > +#if 0 /* OBSOLETE OS9K */
 >    lower = read_huge_number (pp, os9k_stabs ? ',' : ';', &nbits);
 > +#else /* OBSOLETE OS9K */
 > +  lower = read_huge_number (pp, ';', &nbits);
 > +#endif /* OBSOLETE OS9K */
 > +
 >    if (nbits != 0)
 >      return error_type (pp, objfile);
 >  
 > @@ -4405,6 +4439,7 @@ read_enum_type (register char **pp, regi
 >    osyms = *symlist;
 >    o_nsyms = osyms ? osyms->nsyms : 0;
 >  
 > +#if 0 /* OBSOLETE OS9K */
 >    if (os9k_stabs)
 >      {
 >        /* Size.  Perhaps this does not have to be conditionalized on
 > @@ -4414,6 +4449,7 @@ read_enum_type (register char **pp, regi
 >        if (nbits != 0)
 >  	return error_type (pp, objfile);
 >      }
 > +#endif /* OBSOLETE OS9K */
 >  
 >    /* The aix4 compiler emits an extra field before the enum members;
 >       my guess is it's a type of some sort.  Just ignore it.  */
 > @@ -4652,9 +4688,11 @@ read_huge_number (char **pp, int end, in
 >        p++;
 >      }
 >  
 > +#if 0 /* OBSOLETE OS9K */
 >    if (os9k_stabs)
 >      upper_limit = ULONG_MAX / radix;
 >    else
 > +#endif /* OBSOLETE OS9K */
 >      upper_limit = LONG_MAX / radix;
 >  
 >    while ((c = *p++) >= '0' && c < ('0' + radix))
 > @@ -5366,7 +5404,9 @@ start_stabs (void)
 >    /* FIXME: If common_block_name is not already NULL, we should complain().  */
 >    common_block_name = NULL;
 >  
 > +#if 0 /* OBSOLETE OS9K */
 >    os9k_stabs = 0;
 > +#endif /* OBSOLETE OS9K */
 >  }
 >  
 >  /* Call after end_symtab() */


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

end of thread, other threads:[~2002-07-18 17:24 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-07-14 10:35 [patch/rfc] Obsolete i[3456]86-*-os9k target Andrew Cagney
2002-07-14 10:39 ` Daniel Jacobowitz
2002-07-14 20:53   ` Elena Zannoni
2002-07-16 10:19     ` Andrew Cagney
2002-07-16 13:41       ` Elena Zannoni
2002-07-16 13:41         ` Andrew Cagney
2002-07-16 13:42           ` Elena Zannoni
2002-07-18 10:55             ` Elena Zannoni

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