Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
3a7587e4
Commit
3a7587e4
authored
Apr 03, 1992
by
Richard Stallman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
*** empty log message ***
From-SVN: r669
parent
dca0b23f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
103 additions
and
156 deletions
+103
-156
gcc/dbxout.c
+103
-156
No files found.
gcc/dbxout.c
View file @
3a7587e4
...
@@ -557,9 +557,9 @@ dbxout_type_fields (type)
...
@@ -557,9 +557,9 @@ dbxout_type_fields (type)
have_used_extensions
=
1
;
have_used_extensions
=
1
;
CHARS
(
3
+
IDENTIFIER_LENGTH
(
DECL_NAME
(
TYPE_NAME
(
DECL_FCONTEXT
(
tem
)))));
CHARS
(
3
+
IDENTIFIER_LENGTH
(
DECL_NAME
(
TYPE_NAME
(
DECL_FCONTEXT
(
tem
)))));
fputs
(
IDENTIFIER_POINTER
(
DECL_ASSEMBLER_NAME
(
tem
)),
asmfile
);
fputs
(
IDENTIFIER_POINTER
(
DECL_ASSEMBLER_NAME
(
tem
)),
asmfile
);
dbxout_type
(
DECL_FCONTEXT
(
tem
),
0
);
dbxout_type
(
DECL_FCONTEXT
(
tem
),
0
,
0
);
fprintf
(
asmfile
,
":"
);
fprintf
(
asmfile
,
":"
);
dbxout_type
(
TREE_TYPE
(
tem
),
0
);
dbxout_type
(
TREE_TYPE
(
tem
),
0
,
0
);
fprintf
(
asmfile
,
",%d;"
,
fprintf
(
asmfile
,
",%d;"
,
TREE_INT_CST_LOW
(
DECL_FIELD_BITPOS
(
tem
)));
TREE_INT_CST_LOW
(
DECL_FIELD_BITPOS
(
tem
)));
continue
;
continue
;
...
@@ -583,7 +583,7 @@ dbxout_type_fields (type)
...
@@ -583,7 +583,7 @@ dbxout_type_fields (type)
dbxout_type
((
TREE_CODE
(
tem
)
==
FIELD_DECL
dbxout_type
((
TREE_CODE
(
tem
)
==
FIELD_DECL
&&
DECL_BIT_FIELD_TYPE
(
tem
))
&&
DECL_BIT_FIELD_TYPE
(
tem
))
?
DECL_BIT_FIELD_TYPE
(
tem
)
?
DECL_BIT_FIELD_TYPE
(
tem
)
:
TREE_TYPE
(
tem
),
0
);
:
TREE_TYPE
(
tem
),
0
,
0
);
if
(
TREE_CODE
(
tem
)
==
VAR_DECL
)
if
(
TREE_CODE
(
tem
)
==
VAR_DECL
)
{
{
...
@@ -591,17 +591,6 @@ dbxout_type_fields (type)
...
@@ -591,17 +591,6 @@ dbxout_type_fields (type)
{
{
char
*
name
=
IDENTIFIER_POINTER
(
DECL_ASSEMBLER_NAME
(
tem
));
char
*
name
=
IDENTIFIER_POINTER
(
DECL_ASSEMBLER_NAME
(
tem
));
have_used_extensions
=
1
;
have_used_extensions
=
1
;
#if 0 /* ??? Comment below makes it clear this is unacceptable. */
/* Adding 1 here only works on systems
which flush an initial underscore from
the .stabs entry. This loses for static names
which have an initial leading '_' on systems which
don't use leading underscores. */
if (name[0] == '_')
name += 1;
#endif
fprintf
(
asmfile
,
":%s;"
,
name
);
fprintf
(
asmfile
,
":%s;"
,
name
);
CHARS
(
strlen
(
name
));
CHARS
(
strlen
(
name
));
}
}
...
@@ -665,7 +654,7 @@ dbxout_type_method_1 (decl, debug_name)
...
@@ -665,7 +654,7 @@ dbxout_type_method_1 (decl, debug_name)
{
{
fprintf
(
asmfile
,
"%d;"
,
fprintf
(
asmfile
,
"%d;"
,
TREE_INT_CST_LOW
(
DECL_VINDEX
(
decl
)));
TREE_INT_CST_LOW
(
DECL_VINDEX
(
decl
)));
dbxout_type
(
DECL_CONTEXT
(
decl
),
0
);
dbxout_type
(
DECL_CONTEXT
(
decl
),
0
,
0
);
fprintf
(
asmfile
,
";"
);
fprintf
(
asmfile
,
";"
);
CHARS
(
8
);
CHARS
(
8
);
}
}
...
@@ -679,7 +668,6 @@ dbxout_type_methods (type)
...
@@ -679,7 +668,6 @@ dbxout_type_methods (type)
register
tree
type
;
register
tree
type
;
{
{
/* C++: put out the method names and their parameter lists */
/* C++: put out the method names and their parameter lists */
tree
ctor_name
;
tree
methods
=
TYPE_METHODS
(
type
);
tree
methods
=
TYPE_METHODS
(
type
);
tree
type_encoding
;
tree
type_encoding
;
register
tree
fndecl
;
register
tree
fndecl
;
...
@@ -689,13 +677,13 @@ dbxout_type_methods (type)
...
@@ -689,13 +677,13 @@ dbxout_type_methods (type)
if
(
methods
==
NULL_TREE
)
if
(
methods
==
NULL_TREE
)
return
;
return
;
ctor_name
=
DECL_NAME
(
TYPE_NAME
(
type
));
type_encoding
=
DECL_NAME
(
TYPE_NAME
(
type
));
/* C++: Template classes break some assumptions made by this code about
/* C++: Template classes break some assumptions made by this code about
the class names, constructor names, and encodings for assembler
the class names, constructor names, and encodings for assembler
label names. For now, disable output of dbx info for them. */
label names. For now, disable output of dbx info for them. */
{
{
char
*
ptr
=
IDENTIFIER_POINTER
(
ctor_name
);
char
*
ptr
=
IDENTIFIER_POINTER
(
type_encoding
);
/* Avoid strchr or index since those names aren't universal. */
/* Avoid strchr or index since those names aren't universal. */
while
(
*
ptr
&&
*
ptr
!=
'<'
)
ptr
++
;
while
(
*
ptr
&&
*
ptr
!=
'<'
)
ptr
++
;
if
(
*
ptr
!=
0
)
if
(
*
ptr
!=
0
)
...
@@ -710,7 +698,7 @@ dbxout_type_methods (type)
...
@@ -710,7 +698,7 @@ dbxout_type_methods (type)
}
}
}
}
type_identifier_length
=
IDENTIFIER_LENGTH
(
ctor_name
);
type_identifier_length
=
IDENTIFIER_LENGTH
(
type_encoding
);
if
(
TREE_CODE
(
methods
)
==
FUNCTION_DECL
)
if
(
TREE_CODE
(
methods
)
==
FUNCTION_DECL
)
fndecl
=
methods
;
fndecl
=
methods
;
...
@@ -718,94 +706,13 @@ dbxout_type_methods (type)
...
@@ -718,94 +706,13 @@ dbxout_type_methods (type)
fndecl
=
TREE_VEC_ELT
(
methods
,
0
);
fndecl
=
TREE_VEC_ELT
(
methods
,
0
);
else
fndecl
=
TREE_VEC_ELT
(
methods
,
1
);
else
fndecl
=
TREE_VEC_ELT
(
methods
,
1
);
if
(
TREE_CODE
(
type
)
==
RECORD_TYPE
&&
DECL_NAME
(
fndecl
)
==
ctor_name
)
{
tree
ctor
=
fndecl
;
tree
dtor
;
/* Destructors lie in a special place.
n.b. TYPE_HAS_DESTRUCTOR == TYPE_LANG_FLAG_2 */
if
(
TYPE_LANG_FLAG_2
(
type
))
{
dtor
=
fndecl
;
fndecl
=
ctor
=
TREE_CHAIN
(
dtor
);
}
else
dtor
=
NULL_TREE
;
CHARS
(
2
);
if
(
ctor
)
{
int
need_prefix
=
1
;
while
(
ctor
)
{
/* Output the name of the field (after overloading), as
well as the name of the field before overloading, along
with its parameter list. */
char
*
debug_name
=
IDENTIFIER_POINTER
(
DECL_ASSEMBLER_NAME
(
ctor
));
int
old_minimal_debug
=
flag_minimal_debug
;
CONTIN
;
if
(
DECL_NAME
(
ctor
)
==
ctor_name
&&
!
DECL_IGNORED_P
(
ctor
))
{
if
(
need_prefix
)
{
fprintf
(
asmfile
,
"%s::"
,
IDENTIFIER_POINTER
(
DECL_NAME
(
ctor
)));
CHARS
(
IDENTIFIER_LENGTH
(
DECL_NAME
(
ctor
))
+
3
);
need_prefix
=
0
;
}
if
(
ctor
==
dtor
)
/* Always output destructors with full information. */
flag_minimal_debug
=
0
;
dbxout_type
(
TREE_TYPE
(
ctor
),
0
);
flag_minimal_debug
=
old_minimal_debug
;
if
(
flag_minimal_debug
&&
ctor
!=
dtor
)
{
/* Cut down on debugging information by not outputting
the parts of the name we can just as easily
have the debugger figure out. */
/* Get past '__'. */
debug_name
+=
2
;
/* Get past const and volatile qualifiers. */
while
(
*
debug_name
==
'C'
||
*
debug_name
==
'V'
)
debug_name
++
;
/* Get past numeric type length prefix. */
while
(
*
debug_name
>=
'0'
&&
*
debug_name
<=
'9'
)
debug_name
++
;
/* Get past type of `this'. */
debug_name
+=
type_identifier_length
;
}
dbxout_type_method_1
(
ctor
,
debug_name
);
}
if
(
ctor
==
dtor
)
break
;
ctor
=
TREE_CHAIN
(
ctor
);
if
(
ctor
==
NULL_TREE
||
DECL_NAME
(
ctor
)
!=
ctor_name
)
{
fndecl
=
ctor
;
ctor
=
dtor
;
}
}
if
(
!
need_prefix
)
putc
(
';'
,
asmfile
);
}
}
while
(
fndecl
)
while
(
fndecl
)
{
{
tree
name
=
DECL_NAME
(
fndecl
);
tree
name
=
DECL_NAME
(
fndecl
);
fprintf
(
asmfile
,
"%s::"
,
IDENTIFIER_POINTER
(
name
));
int
need_prefix
=
1
;
CHARS
(
IDENTIFIER_LENGTH
(
name
)
+
3
);
/* Group together all the methods for the same operation.
These differ in the types of the arguments. */
for
(
last
=
NULL_TREE
;
for
(
last
=
NULL_TREE
;
fndecl
&&
(
last
==
NULL_TREE
||
DECL_NAME
(
fndecl
)
==
DECL_NAME
(
last
));
fndecl
&&
(
last
==
NULL_TREE
||
DECL_NAME
(
fndecl
)
==
DECL_NAME
(
last
));
fndecl
=
TREE_CHAIN
(
fndecl
))
fndecl
=
TREE_CHAIN
(
fndecl
))
...
@@ -813,22 +720,65 @@ dbxout_type_methods (type)
...
@@ -813,22 +720,65 @@ dbxout_type_methods (type)
well as the name of the field before overloading, along
well as the name of the field before overloading, along
with its parameter list */
with its parameter list */
{
{
/* This is the "mangled" name of the method.
It encodes the argument types. */
char
*
debug_name
=
IDENTIFIER_POINTER
(
DECL_ASSEMBLER_NAME
(
fndecl
));
char
*
debug_name
=
IDENTIFIER_POINTER
(
DECL_ASSEMBLER_NAME
(
fndecl
));
int
destructor
=
0
;
CONTIN
;
CONTIN
;
last
=
fndecl
;
last
=
fndecl
;
dbxout_type
(
TREE_TYPE
(
fndecl
),
0
);
if
(
DECL_IGNORED_P
(
fndecl
))
continue
;
if
(
flag_minimal_debug
)
if
(
flag_minimal_debug
)
{
{
debug_name
+=
IDENTIFIER_LENGTH
(
DECL_NAME
(
fndecl
))
+
2
;
/* Detect ordinary methods because their mangled names
/* Get past const and volatile qualifiers. */
start with the operation name. */
while
(
*
debug_name
==
'C'
||
*
debug_name
==
'V'
)
if
(
!
strncmp
(
IDENTIFIER_POINTER
(
name
),
debug_name
,
debug_name
++
;
IDENTIFIER_LENGTH
(
name
)))
while
(
*
debug_name
>=
'0'
&&
*
debug_name
<=
'9'
)
{
debug_name
++
;
debug_name
+=
IDENTIFIER_LENGTH
(
name
);
debug_name
+=
type_identifier_length
;
if
(
debug_name
[
0
]
==
'_'
&&
debug_name
[
1
]
==
'_'
)
{
char
*
method_name
=
debug_name
+
2
;
/* Get past const and volatile qualifiers. */
while
(
*
method_name
==
'C'
||
*
method_name
==
'V'
)
method_name
++
;
if
(
!
strncmp
(
method_name
,
IDENTIFIER_POINTER
(
type_encoding
),
type_identifier_length
))
method_name
+=
type_identifier_length
;
debug_name
=
method_name
;
}
}
/* Detect constructors by their style of name mangling. */
else
if
(
debug_name
[
0
]
==
'_'
&&
debug_name
[
1
]
==
'_'
)
{
char
*
ctor_name
=
debug_name
+
2
;
while
(
*
ctor_name
==
'C'
||
*
ctor_name
==
'V'
)
ctor_name
++
;
if
(
!
strncmp
(
IDENTIFIER_POINTER
(
type_encoding
),
ctor_name
,
type_identifier_length
))
debug_name
=
ctor_name
+
type_identifier_length
;
}
/* The other alternative is a destructor. */
else
destructor
=
1
;
/* Output the operation name just once, for the first method
that we output. */
if
(
need_prefix
)
{
fprintf
(
asmfile
,
"%s::"
,
IDENTIFIER_POINTER
(
name
));
CHARS
(
IDENTIFIER_LENGTH
(
name
)
+
2
);
need_prefix
=
0
;
}
}
}
dbxout_type
(
TREE_TYPE
(
fndecl
),
0
,
destructor
);
dbxout_type_method_1
(
fndecl
,
debug_name
);
dbxout_type_method_1
(
fndecl
,
debug_name
);
}
}
putc
(
';'
,
asmfile
);
putc
(
';'
,
asmfile
);
...
@@ -844,12 +794,16 @@ dbxout_type_methods (type)
...
@@ -844,12 +794,16 @@ dbxout_type_methods (type)
If FULL is nonzero, and the type has been described only with
If FULL is nonzero, and the type has been described only with
a forward-reference, output the definition now.
a forward-reference, output the definition now.
If FULL is zero in this case, just refer to the forward-reference
If FULL is zero in this case, just refer to the forward-reference
using the number previously allocated. */
using the number previously allocated.
If SHOW_ARG_TYPES is nonzero, we output a description of the argument
types for a METHOD_TYPE. */
static
void
static
void
dbxout_type
(
type
,
full
)
dbxout_type
(
type
,
full
,
show_arg_types
)
tree
type
;
tree
type
;
int
full
;
int
full
;
int
show_arg_types
;
{
{
register
tree
tem
;
register
tree
tem
;
...
@@ -996,7 +950,7 @@ dbxout_type (type, full)
...
@@ -996,7 +950,7 @@ dbxout_type (type, full)
?
TREE_INT_CST_LOW
(
TYPE_MAX_VALUE
(
TYPE_DOMAIN
(
type
)))
?
TREE_INT_CST_LOW
(
TYPE_MAX_VALUE
(
TYPE_DOMAIN
(
type
)))
:
-
1
));
:
-
1
));
CHARS
(
17
);
CHARS
(
17
);
dbxout_type
(
TREE_TYPE
(
type
),
0
);
dbxout_type
(
TREE_TYPE
(
type
),
0
,
0
);
break
;
break
;
case
RECORD_TYPE
:
case
RECORD_TYPE
:
...
@@ -1015,7 +969,9 @@ dbxout_type (type, full)
...
@@ -1015,7 +969,9 @@ dbxout_type (type, full)
&& DECL_IGNORED_P (TYPE_NAME (type)))
&& DECL_IGNORED_P (TYPE_NAME (type)))
#endif
#endif
&&
!
full
)
&&
!
full
)
||
TYPE_SIZE
(
type
)
==
0
)
||
TYPE_SIZE
(
type
)
==
0
/* No way in DBX fmt to describe a variable size. */
||
TREE_CODE
(
TYPE_SIZE
(
type
))
!=
INTEGER_CST
)
{
{
/* If the type is just a cross reference, output one
/* If the type is just a cross reference, output one
and mark the type as partially described.
and mark the type as partially described.
...
@@ -1040,10 +996,6 @@ dbxout_type (type, full)
...
@@ -1040,10 +996,6 @@ dbxout_type (type, full)
}
}
tem
=
size_in_bytes
(
type
);
tem
=
size_in_bytes
(
type
);
/* The code below assumes the size is an integer constant. */
if
(
TREE_CODE
(
tem
)
!=
INTEGER_CST
)
abort
();
/* Identify record or union, and print its size. */
/* Identify record or union, and print its size. */
fprintf
(
asmfile
,
(
TREE_CODE
(
type
)
==
RECORD_TYPE
)
?
"s%d"
:
"u%d"
,
fprintf
(
asmfile
,
(
TREE_CODE
(
type
)
==
RECORD_TYPE
)
?
"s%d"
:
"u%d"
,
TREE_INT_CST_LOW
(
tem
));
TREE_INT_CST_LOW
(
tem
));
...
@@ -1072,7 +1024,7 @@ dbxout_type (type, full)
...
@@ -1072,7 +1024,7 @@ dbxout_type (type, full)
fprintf
(
asmfile
,
"%d,"
,
fprintf
(
asmfile
,
"%d,"
,
TREE_INT_CST_LOW
(
BINFO_OFFSET
(
child
))
*
BITS_PER_UNIT
);
TREE_INT_CST_LOW
(
BINFO_OFFSET
(
child
))
*
BITS_PER_UNIT
);
CHARS
(
15
);
CHARS
(
15
);
dbxout_type
(
BINFO_TYPE
(
child
),
0
);
dbxout_type
(
BINFO_TYPE
(
child
),
0
,
0
);
putc
(
';'
,
asmfile
);
putc
(
';'
,
asmfile
);
}
}
else
else
...
@@ -1081,7 +1033,7 @@ dbxout_type (type, full)
...
@@ -1081,7 +1033,7 @@ dbxout_type (type, full)
which have the same names at the types they hold. */
which have the same names at the types they hold. */
dbxout_type_name
(
BINFO_TYPE
(
child
));
dbxout_type_name
(
BINFO_TYPE
(
child
));
putc
(
':'
,
asmfile
);
putc
(
':'
,
asmfile
);
dbxout_type
(
BINFO_TYPE
(
child
),
full
);
dbxout_type
(
BINFO_TYPE
(
child
),
full
,
0
);
fprintf
(
asmfile
,
",%d,%d;"
,
fprintf
(
asmfile
,
",%d,%d;"
,
TREE_INT_CST_LOW
(
BINFO_OFFSET
(
child
))
*
BITS_PER_UNIT
,
TREE_INT_CST_LOW
(
BINFO_OFFSET
(
child
))
*
BITS_PER_UNIT
,
TREE_INT_CST_LOW
(
DECL_SIZE
(
TYPE_NAME
(
BINFO_TYPE
(
child
))))
*
BITS_PER_UNIT
);
TREE_INT_CST_LOW
(
DECL_SIZE
(
TYPE_NAME
(
BINFO_TYPE
(
child
))))
*
BITS_PER_UNIT
);
...
@@ -1117,7 +1069,7 @@ dbxout_type (type, full)
...
@@ -1117,7 +1069,7 @@ dbxout_type (type, full)
if
(
TYPE_VFIELD
(
type
))
if
(
TYPE_VFIELD
(
type
))
{
{
putc
(
'%'
,
asmfile
);
putc
(
'%'
,
asmfile
);
dbxout_type
(
DECL_FCONTEXT
(
TYPE_VFIELD
(
type
)),
0
);
dbxout_type
(
DECL_FCONTEXT
(
TYPE_VFIELD
(
type
)),
0
,
0
);
}
}
putc
(
';'
,
asmfile
);
putc
(
';'
,
asmfile
);
CHARS
(
3
);
CHARS
(
3
);
...
@@ -1154,7 +1106,7 @@ dbxout_type (type, full)
...
@@ -1154,7 +1106,7 @@ dbxout_type (type, full)
case
POINTER_TYPE
:
case
POINTER_TYPE
:
putc
(
'*'
,
asmfile
);
putc
(
'*'
,
asmfile
);
CHARS
(
1
);
CHARS
(
1
);
dbxout_type
(
TREE_TYPE
(
type
),
0
);
dbxout_type
(
TREE_TYPE
(
type
),
0
,
0
);
break
;
break
;
case
METHOD_TYPE
:
case
METHOD_TYPE
:
...
@@ -1163,19 +1115,23 @@ dbxout_type (type, full)
...
@@ -1163,19 +1115,23 @@ dbxout_type (type, full)
have_used_extensions
=
1
;
have_used_extensions
=
1
;
putc
(
'#'
,
asmfile
);
putc
(
'#'
,
asmfile
);
CHARS
(
1
);
CHARS
(
1
);
if
(
flag_minimal_debug
)
if
(
flag_minimal_debug
&&
!
show_arg_types
)
{
{
/* Normally, just output the return type.
The argument types are encoded in the method name. */
putc
(
'#'
,
asmfile
);
putc
(
'#'
,
asmfile
);
dbxout_type
(
TREE_TYPE
(
type
),
0
);
dbxout_type
(
TREE_TYPE
(
type
),
0
,
0
);
putc
(
';'
,
asmfile
);
putc
(
';'
,
asmfile
);
CHARS
(
1
);
CHARS
(
1
);
}
}
else
else
{
{
dbxout_type
(
TYPE_METHOD_BASETYPE
(
type
),
0
);
/* When outputing destructors, we need to write
the argument types out longhand. */
dbxout_type
(
TYPE_METHOD_BASETYPE
(
type
),
0
,
0
);
putc
(
','
,
asmfile
);
putc
(
','
,
asmfile
);
CHARS
(
1
);
CHARS
(
1
);
dbxout_type
(
TREE_TYPE
(
type
),
0
);
dbxout_type
(
TREE_TYPE
(
type
),
0
,
0
);
dbxout_args
(
TYPE_ARG_TYPES
(
type
));
dbxout_args
(
TYPE_ARG_TYPES
(
type
));
putc
(
';'
,
asmfile
);
putc
(
';'
,
asmfile
);
CHARS
(
1
);
CHARS
(
1
);
...
@@ -1184,7 +1140,7 @@ dbxout_type (type, full)
...
@@ -1184,7 +1140,7 @@ dbxout_type (type, full)
else
else
{
{
/* Treat it as a function type. */
/* Treat it as a function type. */
dbxout_type
(
TREE_TYPE
(
type
),
0
);
dbxout_type
(
TREE_TYPE
(
type
),
0
,
0
);
}
}
break
;
break
;
...
@@ -1194,16 +1150,16 @@ dbxout_type (type, full)
...
@@ -1194,16 +1150,16 @@ dbxout_type (type, full)
have_used_extensions
=
1
;
have_used_extensions
=
1
;
putc
(
'@'
,
asmfile
);
putc
(
'@'
,
asmfile
);
CHARS
(
1
);
CHARS
(
1
);
dbxout_type
(
TYPE_OFFSET_BASETYPE
(
type
),
0
);
dbxout_type
(
TYPE_OFFSET_BASETYPE
(
type
),
0
,
0
);
putc
(
','
,
asmfile
);
putc
(
','
,
asmfile
);
CHARS
(
1
);
CHARS
(
1
);
dbxout_type
(
TREE_TYPE
(
type
),
0
);
dbxout_type
(
TREE_TYPE
(
type
),
0
,
0
);
}
}
else
else
{
{
/* Should print as an int, because it is really
/* Should print as an int, because it is really
just an offset. */
just an offset. */
dbxout_type
(
integer_type_node
,
0
);
dbxout_type
(
integer_type_node
,
0
,
0
);
}
}
break
;
break
;
...
@@ -1212,13 +1168,13 @@ dbxout_type (type, full)
...
@@ -1212,13 +1168,13 @@ dbxout_type (type, full)
have_used_extensions
=
1
;
have_used_extensions
=
1
;
putc
(
use_gdb_dbx_extensions
?
'&'
:
'*'
,
asmfile
);
putc
(
use_gdb_dbx_extensions
?
'&'
:
'*'
,
asmfile
);
CHARS
(
1
);
CHARS
(
1
);
dbxout_type
(
TREE_TYPE
(
type
),
0
);
dbxout_type
(
TREE_TYPE
(
type
),
0
,
0
);
break
;
break
;
case
FUNCTION_TYPE
:
case
FUNCTION_TYPE
:
putc
(
'f'
,
asmfile
);
putc
(
'f'
,
asmfile
);
CHARS
(
1
);
CHARS
(
1
);
dbxout_type
(
TREE_TYPE
(
type
),
0
);
dbxout_type
(
TREE_TYPE
(
type
),
0
,
0
);
break
;
break
;
default
:
default
:
...
@@ -1355,9 +1311,9 @@ dbxout_symbol (decl, local)
...
@@ -1355,9 +1311,9 @@ dbxout_symbol (decl, local)
current_sym_addr
=
XEXP
(
DECL_RTL
(
decl
),
0
);
current_sym_addr
=
XEXP
(
DECL_RTL
(
decl
),
0
);
if
(
TREE_TYPE
(
type
))
if
(
TREE_TYPE
(
type
))
dbxout_type
(
TREE_TYPE
(
type
),
0
);
dbxout_type
(
TREE_TYPE
(
type
),
0
,
0
);
else
else
dbxout_type
(
void_type_node
,
0
);
dbxout_type
(
void_type_node
,
0
,
0
);
/* For a nested function, when that function is compiled,
/* For a nested function, when that function is compiled,
mention the containing function name
mention the containing function name
...
@@ -1409,7 +1365,7 @@ dbxout_symbol (decl, local)
...
@@ -1409,7 +1365,7 @@ dbxout_symbol (decl, local)
putc
(
't'
,
asmfile
);
putc
(
't'
,
asmfile
);
current_sym_code
=
DBX_DECL_STABS_CODE
;
current_sym_code
=
DBX_DECL_STABS_CODE
;
dbxout_type
(
type
,
1
);
dbxout_type
(
type
,
1
,
0
);
dbxout_finish_symbol
(
decl
);
dbxout_finish_symbol
(
decl
);
}
}
else
if
(
TYPE_NAME
(
type
)
!=
0
&&
!
TREE_ASM_WRITTEN
(
TYPE_NAME
(
type
)))
else
if
(
TYPE_NAME
(
type
)
!=
0
&&
!
TREE_ASM_WRITTEN
(
TYPE_NAME
(
type
)))
...
@@ -1429,7 +1385,7 @@ dbxout_symbol (decl, local)
...
@@ -1429,7 +1385,7 @@ dbxout_symbol (decl, local)
fprintf
(
asmfile
,
"%s
\"
%s:T"
,
ASM_STABS_OP
,
fprintf
(
asmfile
,
"%s
\"
%s:T"
,
ASM_STABS_OP
,
IDENTIFIER_POINTER
(
name
));
IDENTIFIER_POINTER
(
name
));
dbxout_type
(
type
,
1
);
dbxout_type
(
type
,
1
,
0
);
dbxout_finish_symbol
(
0
);
dbxout_finish_symbol
(
0
);
}
}
...
@@ -1673,22 +1629,13 @@ dbxout_symbol (decl, local)
...
@@ -1673,22 +1629,13 @@ dbxout_symbol (decl, local)
/* Note also that static member (variable) names DO NOT begin
/* Note also that static member (variable) names DO NOT begin
with underscores in .stabs directives. */
with underscores in .stabs directives. */
if
(
DECL_LANG_SPECIFIC
(
decl
))
if
(
DECL_LANG_SPECIFIC
(
decl
))
{
name
=
IDENTIFIER_POINTER
(
DECL_ASSEMBLER_NAME
(
decl
));
name
=
IDENTIFIER_POINTER
(
DECL_ASSEMBLER_NAME
(
decl
));
#if 0 /* Tiemann says get rid of this. */
/* Adding 1 here only works on systems
which flush an initial underscore. */
if (name[0] == '_')
name += 1;
#endif
}
else
else
name
=
IDENTIFIER_POINTER
(
DECL_NAME
(
decl
));
name
=
IDENTIFIER_POINTER
(
DECL_NAME
(
decl
));
fprintf
(
asmfile
,
"%s
\"
%s:"
,
ASM_STABS_OP
,
name
);
fprintf
(
asmfile
,
"%s
\"
%s:"
,
ASM_STABS_OP
,
name
);
}
}
if
(
letter
)
putc
(
letter
,
asmfile
);
if
(
letter
)
putc
(
letter
,
asmfile
);
dbxout_type
(
type
,
0
);
dbxout_type
(
type
,
0
,
0
);
dbxout_finish_symbol
(
decl
);
dbxout_finish_symbol
(
decl
);
#ifdef DBX_STATIC_BLOCK_END
#ifdef DBX_STATIC_BLOCK_END
...
@@ -1812,7 +1759,7 @@ dbxout_parms (parms)
...
@@ -1812,7 +1759,7 @@ dbxout_parms (parms)
if
(
GET_CODE
(
DECL_RTL
(
parms
))
==
REG
if
(
GET_CODE
(
DECL_RTL
(
parms
))
==
REG
&&
REGNO
(
DECL_RTL
(
parms
))
>=
0
&&
REGNO
(
DECL_RTL
(
parms
))
>=
0
&&
REGNO
(
DECL_RTL
(
parms
))
<
FIRST_PSEUDO_REGISTER
)
&&
REGNO
(
DECL_RTL
(
parms
))
<
FIRST_PSEUDO_REGISTER
)
dbxout_type
(
DECL_ARG_TYPE
(
parms
),
0
);
dbxout_type
(
DECL_ARG_TYPE
(
parms
),
0
,
0
);
else
else
{
{
int
original_value
=
current_sym_value
;
int
original_value
=
current_sym_value
;
...
@@ -1833,11 +1780,11 @@ dbxout_parms (parms)
...
@@ -1833,11 +1780,11 @@ dbxout_parms (parms)
&&
GET_CODE
(
XEXP
(
DECL_RTL
(
parms
),
0
))
==
PLUS
&&
GET_CODE
(
XEXP
(
DECL_RTL
(
parms
),
0
))
==
PLUS
&&
GET_CODE
(
XEXP
(
XEXP
(
DECL_RTL
(
parms
),
0
),
1
))
==
CONST_INT
&&
GET_CODE
(
XEXP
(
XEXP
(
DECL_RTL
(
parms
),
0
),
1
))
==
CONST_INT
&&
INTVAL
(
XEXP
(
XEXP
(
DECL_RTL
(
parms
),
0
),
1
))
==
current_sym_value
)
&&
INTVAL
(
XEXP
(
XEXP
(
DECL_RTL
(
parms
),
0
),
1
))
==
current_sym_value
)
dbxout_type
(
TREE_TYPE
(
parms
),
0
);
dbxout_type
(
TREE_TYPE
(
parms
),
0
,
0
);
else
else
{
{
current_sym_value
=
original_value
;
current_sym_value
=
original_value
;
dbxout_type
(
DECL_ARG_TYPE
(
parms
),
0
);
dbxout_type
(
DECL_ARG_TYPE
(
parms
),
0
,
0
);
}
}
}
}
current_sym_value
=
DEBUGGER_ARG_OFFSET
(
current_sym_value
,
addr
);
current_sym_value
=
DEBUGGER_ARG_OFFSET
(
current_sym_value
,
addr
);
...
@@ -1881,7 +1828,7 @@ dbxout_parms (parms)
...
@@ -1881,7 +1828,7 @@ dbxout_parms (parms)
regparm_letter
);
regparm_letter
);
}
}
dbxout_type
(
DECL_ARG_TYPE
(
parms
),
0
);
dbxout_type
(
DECL_ARG_TYPE
(
parms
),
0
,
0
);
dbxout_finish_symbol
(
parms
);
dbxout_finish_symbol
(
parms
);
}
}
else
if
(
GET_CODE
(
DECL_RTL
(
parms
))
==
MEM
else
if
(
GET_CODE
(
DECL_RTL
(
parms
))
==
MEM
...
@@ -1918,7 +1865,7 @@ dbxout_parms (parms)
...
@@ -1918,7 +1865,7 @@ dbxout_parms (parms)
current_sym_value
current_sym_value
=
DEBUGGER_ARG_OFFSET
(
current_sym_value
,
=
DEBUGGER_ARG_OFFSET
(
current_sym_value
,
XEXP
(
DECL_RTL
(
parms
),
0
));
XEXP
(
DECL_RTL
(
parms
),
0
));
dbxout_type
(
TREE_TYPE
(
parms
),
0
);
dbxout_type
(
TREE_TYPE
(
parms
),
0
,
0
);
dbxout_finish_symbol
(
parms
);
dbxout_finish_symbol
(
parms
);
}
}
}
}
...
@@ -1967,7 +1914,7 @@ dbxout_reg_parms (parms)
...
@@ -1967,7 +1914,7 @@ dbxout_reg_parms (parms)
current_sym_nchars
=
8
;
current_sym_nchars
=
8
;
fprintf
(
asmfile
,
"%s
\"
(anon):r"
,
ASM_STABS_OP
);
fprintf
(
asmfile
,
"%s
\"
(anon):r"
,
ASM_STABS_OP
);
}
}
dbxout_type
(
TREE_TYPE
(
parms
),
0
);
dbxout_type
(
TREE_TYPE
(
parms
),
0
,
0
);
dbxout_finish_symbol
(
parms
);
dbxout_finish_symbol
(
parms
);
}
}
/* Report parms that live in memory but not where they were passed. */
/* Report parms that live in memory but not where they were passed. */
...
@@ -2004,7 +1951,7 @@ dbxout_reg_parms (parms)
...
@@ -2004,7 +1951,7 @@ dbxout_reg_parms (parms)
current_sym_nchars
=
8
;
current_sym_nchars
=
8
;
fprintf
(
asmfile
,
"%s
\"
(anon):"
,
ASM_STABS_OP
);
fprintf
(
asmfile
,
"%s
\"
(anon):"
,
ASM_STABS_OP
);
}
}
dbxout_type
(
TREE_TYPE
(
parms
),
0
);
dbxout_type
(
TREE_TYPE
(
parms
),
0
,
0
);
dbxout_finish_symbol
(
parms
);
dbxout_finish_symbol
(
parms
);
}
}
}
}
...
@@ -2020,7 +1967,7 @@ dbxout_args (args)
...
@@ -2020,7 +1967,7 @@ dbxout_args (args)
while
(
args
)
while
(
args
)
{
{
putc
(
','
,
asmfile
);
putc
(
','
,
asmfile
);
dbxout_type
(
TREE_VALUE
(
args
),
0
);
dbxout_type
(
TREE_VALUE
(
args
),
0
,
0
);
CHARS
(
1
);
CHARS
(
1
);
args
=
TREE_CHAIN
(
args
);
args
=
TREE_CHAIN
(
args
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment