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
a823f1d8
Commit
a823f1d8
authored
Apr 22, 1992
by
Richard Stallman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
*** empty log message ***
From-SVN: r820
parent
cd2b37d9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
53 additions
and
60 deletions
+53
-60
gcc/dbxout.c
+53
-60
No files found.
gcc/dbxout.c
View file @
a823f1d8
...
...
@@ -1346,73 +1346,66 @@ dbxout_symbol (decl, local)
FORCE_TEXT
;
if
(
DECL_NAME
(
decl
))
{
/* Nonzero means we must output a tag as well as a typedef. */
int
tag_also
=
((
TREE_CODE
(
type
)
==
RECORD_TYPE
||
TREE_CODE
(
type
)
==
UNION_TYPE
)
&&
TYPE_NAME
(
type
)
==
decl
);
{
int
tag_needed
=
1
;
/* Output typedef name. */
fprintf
(
asmfile
,
"%s
\"
%s:"
,
ASM_STABS_OP
,
IDENTIFIER_POINTER
(
DECL_NAME
(
decl
)));
if
(
DECL_NAME
(
decl
))
{
/* Nonzero means we must output a tag as well as a typedef. */
tag_needed
=
0
;
/* Short cut way to output a tag also
. */
if
(
tag_also
&&
use_gdb_dbx_extensions
&&
have_used_extensions
)
putc
(
'T'
,
asmfile
);
/* Output typedef name
. */
fprintf
(
asmfile
,
"%s
\"
%s:"
,
ASM_STABS_OP
,
IDENTIFIER_POINTER
(
DECL_NAME
(
decl
))
);
putc
(
't'
,
asmfile
);
current_sym_code
=
DBX_DECL_STABS_CODE
;
/* Short cut way to output a tag also. */
if
((
TREE_CODE
(
type
)
==
RECORD_TYPE
||
TREE_CODE
(
type
)
==
UNION_TYPE
)
&&
TYPE_NAME
(
type
)
==
decl
)
{
if
(
use_gdb_dbx_extensions
&&
have_used_extensions
)
{
putc
(
'T'
,
asmfile
);
TREE_ASM_WRITTEN
(
TYPE_NAME
(
type
))
=
1
;
}
else
tag_needed
=
1
;
}
dbxout_type
(
type
,
1
,
0
);
dbxout_finish_symbol
(
decl
)
;
putc
(
't'
,
asmfile
);
current_sym_code
=
DBX_DECL_STABS_CODE
;
/* Long way to output a tag also. */
if
(
tag_also
&&
!
(
use_gdb_dbx_extensions
&&
have_used_extensions
))
{
/* Output the tag for the type, not using GDB extensions.
This represents `struct foo' as opposed to `typedef foo'. */
/* In C++, the name of a type is the corresponding typedef.
In C, it is an IDENTIFIER_NODE. */
tree
name
=
TYPE_NAME
(
type
);
if
(
TREE_CODE
(
name
)
==
TYPE_DECL
)
name
=
DECL_NAME
(
name
);
current_sym_code
=
DBX_DECL_STABS_CODE
;
current_sym_value
=
0
;
current_sym_addr
=
0
;
current_sym_nchars
=
2
+
IDENTIFIER_LENGTH
(
name
);
dbxout_type
(
type
,
1
,
0
);
dbxout_finish_symbol
(
decl
);
}
fprintf
(
asmfile
,
"%s
\"
%s:T"
,
ASM_STABS_OP
,
IDENTIFIER_POINTER
(
name
));
dbxout_type
(
type
,
1
,
0
);
dbxout_finish_symbol
(
0
);
}
}
else
if
(
TYPE_NAME
(
type
)
!=
0
&&
!
TREE_ASM_WRITTEN
(
TYPE_NAME
(
type
)))
{
/* Output a tag (a TYPE_DECL with no name, but the type has a name).
This is what represents `struct foo' with no typedef. */
/* In C++, the name of a type is the corresponding typedef.
In C, it is an IDENTIFIER_NODE. */
tree
name
=
TYPE_NAME
(
type
);
if
(
TREE_CODE
(
name
)
==
TYPE_DECL
)
name
=
DECL_NAME
(
name
);
current_sym_code
=
DBX_DECL_STABS_CODE
;
current_sym_value
=
0
;
current_sym_addr
=
0
;
current_sym_nchars
=
2
+
IDENTIFIER_LENGTH
(
name
);
fprintf
(
asmfile
,
"%s
\"
%s:T"
,
ASM_STABS_OP
,
IDENTIFIER_POINTER
(
name
));
dbxout_type
(
type
,
1
,
0
);
dbxout_finish_symbol
(
0
);
}
if
(
tag_needed
&&
TYPE_NAME
(
type
)
!=
0
&&
!
TREE_ASM_WRITTEN
(
TYPE_NAME
(
type
)))
{
/* For a TYPE_DECL with no name, but the type has a name,
output a tag.
This is what represents `struct foo' with no typedef. */
/* In C++, the name of a type is the corresponding typedef.
In C, it is an IDENTIFIER_NODE. */
tree
name
=
TYPE_NAME
(
type
);
if
(
TREE_CODE
(
name
)
==
TYPE_DECL
)
name
=
DECL_NAME
(
name
);
current_sym_code
=
DBX_DECL_STABS_CODE
;
current_sym_value
=
0
;
current_sym_addr
=
0
;
current_sym_nchars
=
2
+
IDENTIFIER_LENGTH
(
name
);
/* Prevent duplicate output of a typedef. */
TREE_ASM_WRITTEN
(
decl
)
=
1
;
break
;
fprintf
(
asmfile
,
"%s
\"
%s:T"
,
ASM_STABS_OP
,
IDENTIFIER_POINTER
(
name
));
dbxout_type
(
type
,
1
,
0
);
dbxout_finish_symbol
(
0
);
}
/* Prevent duplicate output of a typedef. */
TREE_ASM_WRITTEN
(
decl
)
=
1
;
break
;
}
case
PARM_DECL
:
/* Parm decls go in their own separate chains
...
...
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