* utils.c: Use CPLUS_MARKER not '$'.
* cplus-dem.c: Use CPLUS_MARKER not '$'. If CPLUS_MARKER isn't defined, define it to '$'.
This commit is contained in:
parent
9ba8a5a46b
commit
f88e7af831
3 changed files with 18 additions and 5 deletions
|
@ -1,5 +1,10 @@
|
||||||
Fri Apr 19 09:36:50 1991 Jim Kingdon (kingdon at cygint.cygnus.com)
|
Fri Apr 19 09:36:50 1991 Jim Kingdon (kingdon at cygint.cygnus.com)
|
||||||
|
|
||||||
|
* utils.c: Use CPLUS_MARKER not '$'.
|
||||||
|
|
||||||
|
* cplus-dem.c: Use CPLUS_MARKER not '$'. If CPLUS_MARKER isn't
|
||||||
|
defined, define it to '$'.
|
||||||
|
|
||||||
* arm-opcode.h: New file (same contents as before; it had
|
* arm-opcode.h: New file (same contents as before; it had
|
||||||
just been left out of the distribution for a long time).
|
just been left out of the distribution for a long time).
|
||||||
|
|
||||||
|
|
|
@ -52,6 +52,13 @@
|
||||||
/* define this if names don't start with _ */
|
/* define this if names don't start with _ */
|
||||||
/* #define nounderscore 1 */
|
/* #define nounderscore 1 */
|
||||||
|
|
||||||
|
/* This is '$' on systems where the assembler can deal with that.
|
||||||
|
Where the assembler can't, it's '.' (but on many systems '.' is
|
||||||
|
used for other things). */
|
||||||
|
#if !defined (CPLUS_MARKER)
|
||||||
|
#define CPLUS_MARKER '$'
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
|
|
||||||
|
@ -212,7 +219,7 @@ cplus_demangle (type, arg_mode)
|
||||||
if (*p == '\0')
|
if (*p == '\0')
|
||||||
{
|
{
|
||||||
/* destructor */
|
/* destructor */
|
||||||
if (type[0] == '_' && type[1] == '$' && type[2] == '_')
|
if (type[0] == '_' && type[1] == CPLUS_MARKER && type[2] == '_')
|
||||||
{
|
{
|
||||||
int n = (strlen (type) - 3)*2 + 3 + 2 + 1;
|
int n = (strlen (type) - 3)*2 + 3 + 2 + 1;
|
||||||
char *tem = (char *) xmalloc (n);
|
char *tem = (char *) xmalloc (n);
|
||||||
|
@ -223,7 +230,7 @@ cplus_demangle (type, arg_mode)
|
||||||
return tem;
|
return tem;
|
||||||
}
|
}
|
||||||
/* static data member */
|
/* static data member */
|
||||||
if (*type != '_' && (p = strchr (type, '$')) != NULL)
|
if (*type != '_' && (p = strchr (type, CPLUS_MARKER)) != NULL)
|
||||||
{
|
{
|
||||||
int n = strlen (type) + 2;
|
int n = strlen (type) + 2;
|
||||||
char *tem = (char *) xmalloc (n);
|
char *tem = (char *) xmalloc (n);
|
||||||
|
@ -233,7 +240,7 @@ cplus_demangle (type, arg_mode)
|
||||||
return tem;
|
return tem;
|
||||||
}
|
}
|
||||||
/* virtual table "_vt$" */
|
/* virtual table "_vt$" */
|
||||||
if (type[0] == '_' && type[1] == 'v' && type[2] == 't' && type[3] == '$')
|
if (type[0] == '_' && type[1] == 'v' && type[2] == 't' && type[3] == CPLUS_MARKER)
|
||||||
{
|
{
|
||||||
int n = strlen (type + 4) + 14 + 1;
|
int n = strlen (type + 4) + 14 + 1;
|
||||||
char *tem = (char *) xmalloc (n);
|
char *tem = (char *) xmalloc (n);
|
||||||
|
@ -810,7 +817,7 @@ munge_function_name (name, arg_mode)
|
||||||
int arg_mode;
|
int arg_mode;
|
||||||
{
|
{
|
||||||
if (!string_empty (name) && name->p - name->b >= 3
|
if (!string_empty (name) && name->p - name->b >= 3
|
||||||
&& name->b[0] == 'o' && name->b[1] == 'p' && name->b[2] == '$')
|
&& name->b[0] == 'o' && name->b[1] == 'p' && name->b[2] == CPLUS_MARKER)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
/* see if it's an assignment expression */
|
/* see if it's an assignment expression */
|
||||||
|
|
|
@ -894,7 +894,8 @@ fputs_demangled (linebuffer, stream, arg_mode)
|
||||||
#endif
|
#endif
|
||||||
#define SYMBOL_MAX 1024
|
#define SYMBOL_MAX 1024
|
||||||
|
|
||||||
#define SYMBOL_CHAR(c) (isascii(c) && (isalnum(c) || (c) == '_' || (c) == '$'))
|
#define SYMBOL_CHAR(c) (isascii(c) \
|
||||||
|
&& (isalnum(c) || (c) == '_' || (c) == CPLUS_MARKER))
|
||||||
|
|
||||||
char buf[SYMBOL_MAX+1];
|
char buf[SYMBOL_MAX+1];
|
||||||
# define SLOP 5 /* How much room to leave in buf */
|
# define SLOP 5 /* How much room to leave in buf */
|
||||||
|
|
Loading…
Reference in a new issue