This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
libiberty sync
- To: egcs-patches at egcs dot cygnus dot com
- Subject: libiberty sync
- From: Jeffrey A Law <law at upchuck dot cygnus dot com>
- Date: Wed, 07 Apr 1999 04:21:03 -0600
- Reply-To: law at cygnus dot com
Changes from official libiberty sources.
* Missing ChangeLog entries.
* Some java demangling stuff
* More cygwin32->cygwin related changes.
Index: ChangeLog
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/libiberty/ChangeLog,v
retrieving revision 1.93
diff -c -3 -p -r1.93 ChangeLog
*** ChangeLog 1999/04/05 14:28:55 1.93
--- ChangeLog 1999/04/07 10:29:34
***************
*** 31,36 ****
--- 31,43 ----
nothing. Don't bother with `strlen' sanity check; consume_count
does it for us.
+ 1999-03-16 Stan Shebs <shebs@andros.cygnus.com>
+
+ From Art Haas <ahaas@neosoft.com>:
+ * cplus-dem.c (demangle_prefix): Don't grab all the '__' strings
+ when doing arm or hp style.
+ (demangle_nested_args): Decr forgetting_types field when done.
+
Thu Mar 11 01:22:58 1999 Mumit Khan <khan@xraylith.wisc.edu>
* pexecute.c (__CYGWIN32__): Rename to
*************** Thu Mar 11 01:07:55 1999 Franz Sirl <Fr
*** 50,55 ****
--- 57,66 ----
* config.table: Cleanup and add mh-*pic handling for alpha, arm, powerpc
+ Sun Feb 28 22:30:44 1999 Geoffrey Noer <noer@cygnus.com>
+
+ * config.table: Check cygwin*, not cygwin32*.
+
Tue Feb 9 16:39:01 1999 Dave Brolley <brolley@cygnus.com>
* Makefile.in: Change mkstemp -> mkstemps.
*************** Wed Jan 13 14:16:36 1999 Kaveh R. Ghazi
*** 80,85 ****
--- 91,105 ----
* xstrdup.c (xstrdup): Switch from strcpy to memcpy for speed.
+ Tue Jan 5 15:58:29 1999 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
+
+ * Makefile.in (CFILES): fix typo, splay-tree.c instead of
+ splay-tree.o.
+
+ 1999-01-04 Jason Molenda (jsm@bugshack.cygnus.com)
+
+ * configure.in: Require autoconf 2.12.1 or higher.
+
1998-12-30 Michael Meissner <meissner@cygnus.com>
* random.c (NULL): Don't redefine NULL if it is already defined.
*************** Sun Dec 20 16:03:46 1998 Hans-Peter Nil
*** 118,130 ****
* Makefile.in (CFILES): Fix typo: splay-tree.c, not splay-tree.o
Fri Dec 18 16:11:43 EST 1998 Andrew MacLeod <amacleod@cygnus.com>
* cplus-dem.c (demangle_fund_type): Process CV and u codes before
bumping the pointer we read from. Also prepend these codes,
as we do in other places.
! Mon Dec 14 09:55:50 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* choose-temp.c: Don't check IN_GCC anymore.
--- 138,161 ----
* Makefile.in (CFILES): Fix typo: splay-tree.c, not splay-tree.o
+ Fri Dec 18 17:50:18 1998 David Taylor <taylor@texas.cygnus.com>
+
+ * cplus-dem.c (demangle_arm_pt): remove declaration -- function
+ doesn't exist.
+ (do_hpacc_template_literal): remove unused variable `i'.
+
Fri Dec 18 16:11:43 EST 1998 Andrew MacLeod <amacleod@cygnus.com>
* cplus-dem.c (demangle_fund_type): Process CV and u codes before
bumping the pointer we read from. Also prepend these codes,
as we do in other places.
+
+ 1998-12-18 Nick Clifton <nickc@cygnus.com>
! * cplus-dem.c (demangle_arm_hp_template): Make variable 'args' be
! 'const char *' in order to match its usage when calling siblings.
! (snarf_numeric_literal): Make first arg 'const char **' in order
! to match usage.
* choose-temp.c: Don't check IN_GCC anymore.
*************** Thu Nov 19 12:59:21 1998 Kaveh R. Ghazi
*** 228,233 ****
--- 259,274 ----
* pexecute.c: Include sys/wait.h when !IN_GCC.
+ Thu Nov 19 14:38:20 1998 Geoffrey Noer <noer@cygnus.com>
+
+ * pexecute.c: revert back to checking old Cygwin
+ preprocessor symbol until some time has passed.
+
+ Wed Nov 18 08:52:26 1998 Christopher Faylor <cgf@cygnus.com>
+
+ * pexecute.c: Reorganize WIN32 case to accomodate Cygwin
+ since it will now support similar constructs.
+
Fri Nov 13 19:18:05 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* configure.in: Check for calloc.
*************** Tue Aug 19 20:28:45 1997 Geoffrey Noer
*** 940,945 ****
--- 981,992 ----
Tue Aug 19 17:10:56 1997 Jason Merrill <jason@yorick.cygnus.com>
* cplus-dem.c: Add 'extern' to prepends_underscore.
+
+ Wed Jul 30 11:42:19 1997 Per Bothner <bothner@cygnus.com>
+
+ * cplus-dem.c: Various changes to produce Java output when passed
+ DMGL_JAVA. Thus "::" becomes "." and "JArray<Foo>" becomes "Foo[]".
+ (main): Support --java and -j flags to set DMGL_JAVA.
Tue Jul 22 19:05:23 1997 Robert Hoehne <robert.hoehne@Mathematik.TU-Chemnitz.DE>
Index: config.table
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/libiberty/config.table,v
retrieving revision 1.11
diff -c -3 -p -r1.11 config.table
*** config.table 1999/03/11 00:10:20 1.11
--- config.table 1999/04/07 10:29:34
*************** case "${enable_shared}" in
*** 18,24 ****
esac
if [ "${shared}" = "yes" ]; then
case "${host}" in
! *-*-cygwin32*) ;;
alpha*-*-linux*) frags="${frags} ../../config/mh-elfalphapic" ;;
arm*-*-*) frags="${frags} ../../config/mh-armpic" ;;
hppa*-*-*) frags="${frags} ../../config/mh-papic" ;;
--- 18,24 ----
esac
if [ "${shared}" = "yes" ]; then
case "${host}" in
! *-*-cygwin*) ;;
alpha*-*-linux*) frags="${frags} ../../config/mh-elfalphapic" ;;
arm*-*-*) frags="${frags} ../../config/mh-armpic" ;;
hppa*-*-*) frags="${frags} ../../config/mh-papic" ;;
Index: cplus-dem.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/libiberty/cplus-dem.c,v
retrieving revision 1.39
diff -c -3 -p -r1.39 cplus-dem.c
*** cplus-dem.c 1999/03/30 16:12:25 1.39
--- cplus-dem.c 1999/04/07 10:29:38
*************** typedef enum type_kind_t
*** 252,259 ****
#define LEN_STRING(str) ( (STRING_EMPTY(str))?0:((str)->p - (str)->b))
/* The scope separator appropriate for the language being demangled. */
- #define SCOPE_STRING(work) "::"
#define ARM_VTABLE_STRING "__vtbl__" /* Lucid/ARM virtual table prefix */
#define ARM_VTABLE_STRLEN 8 /* strlen (ARM_VTABLE_STRING) */
--- 252,260 ----
#define LEN_STRING(str) ( (STRING_EMPTY(str))?0:((str)->p - (str)->b))
/* The scope separator appropriate for the language being demangled. */
+ #define SCOPE_STRING(work) ((work->options & DMGL_JAVA) ? "." : "::")
+
#define ARM_VTABLE_STRING "__vtbl__" /* Lucid/ARM virtual table prefix */
#define ARM_VTABLE_STRLEN 8 /* strlen (ARM_VTABLE_STRING) */
*************** demangle_template (work, mangled, tname,
*** 1548,1553 ****
--- 1549,1555 ----
int need_comma = 0;
int success = 0;
const char *start;
+ int is_java_array = 0;
string temp;
int bindex = 0;
*************** demangle_template (work, mangled, tname,
*** 1591,1604 ****
|| (int) strlen (*mangled) < r)
{
return (0);
}
- string_appendn (tname, *mangled, r);
if (trawname)
string_appendn (trawname, *mangled, r);
*mangled += r;
}
}
! string_append (tname, "<");
/* get size of template parameter list */
if (!get_count (mangled, &r))
{
--- 1593,1612 ----
|| (int) strlen (*mangled) < r)
{
return (0);
+ }
+ is_java_array = (work -> options & DMGL_JAVA)
+ && strncmp (*mangled, "JArray1Z", 8) == 0;
+ if (! is_java_array)
+ {
+ string_appendn (tname, *mangled, r);
}
if (trawname)
string_appendn (trawname, *mangled, r);
*mangled += r;
}
}
! if (!is_java_array)
! string_append (tname, "<");
/* get size of template parameter list */
if (!get_count (mangled, &r))
{
*************** demangle_template (work, mangled, tname,
*** 1716,1726 ****
}
need_comma = 1;
}
{
! if (tname->p[-1] == '>')
! string_append (tname, " ");
! string_append (tname, ">");
}
if (is_type && remember)
remember_Btype (work, tname->b, LEN_STRING (tname), bindex);
--- 1724,1739 ----
}
need_comma = 1;
}
+ if (is_java_array)
{
! string_append (tname, "[]");
}
+ else
+ {
+ if (tname->p[-1] == '>')
+ string_append (tname, " ");
+ string_append (tname, ">");
+ }
if (is_type && remember)
remember_Btype (work, tname->b, LEN_STRING (tname), bindex);
*************** demangle_prefix (work, mangled, declp)
*** 2234,2246 ****
}
else
{
! const char *tmp;
! /* Look for the LAST occurrence of __, allowing names to have
! the '__' sequence embedded in them.*/
! while ((tmp = mystrstr (scan+2, "__")) != NULL)
! scan = tmp;
! if (*(scan + 2) == '\0')
! success = 0;
else
demangle_function_name (work, mangled, declp, scan);
}
--- 2247,2263 ----
}
else
{
! const char *tmp;
!
! /* Look for the LAST occurrence of __, allowing names to
! have the '__' sequence embedded in them. */
! if (!(ARM_DEMANGLING || HP_DEMANGLING))
! {
! while ((tmp = mystrstr (scan + 2, "__")) != NULL)
! scan = tmp;
! }
! if (*(scan + 2) == '\0')
! success = 0;
else
demangle_function_name (work, mangled, declp, scan);
}
*************** do_type (work, mangled, result)
*** 2873,2879 ****
case 'P':
case 'p':
(*mangled)++;
! string_prepend (&decl, "*");
if (tk == tk_none)
tk = tk_pointer;
break;
--- 2890,2897 ----
case 'P':
case 'p':
(*mangled)++;
! if (! (work -> options & DMGL_JAVA))
! string_prepend (&decl, "*");
if (tk == tk_none)
tk = tk_pointer;
break;
*************** demangle_nested_args (work, mangled, dec
*** 3889,3894 ****
--- 3907,3913 ----
if (work->previous_argument)
string_delete (work->previous_argument);
work->previous_argument = saved_previous_argument;
+ --work->forgetting_types;
work->nrepeats = saved_nrepeats;
return result;
*************** static struct option long_options[] = {
*** 4262,4267 ****
--- 4281,4287 ----
{"strip-underscores", no_argument, 0, '_'},
{"format", required_argument, 0, 's'},
{"help", no_argument, 0, 'h'},
+ {"java", no_argument, 0, 'j'},
{"no-strip-underscores", no_argument, 0, 'n'},
{"version", no_argument, 0, 'v'},
{0, no_argument, 0, 0}
*************** main (argc, argv)
*** 4305,4310 ****
--- 4325,4333 ----
exit (0);
case '_':
strip_underscore = 1;
+ break;
+ case 'j':
+ flags |= DMGL_JAVA;
break;
case 's':
if (strcmp (optarg, "gnu") == 0)