Changes from official libiberty sources.

* Missing ChangeLog entries.
	* Some java demangling stuff
	* More cygwin32->cygwin related changes.

From-SVN: r26236
This commit is contained in:
Jeff Law 1999-04-06 21:31:24 -06:00
parent 8df1d91ab8
commit 3510075c6d
3 changed files with 86 additions and 16 deletions

View File

@ -31,6 +31,13 @@
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
@ -50,6 +57,10 @@ Thu Mar 11 01:07:55 1999 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
* 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.
@ -80,6 +91,15 @@ Wed Jan 13 14:16:36 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* 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.
@ -118,13 +138,24 @@ Sun Dec 20 16:03:46 1998 Hans-Peter Nilsson <hp@axis.se>
* 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.
Mon Dec 14 09:55:50 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
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.
@ -228,6 +259,16 @@ Thu Nov 19 12:59:21 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* 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.
@ -941,6 +982,12 @@ 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>
* config/mh-go32 (CC, AR, RANLIB): Don't define.

View File

@ -18,7 +18,7 @@ case "${enable_shared}" in
esac
if [ "${shared}" = "yes" ]; then
case "${host}" in
*-*-cygwin32*) ;;
*-*-cygwin*) ;;
alpha*-*-linux*) frags="${frags} ../../config/mh-elfalphapic" ;;
arm*-*-*) frags="${frags} ../../config/mh-armpic" ;;
hppa*-*-*) frags="${frags} ../../config/mh-papic" ;;

View File

@ -252,7 +252,8 @@ typedef enum type_kind_t
#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 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) */
@ -1548,6 +1549,7 @@ demangle_template (work, mangled, tname, trawname, is_type, remember)
int need_comma = 0;
int success = 0;
const char *start;
int is_java_array = 0;
string temp;
int bindex = 0;
@ -1592,13 +1594,19 @@ demangle_template (work, mangled, tname, trawname, is_type, remember)
{
return (0);
}
string_appendn (tname, *mangled, r);
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;
}
}
string_append (tname, "<");
if (!is_java_array)
string_append (tname, "<");
/* get size of template parameter list */
if (!get_count (mangled, &r))
{
@ -1716,10 +1724,15 @@ demangle_template (work, mangled, tname, trawname, is_type, remember)
}
need_comma = 1;
}
if (is_java_array)
{
if (tname->p[-1] == '>')
string_append (tname, " ");
string_append (tname, ">");
string_append (tname, "[]");
}
else
{
if (tname->p[-1] == '>')
string_append (tname, " ");
string_append (tname, ">");
}
if (is_type && remember)
@ -2234,13 +2247,17 @@ demangle_prefix (work, mangled, declp)
}
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;
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);
}
@ -2873,7 +2890,8 @@ do_type (work, mangled, result)
case 'P':
case 'p':
(*mangled)++;
string_prepend (&decl, "*");
if (! (work -> options & DMGL_JAVA))
string_prepend (&decl, "*");
if (tk == tk_none)
tk = tk_pointer;
break;
@ -3889,6 +3907,7 @@ demangle_nested_args (work, mangled, declp)
if (work->previous_argument)
string_delete (work->previous_argument);
work->previous_argument = saved_previous_argument;
--work->forgetting_types;
work->nrepeats = saved_nrepeats;
return result;
@ -4262,6 +4281,7 @@ static struct option long_options[] = {
{"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}
@ -4306,6 +4326,9 @@ main (argc, argv)
case '_':
strip_underscore = 1;
break;
case 'j':
flags |= DMGL_JAVA;
break;
case 's':
if (strcmp (optarg, "gnu") == 0)
{