misc cleanup

This commit is contained in:
YamaArashi 2016-02-12 10:25:03 -08:00
parent e58748cc84
commit 7e65adeeca
42 changed files with 10 additions and 22101 deletions

View File

@ -605,7 +605,7 @@ SCHED_CFLAGS = @sched_cflags@
OBJS = toplev.o version.o tree.o print-tree.o stor-layout.o fold-const.o \
function.o stmt.o except.o expr.o calls.o expmed.o explow.o optabs.o \
varasm.o rtl.o print-rtl.o rtlanal.o emit-rtl.o genrtl.o real.o regmove.o \
dbxout.o sdbout.o dwarfout.o dwarf2out.o xcoffout.o bitmap.o alias.o \
dwarf2out.o bitmap.o alias.o \
integrate.o jump.o cse.o loop.o unroll.o flow.o stupid.o combine.o varray.o \
regclass.o local-alloc.o global.o reload.o reload1.o caller-save.o gcse.o \
insn-peep.o reorg.o $(SCHED_PREFIX)sched.o final.o recog.o reg-stack.o \
@ -1339,9 +1339,9 @@ fold-const.o : fold-const.c $(CONFIG_H) system.h $(TREE_H) flags.h toplev.h \
$(RTL_H)
# CYGNUS LOCAL live range
toplev.o : toplev.c $(CONFIG_H) system.h $(TREE_H) $(RTL_H) \
flags.h input.h insn-attr.h xcoffout.h defaults.h output.h range.h \
insn-codes.h insn-config.h $(RECOG_H) Makefile toplev.h dwarfout.h \
dwarf2out.h sdbout.h dbxout.h $(EXPR_H) \
flags.h input.h insn-attr.h defaults.h output.h range.h \
insn-codes.h insn-config.h $(RECOG_H) Makefile toplev.h \
dwarf2out.h $(EXPR_H) \
$(lang_options_files)
$(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
-DTARGET_NAME=\"$(target_alias)\" \
@ -1355,7 +1355,7 @@ rtlanal.o : rtlanal.c $(CONFIG_H) system.h $(RTL_H)
varasm.o : varasm.c $(CONFIG_H) system.h $(TREE_H) $(RTL_H) flags.h \
function.h defaults.h $(EXPR_H) hard-reg-set.h $(REGS_H) \
xcoffout.h output.h c-pragma.h toplev.h except.h dbxout.h sdbout.h
output.h c-pragma.h toplev.h except.h
function.o : function.c $(CONFIG_H) system.h $(RTL_H) $(TREE_H) flags.h \
function.h insn-flags.h insn-codes.h $(EXPR_H) $(REGS_H) hard-reg-set.h \
insn-config.h $(RECOG_H) output.h toplev.h except.h
@ -1376,22 +1376,9 @@ explow.o : explow.c $(CONFIG_H) system.h $(RTL_H) $(TREE_H) flags.h \
hard-reg-set.h insn-config.h $(EXPR_H) $(RECOG_H) insn-flags.h insn-codes.h
optabs.o : optabs.c $(CONFIG_H) system.h $(RTL_H) $(TREE_H) flags.h \
insn-flags.h insn-config.h insn-codes.h $(EXPR_H) $(RECOG_H) reload.h
# CYGNUS LOCAL live range
dbxout.o : dbxout.c $(CONFIG_H) system.h $(TREE_H) $(RTL_H) flags.h $(REGS_H) \
insn-config.h reload.h gstab.h xcoffout.h defaults.h output.h dbxout.h \
toplev.h range.h
# END CYGNUS LOCAL
sdbout.o : sdbout.c $(CONFIG_H) system.h $(TREE_H) $(RTL_H) flags.h except.h \
function.h $(EXPR_H) output.h hard-reg-set.h $(REGS_H) defaults.h real.h \
insn-config.h $(srcdir)/../include/obstack.h xcoffout.h c-pragma.h \
sdbout.h toplev.h
dwarfout.o : dwarfout.c $(CONFIG_H) system.h $(TREE_H) $(RTL_H) dwarf.h \
flags.h insn-config.h reload.h output.h defaults.h toplev.h dwarfout.h
dwarf2out.o : dwarf2out.c $(CONFIG_H) system.h $(TREE_H) $(RTL_H) dwarf2.h \
flags.h insn-config.h reload.h output.h defaults.h \
hard-reg-set.h $(REGS_H) $(EXPR_H) toplev.h dwarf2out.h dyn-string.h
xcoffout.o : xcoffout.c $(CONFIG_H) system.h $(TREE_H) $(RTL_H) xcoffout.h \
flags.h toplev.h output.h dbxout.h
emit-rtl.o : emit-rtl.c $(CONFIG_H) system.h $(RTL_H) $(TREE_H) flags.h \
except.h function.h $(REGS_H) insn-config.h $(RECOG_H) real.h \
$(EXPR_H) $(srcdir)/../include/obstack.h hard-reg-set.h bitmap.h
@ -1468,8 +1455,8 @@ $(SCHED_PREFIX)sched.o : $(SCHED_PREFIX)sched.c $(CONFIG_H) system.h $(RTL_H) \
# CYGNUS LOCAL live range
final.o : final.c $(CONFIG_H) system.h $(RTL_H) $(TREE_H) flags.h $(REGS_H) \
$(RECOG_H) conditions.h insn-config.h insn-attr.h except.h real.h output.h \
hard-reg-set.h insn-flags.h insn-codes.h gstab.h xcoffout.h defaults.h \
toplev.h reload.h dwarfout.h dwarf2out.h sdbout.h dbxout.h range.h
hard-reg-set.h insn-flags.h insn-codes.h defaults.h \
toplev.h reload.h dwarf2out.h range.h
# END CYGNUS LOCAL
recog.o : recog.c $(CONFIG_H) system.h $(RTL_H) \
$(REGS_H) $(RECOG_H) hard-reg-set.h flags.h insn-config.h insn-attr.h \
@ -1483,20 +1470,6 @@ $(out_object_file): $(out_file) $(CONFIG_H) $(TREE_H) \
insn-flags.h output.h insn-attr.h insn-codes.h system.h toplev.h
$(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(out_file)
# Build auxiliary files that support ecoff format.
mips-tfile: mips-tfile.o version.o $(LIBDEPS)
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ mips-tfile.o version.o $(LIBS)
mips-tfile.o : mips-tfile.c $(CONFIG_H) $(RTL_H) system.h machmode.h
mips-tdump: mips-tdump.o version.o $(LIBDEPS)
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ mips-tdump.o version.o $(LIBS)
mips-tdump.o : mips-tdump.c $(CONFIG_H) $(RTL_H) system.h
# Build file to support OSF/rose half-pic format.
halfpic.o: halfpic.c $(CONFIG_H) $(RTL_H) $(TREE_H) system.h
# Normally this target is not used; but it is used if you
# define ALLOCA=alloca.o. In that case, you must get a suitable alloca.c
# from the GNU Emacs distribution.

View File

@ -1,144 +0,0 @@
The purpose of GCC pretesting is to verify that the new GCC
distribution, about to be released, works properly on your system *with
no change whatever*, when installed following the precise
recommendations that come with the distribution.
Here are some guidelines on how to do pretesting so as to make it
helpful. All of them follow from common sense together with the
nature of the purpose and the situation.
* It is absolutely vital that you mention even the smallest change or
departure from the standard sources and installation procedure.
Otherwise, you are not testing the same program that I wrote. Testing
a different program is usually of no use whatever. It can even cause
trouble if you fail to tell me that you tested some other program
instead of what I know as GCC. I might think that GCC works, when in
fact it has not been properly tried, and might have a glaring fault.
* Even changing the compilation options counts as a change in the
program. The GCC sources specify which compilation options to use.
Some of them are specified in makefiles, and some in machine-specific
configuration files.
You have ways to override this--but if you do, then you are not
testing what ordinary users will do. Therefore, when pretesting, it
is vital to test with the default compilation options.
(It is okay to test with nonstandard options as well as testing with
the standard ones.)
* The machine and system configuration files of GCC are parts of
GCC. So when you test GCC, you need to do it with the
configuration files that come with GCC.
If GCC does not come with configuration files for a certain machine,
and you test it with configuration files that don't come with GCC,
this is effectively changing GCC. Because the crucial fact about
the planned release is that, without changes, it doesn't work on that
machine.
To make GCC work on that machine, I would need to install new
configuration files. That is not out of the question, since it is
safe--it certainly won't break any other machines that already work.
But you will have to rush me the legal papers to give the FSF
permission to use a large piece of text.
* Look for recommendations for your system.
You can find these recommendations in the Installation node of the
manual, and in the file INSTALL. (These two files have the same text.)
These files say which configuration name to use for your machine, so
use the ones that are recommended. If you guess, you might guess
wrong and encounter spurious difficulties. What's more, if you don't
follow the recommendations then you aren't helping to test that its
recommendations are valid.
These files may describe other things that you need to do to make GCC
work on your machine. If so, you should follow these recommendations
also, for the same reason.
Also look at the Trouble chapter of the manual for items that
pertain to your machine.
* Don't delay sending information.
When you find a problem, please double check it if you can do so
quickly. But don't spend a long time double-checking. A good rule is
always to tell me about every problem on the same day you encounter
it, even if that means you can't find a solution before you report the
problem.
I'd much rather hear about a problem today and a solution tomorrow
than get both of them tomorrow at the same time.
* Make each bug report self-contained.
If you refer back to another message, whether from you or from someone
else, then it will be necessary for anyone who wants to investigate
the bug to find the other message. This may be difficult, it is
probably time-consuming.
To help me save time, simply copy the relevant parts of any previous
messages into your own bug report.
In particular, if I ask you for more information because a bug report
was incomplete, it is best to send me the *entire* collection of
relevant information, all together. If you send just the additional
information, that makes me do extra work. There is even a risk that
I won't remember what question you are sending me the answer to.
* Always be precise when talking about changes you have made. Show
things rather than describing them. Use exact filenames (relative to
the main directory of the distribution), not partial ones. For
example, say "I changed Makefile" rather than "I changed the
makefile". Instead of saying "I defined the MUMBLE macro", send a
diff that shows your change.
* Always use `diff -c' to make diffs. If you don't include context,
it may be hard for me to figure out where you propose to make the
changes. I might have to ignore your patch because I can't tell what
it means.
* When you write a fix, keep in mind that I can't install a change
that would break other systems.
People often suggest fixing a problem by changing machine-independent
files such as toplev.c to do something special that a particular
system needs. Sometimes it is totally obvious that such changes would
break GCC for almost all users. I can't possibly make a change like
that. All I can do is send it back to you and ask you to find a fix
that is safe to install.
Sometimes people send fixes that *might* be an improvement in
general--but it is hard to be sure of this. I can install such
changes some of the time, but not during pretest, when I am trying to
get a new version to work reliably as quickly as possible.
The safest changes for me to install are changes to the configuration
files for a particular machine. At least I know those can't create
bugs on other machines.
* Don't try changing GCC unless it fails to work if you don't change it.
* Don't even suggest changes that would only make GCC cleaner.
Every change I install could introduce a bug, so I won't install
a change unless I see it is necessary.
* If you would like to suggest changes for purposes other than fixing
serious bugs, don't wait till pretest time. Instead, send them just
after I make a release. That's the best time for me to install them.
* In some cases, if you don't follow these guidelines, your
information might still be useful, but I might have to do more work to
make use of it. Unfortunately, I am so far behind in my work that I
just can't get the job done unless you help me to do it efficiently.
Thank you
rms
Local Variables:
mode: text
End:

View File

@ -1,9 +0,0 @@
This README file is copied into the directory for GCC-only header files
when fixincludes is run by the makefile for GCC.
Many of the files in this directory were made from the standard system
header files of this system by the shell script `fixincludes'.
They are system-specific, and will not work on any other kind of system.
They are also not part of GCC. The reason for making the files here
is to fix the places in the header files which use constructs
that are incompatible with ANSI C.

View File

@ -1,322 +0,0 @@
# -*- C -*-
# bytecode.def - definitions of bytecodes for the stack machine.
# The production of the bytecode interpreter and compiler is
# heavily automated by using this file creatively.
# Various elementary data types are understood by the bytecode interpreter.
# Q[IU] - quarter word (byte) signed and unsigned integers (char).
# H[IU] - half word signed and unsigned integers (short int, maybe int).
# S[IU] - single word signed and unsigned integers (maybe int, long int).
# D[IU] - double word signed and unsigned integers (long long int).
# SF - single precision floating point (float).
# DF - double precision floating point (double).
# XF - extended precision floating point (long double).
# P - pointer type for address arithmetic and other purposes.
# The bytecode specification consists of a series of define_operator
# forms, that are parsed by preprocessors to automatically build
# various switch statements.
# define_operator(name,
# <C prototype code for implementing the operator>,
# <list of variations>)
# The <C prototype> is self explanatory.
# The <list of variations> consists of a (parenthesized list) of
# variation items, each of which is in itself a list. A variation
# item consists of a name suffix, the types of the input arguments
# expected on the stack (shallowest item first) and (optionally) the
# types of the output arguments (similarly ordered). Finally, the
# types of the literal arguments (if any) may appear.
# Substitution in the C prototype code is as follows:
# Substitution happens only after a dollar sign. To get a literal
# dollar sign (why would you ever want one anyway?) use $$.
# $R1 means "result 1" $TR1 means "type name of result one"
# $S1 means "source 1" and similarly with $TS1.
# $L1 means "literal (inline) argument 1" and $TL1 means type thereof.
#
# Notice that the number following $R doesn't affect the push order;
# it's used only for clarity and orthogonality, although it's checked
# to make sure it doesn't exceed the number of outputs. A $R reference
# results in a push, and represents the result lvalue. E.g.
# $R1 = 2\, $R2 = 17
# will expand to:
# INTERP_PUSH($TR1) = 2, INTERP_PUSH($TR2) = 17
#
# Opcode 0 should never happen.
define_operator(neverneverland, abort\(\), (()))
# Stack manipulations.
define_operator(drop, 0, ((, (SI))))
define_operator(duplicate, 0, ((, (SI), (SI, SI))))
define_operator(over, 0, ((, (SI), (SI, SI))))
# Adjust stack pointer
define_operator(setstack, 0, ((SI,,,(SI))))
define_operator(adjstack, 0, ((SI,,,(SI))))
# Constants, loads, and stores.
define_operator(const,
$R1 = $L1,
((QI,, (QI), (QI)), (HI,, (HI), (HI)),
(SI,, (SI), (SI)), (DI,, (DI), (DI)),
(SF,, (SF), (SF)), (DF,, (DF), (DF)),
(XF,, (XF), (XF)), (P,, (P), (P))))
define_operator(load,
$R1 = *\($TR1 *\) $S1,
((QI, (P), (QI)), (HI, (P), (HI)),
(SI, (P), (SI)), (DI, (P), (DI)),
(SF, (P), (SF)), (DF, (P), (DF)),
(XF, (P), (XF)), (P, (P), (P))))
define_operator(store,
*\($TS2 *\) $S1 = $S2,
((QI, (P, QI)), (HI, (P, HI)),
(SI, (P, SI)), (DI, (P, DI)),
(SF, (P, SF)), (DF, (P, DF)),
(XF, (P, XF)), (P, (P, P)),
(BLK, (SI, BLK, BLK))))
# Clear memory block
define_operator(clear, $S1 + $S2, ((BLK, (SI, BLK))))
# Advance pointer by SI constant
define_operator(addconst, $R1 = $S1, ((PSI, (P), (P), (SI))))
# newlocalSI is used for creating variable-sized storage during function
# initialization.
# Create local space, return pointer to block
define_operator(newlocal, $R1 = $S1, ((SI, (SI), (P))))
# Push the address of a local variable.
define_operator(local, $R1 = locals + $L1, ((P,, (P), (SI))))
# Push the address of an argument variable.
define_operator(arg, $R1 = args + $L1, ((P,, (P), (SI))))
# Arithmetic conversions.
define_operator(convert,
$R1 = \($TR1\) $S1,
(# Signed integral promotions (sign extensions).
(QIHI, (QI), (HI)), (HISI, (HI), (SI)), (SIDI, (SI), (DI)),
(QISI, (QI), (SI)),
# Unsigned integral promotions (zero extensions).
(QUHU, (QU), (HU)), (HUSU, (HU), (SU)), (SUDU, (SU), (DU)),
(QUSU, (QU), (SU)),
# Floating promotions.
(SFDF, (SF), (DF)), (DFXF, (DF), (XF)),
# Integral truncation.
(HIQI, (HI), (QI)), (SIHI, (SI), (HI)), (DISI, (DI), (SI)),
(SIQI, (SI), (QI)),
# Unsigned truncation.
(SUQU, (SU), (QU)),
# Floating truncation.
(DFSF, (DF), (SF)), (XFDF, (XF), (DF)),
# Integral conversions to floating types.
(SISF, (SI), (SF)), (SIDF, (SI), (DF)), (SIXF, (SI), (XF)),
(SUSF, (SU), (SF)), (SUDF, (SU), (DF)), (SUXF, (SU), (XF)),
(DISF, (DI), (SF)), (DIDF, (DI), (DF)), (DIXF, (DI), (XF)),
(DUSF, (DU), (SF)), (DUDF, (DU), (DF)), (DUXF, (DU), (XF)),
# Floating conversions to integral types.
(SFSI, (SF), (SI)), (DFSI, (DF), (SI)), (XFSI, (XF), (SI)),
(SFSU, (SF), (SU)), (DFSU, (DF), (SU)), (XFSU, (XF), (SU)),
(SFDI, (SF), (DI)), (DFDI, (DF), (DI)), (XFDI, (XF), (DI)),
(SFDU, (SF), (DU)), (DFDU, (DF), (DU)), (XFDU, (XF), (DU)),
# Pointer/integer conversions.
(PSI, (P), (SI)), (SIP, (SI), (P))))
# Truth value conversion. These are necessary because conversions of, e.g.,
# floating types to integers may not function correctly for large values.
define_operator(convert,
$R1 = !!$S1,
((SIT, (SI), (T)), (DIT, (DI), (T)),
(SFT, (SF), (T)), (DFT, (DF), (T)),
(XFT, (XF), (T)), (PT, (P), (T))))
# Bit field load/store.
# Load and zero-extend bitfield
define_operator(zxload, $R1 = $S1, ((BI, (SU, SU, P), (SU))))
# Load and sign-extend bitfield
define_operator(sxload, $R1 = $S1, ((BI, (SU, SU, P), (SI))))
# Store integer in bitfield
define_operator(sstore, $R1 = $S1, ((BI, (SU, SU, P, SI))))
# Binary operations.
define_operator(add,
$R1 = $S1 + $S2,
((SI, (SI, SI), (SI)), (DI, (DI, DI), (DI)),
(SF, (SF, SF), (SF)), (DF, (DF, DF), (DF)),
(XF, (XF, XF), (XF)),
(PSI, (P, SI), (P))))
define_operator(sub,
$R1 = $S1 - $S2,
((SI, (SI, SI), (SI)), (DI, (DI, DI), (DI)),
(SF, (SF, SF), (SF)), (DF, (DF, DF), (DF)),
(XF, (XF, XF), (XF)),
(PP, (P, P), (SI))))
define_operator(mul,
$R1 = $S1 * $S2,
((SI, (SI, SI), (SI)), (DI, (DI, DI), (DI)),
(SU, (SU, SU), (SU)), (DU, (DU, DU), (DU)),
(SF, (SF, SF), (SF)), (DF, (DF, DF), (DF)),
(XF, (XF, XF), (XF))))
define_operator(div,
$R1 = $S1 / $S2,
((SI, (SI, SI), (SI)), (DI, (DI, DI), (DI)),
(SU, (SU, SU), (SU)), (DU, (DU, DU), (DU)),
(SF, (SF, SF), (SF)), (DF, (DF, DF), (DF)),
(XF, (XF, XF), (XF))))
define_operator(mod,
$R1 = $S1 % $S2,
((SI, (SI, SI), (SI)), (DI, (DI, DI), (DI)),
(SU, (SU, SU), (SU)), (DU, (DU, DU), (DU))))
define_operator(and,
$R1 = $S1 & $S2,
((SI, (SI, SI), (SI)), (DI, (DI, DI), (DI))))
define_operator(ior,
$R1 = $S1 | $S2,
((SI, (SI, SI), (SI)), (DI, (DI, DI), (DI))))
define_operator(xor,
$R1 = $S1 ^ $S2,
((SI, (SI, SI), (SI)), (DI, (DI, DI), (DI))))
define_operator(lshift,
$R1 = $S1 << $S2,
((SI, (SI, SI), (SI)), (SU, (SU, SI), (SU)),
(DI, (DI, SI), (DI)), (DU, (DU, SI), (DU))))
define_operator(rshift,
$R1 = $S1 >> $S2,
((SI, (SI, SI), (SI)), (SU, (SU, SI), (SU)),
(DI, (DI, SI), (DI)), (DU, (DU, SI), (DU))))
define_operator(lt,
$R1 = $S1 < $S2,
((SI, (SI, SI), (T)), (SU, (SU, SU), (T)),
(DI, (DI, DI), (T)), (DU, (DU, DU), (T)),
(SF, (SF, SF), (T)), (DF, (DF, DF), (T)),
(XF, (XF, XF), (T)), (P, (P, P), (T))))
define_operator(le,
$R1 = $S1 <= $S2,
((SI, (SI, SI), (T)), (SU, (SU, SU), (T)),
(DI, (DI, DI), (T)), (DU, (DU, DU), (T)),
(SF, (SF, SF), (T)), (DF, (DF, DF), (T)),
(XF, (XF, XF), (T)), (P, (P, P), (T))))
define_operator(ge,
$R1 = $S1 >= $S2,
((SI, (SI, SI), (T)), (SU, (SU, SU), (T)),
(DI, (DI, DI), (T)), (DU, (DU, DU), (T)),
(SF, (SF, SF), (T)), (DF, (DF, DF), (T)),
(XF, (XF, XF), (T)), (P, (P, P), (T))))
define_operator(gt,
$R1 = $S1 > $S2,
((SI, (SI, SI), (T)), (SU, (SU, SU), (T)),
(DI, (DI, DI), (T)), (DU, (DU, DU), (T)),
(SF, (SF, SF), (T)), (DF, (DF, DF), (T)),
(XF, (XF, XF), (T)), (P, (P, P), (T))))
define_operator(eq,
$R1 = $S1 == $S2,
((SI, (SI, SI), (T)), (DI, (DI, DI), (T)),
(SF, (SF, SF), (T)), (DF, (DF, DF), (T)),
(XF, (XF, XF), (T)), (P, (P, P), (T))))
define_operator(ne,
$R1 = $S1 != $S2,
((SI, (SI, SI), (T)), (DI, (DI, DI), (T)),
(SF, (SF, SF), (T)), (DF, (DF, DF), (T)),
(XF, (XF, XF), (T)), (P, (P, P), (T))))
# Unary operations.
define_operator(neg,
$R1 = -$S1,
((SI, (SI), (SI)), (DI, (DI), (DI)),
(SF, (SF), (SF)), (DF, (DF), (DF)),
(XF, (XF), (XF))))
define_operator(not,
$R1 = ~$S1,
((SI, (SI), (SI)), (DI, (DI), (DI))))
define_operator(not,
$R1 = !$S1,
((T, (SI), (SI))))
# Increment operations.
define_operator(predec,
$R1 = *\($TR1 *\) $S1 -= $S2,
((QI, (P, QI), (QI)), (HI, (P, HI), (HI)),
(SI, (P, SI), (SI)), (DI, (P, DI), (DI)),
(P, (P, SI), (P)), (SF, (P, SF), (SF)),
(DF, (P, DF), (DF)), (XF, (P, XF), (XF)),
(BI, (SU, SU, P, SI), (SI))))
define_operator(preinc,
$R1 = *\($TR1 *\) $S1 += $S2,
((QI, (P, QI), (QI)), (HI, (P, HI), (HI)),
(SI, (P, SI), (SI)), (DI, (P, DI), (DI)),
(P, (P, SI), (P)), (SF, (P, SF), (SF)),
(DF, (P, DF), (DF)), (XF, (P, XF), (XF)),
(BI, (SU, SU, P, SI), (SI))))
define_operator(postdec,
$R1 = *\($TR1 *\) $S1\, *\($TR1 *\) $S1 -= $S2,
((QI, (P, QI), (QI)), (HI, (P, HI), (HI)),
(SI, (P, SI), (SI)), (DI, (P, DI), (DI)),
(P, (P, SI), (P)), (SF, (P, SF), (SF)),
(DF, (P, DF), (DF)), (XF, (P, XF), (XF)),
(BI, (SU, SU, P, SI), (SI))))
define_operator(postinc,
$R1 = *\($TR1 *\) $S1\, *\($TR1 *\) $S1 += $S2,
((QI, (P, QI), (QI)), (HI, (P, HI), (HI)),
(SI, (P, SI), (SI)), (DI, (P, DI), (DI)),
(P, (P, SI), (P)), (SF, (P, SF), (SF)),
(DF, (P, DF), (DF)), (XF, (P, XF), (XF)),
(BI, (SU, SU, P, SI), (SI))))
# Jumps.
define_operator(xjumpif, if \($S1\) pc = code->pc0 + $L1, ((, (T),, (SI))))
define_operator(xjumpifnot, if \(! $S1\) pc = code->pc0 + $L1, ((, (T),, (SI))))
define_operator(jump, pc = code->pc0 + $L1, ((,,,(SI))))
# This is for GCC2. It jumps to the address on the stack.
define_operator(jump, pc = \(void *\) $S1, ((P,,)))
# Switches. In order to (eventually) support ranges we provide four different
# varieties of switches. Arguments are the switch index from the stack, the
# bytecode offset of the switch table, the size of the switch table, and
# the default label.
define_operator(caseSI, CASESI\($S1\, $L1\, $L2\, $L3\), ((, (SI),, (SI, SI, SI))))
define_operator(caseSU, CASESU\($S1\, $L1\, $L2\, $L3\), ((, (SU),, (SI, SI, SI))))
define_operator(caseDI, CASEDI\($S1\, $L1\, $L2\, $L3\), ((, (DI),, (SI, SI, SI))))
define_operator(caseDU, CASEDU\($S1\, $L1\, $L2\, $L3\), ((, (DU),, (SI, SI, SI))))
# Procedure call.
# Stack arguments are (deepest first):
# procedure arguments in reverse order.
# pointer to the place to hold the return value.
# address of the call description vector.
# pointer to the procedure to be called.
define_operator(call, CALL\($S1\, $S2\, $S3\, sp\), ((, (P, P, P))))
# Procedure return.
# Pushes on interpreter stack:
# value of retptr (pointer to return value storage slot)
define_operator(return, $R1 = retptr, ((P,,(P))))
# Really return.
define_operator(ret, return, (()))
# Print an obnoxious line number.
define_operator(linenote, fprintf\(stderr\, "%d\\n"\, $L1\), ((,,,(SI))))

View File

@ -1,82 +0,0 @@
/* Bytecode definitions for GNU C-compiler.
Copyright (C) 1993, 1994, 1996 Free Software Foundation, Inc.
This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU CC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
extern int output_bytecode;
extern int stack_depth;
extern int max_stack_depth;
/* Emit DI constant according to target machine word ordering */
#define bc_emit_bytecode_DI_const(CST) \
{ int opcode; \
opcode = (WORDS_BIG_ENDIAN \
? TREE_INT_CST_HIGH (CST) \
: TREE_INT_CST_LOW (CST)); \
bc_emit_bytecode_const ((char *) &opcode, sizeof opcode); \
opcode = (WORDS_BIG_ENDIAN \
? TREE_INT_CST_LOW (CST) \
: TREE_INT_CST_HIGH (CST)); \
bc_emit_bytecode_const ((char *) &opcode, sizeof opcode); \
}
extern void bc_expand_expr ();
extern void bc_output_data_constructor ();
extern void bc_store_field ();
extern void bc_load_bit_field ();
extern void bc_store_bit_field ();
extern void bc_push_offset_and_size ();
extern void bc_init_mode_to_code_map ();
/* These are just stubs, so the compiler will compile for targets
that aren't yet supported by the bytecode generator. */
#ifndef TARGET_SUPPORTS_BYTECODE
#define MACHINE_SEG_ALIGN 1
#define INT_ALIGN 1
#define PTR_ALIGN 1
#define NAMES_HAVE_UNDERSCORES
#define BC_NOP (0)
#define BC_GLOBALIZE_LABEL(FP, NAME) BC_NOP
#define BC_OUTPUT_COMMON(FP, NAME, SIZE, ROUNDED) BC_NOP
#define BC_OUTPUT_BSS(FP, NAME, SIZE, ROUNDED) BC_NOP
#define BC_OUTPUT_LOCAL(FP, NAME, SIZE, ROUNDED) BC_NOP
#define BC_OUTPUT_ALIGN(FP, ALIGN) BC_NOP
#define BC_OUTPUT_LABEL(FP, NAME) BC_NOP
#define BC_OUTPUT_SKIP(FP, SIZE) BC_NOP
#define BC_OUTPUT_LABELREF(FP, NAME) BC_NOP
#define BC_OUTPUT_FLOAT(FP, VAL) BC_NOP
#define BC_OUTPUT_DOUBLE(FP, VAL) BC_NOP
#define BC_OUTPUT_BYTE(FP, VAL) BC_NOP
#define BC_OUTPUT_FILE ASM_OUTPUT_FILE
#define BC_OUTPUT_ASCII ASM_OUTPUT_ASCII
#define BC_OUTPUT_IDENT ASM_OUTPUT_IDENT
#define BCXSTR(RTX) ((RTX)->bc_label)
#define BC_WRITE_FILE(FP) BC_NOP
#define BC_WRITE_SEGSYM(SEGSYM, FP) BC_NOP
#define BC_WRITE_RELOC_ENTRY(SEGRELOC, FP, OFFSET) BC_NOP
#define BC_START_BYTECODE_LINE(FP) BC_NOP
#define BC_WRITE_BYTECODE(SEP, VAL, FP) BC_NOP
#define BC_WRITE_RTL(R, FP) BC_NOP
#define BC_EMIT_TRAMPOLINE(TRAMPSEG, CALLINFO) BC_NOP
#define VALIDATE_STACK BC_NOP
#endif /* !TARGET_SUPPORTS_BYTECODE */

View File

@ -1,35 +0,0 @@
/* These should come from genemit */
/* Use __signed__ in case compiling with -traditional. */
typedef __signed__ char QItype;
typedef unsigned char QUtype;
typedef __signed__ short int HItype;
typedef unsigned short int HUtype;
typedef __signed__ long int SItype;
typedef unsigned long int SUtype;
typedef __signed__ long long int DItype;
typedef unsigned long long int DUtype;
typedef float SFtype;
typedef double DFtype;
typedef long double XFtype;
typedef char *Ptype;
typedef int Ttype;
typedef union stacktype
{
QItype QIval;
QUtype QUval;
HItype HIval;
HUtype HUval;
SItype SIval;
SUtype SUval;
DItype DIval;
DUtype DUval;
SFtype SFval;
DFtype DFval;
XFtype XFval;
Ptype Pval;
Ttype Tval;
} stacktype;

File diff suppressed because it is too large Load Diff

View File

@ -1,33 +0,0 @@
/* dbxout.h - Various declarations for functions found in dbxout.c
Copyright (C) 1998 Free Software Foundation, Inc.
This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU CC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
extern void dbxout_init PROTO ((FILE *, char *, tree));
extern void dbxout_finish PROTO ((FILE *, char *));
extern void dbxout_start_new_source_file PROTO ((char *));
extern void dbxout_resume_previous_source_file PROTO ((void));
extern void dbxout_symbol PROTO ((tree, int));
extern void dbxout_parms PROTO ((tree));
extern void dbxout_reg_parms PROTO ((tree));
extern void dbxout_syms PROTO ((tree));
extern void dbxout_function PROTO ((tree));
extern void dbxout_source_line PROTO ((FILE *, char*, int));
extern void dbxout_begin_function PROTO ((tree));

View File

@ -1,17 +0,0 @@
/* Storage classes in XCOFF object file format designed for DBX's use.
This info is from the `Files Reference' manual for IBM's AIX version 3
for the RS6000. */
#define C_GSYM 0x80
#define C_LSYM 0x81
#define C_PSYM 0x82
#define C_RSYM 0x83
#define C_RPSYM 0x84
#define C_STSYM 0x85
#define C_BCOMM 0x87
#define C_ECOML 0x88
#define C_ECOMM 0x89
#define C_DECL 0x8c
#define C_ENTRY 0x8d
#define C_FUN 0x8e

View File

@ -1,360 +0,0 @@
/*
** DosFCheck - check file names for DOS consistency
**
** Distribute freely, it only encourages DOS compatibility!
** - DJ Delorie
*/
/* This file is not part of GCC. */
#include <stdio.h>
#ifdef __MSDOS__
#include <alloc.h>
#else
#include <malloc.h>
#endif
#include <ctype.h>
#include <string.h>
typedef struct ENT
{
struct ENT *next;
char *dos_name;
char *full_name;
char *path;
int tagged;
} ENT;
ENT *eroot = 0;
int first_inv = 1;
int first_msg = 1;
/****************************************************************\
* Utility routines *
\****************************************************************/
void
invalid_msg ()
{
if (first_inv)
{
if (first_msg)
first_msg = 0;
else
putchar ('\n');
printf ("The following files are not valid DOS file names:\n");
first_inv = 0;
}
}
ENT *
alloc_ent ()
{
ENT *rv = (ENT *)malloc (sizeof (ENT));
if (rv == 0)
{
fprintf (stderr, "Unable to allocate memory for an ENT\n");
exit (1);
}
memset (rv, 0, sizeof (ENT));
return rv;
}
void
fill_ent (ent, path)
ENT *ent;
char *path;
{
char *first = path;
char *null = path+strlen (path);
char *last_slash = strrchr (path, '/');
char *cp, *dp;
int dots_seen, chars_seen;
if (last_slash+1 == null)
{
* --null = '\0';
last_slash = strrchr (path, '/');
}
if (!last_slash)
{
last_slash = first-1;
}
if (null-last_slash < 13)
ent->dos_name = (char *)malloc (null-last_slash);
else
ent->dos_name = (char *)malloc (13);
ent->full_name = (char *)malloc (null-last_slash);
ent->path = (char *)malloc (last_slash-first+1);
strcpy (ent->full_name, last_slash+1);
if (last_slash > first)
{
strncpy (ent->path, first, last_slash-first);
ent->path[last_slash-first] = '\0';
}
else
*ent->path = '\0';
cp = last_slash+1;
dp = ent->dos_name;
dots_seen = 0;
chars_seen = 0;
while (1)
{
if (! *cp)
break;
switch (*cp)
{
case '.':
if (cp == last_slash+1 && strcmp (last_slash+1, "."))
{
invalid_msg ();
printf ("%s - file name cannot start with dot\n", path);
*dp = 0;
break;
}
if (dots_seen == 1)
{
invalid_msg ();
printf ("%s - too many dots\n", path);
*dp = '\0';
break;
}
*dp++ = '.';
chars_seen = 0;
dots_seen++;
break;
case '"':
case '*':
case '+':
case ',':
case ';':
case '<':
case '=':
case '>':
case '?':
case '[':
case '\\':
case ']':
case '|':
invalid_msg ();
printf ("%s - invalid character `%c'\n", path, *cp);
*dp++ = '?';
chars_seen++;
break;
default:
if (dots_seen)
{
if (chars_seen >= 3)
break;
}
else
if (chars_seen >= 8)
break;
if ((*cp <= ' ') || (*cp >= 0x7f))
{
invalid_msg ();
printf ("%s - invalid character `%c'\n", path, *cp);
*dp++ = '?';
chars_seen++;
break;
}
if (islower (*cp))
*dp++ = toupper (*cp);
else
*dp++ = *cp;
chars_seen++;
break;
}
cp++;
}
*dp++ = '\0';
}
int
compare_ent_dosname (e1, e2)
ENT **e1;
ENT **e2;
{
int r = strcmp ((*e1)->dos_name, (*e2)->dos_name);
if (r == 0)
r = strcmp ((*e1)->path, (*e2)->path);
if (r == 0)
r = strcmp ((*e1)->full_name, (*e2)->full_name);
return r;
}
int
compare_ent_fullname (e1, e2)
ENT **e1;
ENT **e2;
{
int r = strncmp ((*e1)->full_name, (*e2)->full_name, 14);
if (r == 0)
r = strcmp ((*e1)->path, (*e2)->path);
if (r == 0)
r = strcmp ((*e1)->full_name, (*e2)->full_name);
return r;
}
char *
mpath (ent)
ENT *ent;
{
static char buf[500];
if (ent->path && ent->path[0])
sprintf (buf, "%s/%s", ent->path, ent->full_name);
else
return ent->full_name;
return buf;
}
/****************************************************************\
* List handling routines *
\****************************************************************/
void
add_ent (ent)
ENT *ent;
{
ent->next = eroot;
eroot = ent;
}
void
handle_input (line)
char *line;
{
ENT *ent = alloc_ent ();
fill_ent (ent, line);
add_ent (ent);
}
void
display_problems ()
{
ENT **elist, *ent;
int ecount, i, first, first_err;
for (ecount=0, ent=eroot; ent; ent=ent->next, ecount++);
elist = (ENT **)malloc (sizeof (ENT *) * ecount);
for (ecount=0, ent=eroot; ent; ent=ent->next, ecount++)
elist[ecount] = ent;
qsort (elist, ecount, sizeof (ENT *), compare_ent_dosname);
first = 1;
first_err = 1;
for (i=0; i<ecount-1; i++)
{
if ((strcmp (elist[i]->dos_name, elist[i+1]->dos_name) == 0)
&& (strcmp (elist[i]->path, elist[i+1]->path) == 0))
{
if (first_err)
{
if (first_msg)
first_msg = 0;
else
putchar ('\n');
printf ("The following resolve to the same DOS file names:\n");
first_err = 0;
}
if (first)
{
printf ("%14s : %s\n", elist[i]->dos_name, mpath (elist[i]));
first = 0;
}
printf ("\t\t %s\n", mpath (elist[i+1]));
}
else
first = 1;
}
qsort (elist, ecount, sizeof (ENT *), compare_ent_fullname);
first = 1;
first_err = 1;
for (i=0; i<ecount-1; i++)
{
if ((strncmp (elist[i]->full_name, elist[i+1]->full_name, 14) == 0)
&& (strcmp (elist[i]->path, elist[i+1]->path) == 0))
{
if (first_err)
{
if (first_msg)
first_msg = 0;
else
putchar ('\n');
printf ("The following resolve to the same SysV file names:\n");
first_err = 0;
}
if (first)
{
printf ("%.14s : %s\n", elist[i]->full_name, mpath (elist[i]));
first = 0;
elist[i]->tagged = 1;
}
printf ("\t\t %s\n", mpath (elist[i+1]));
elist[i+1]->tagged = 1;
}
else
first = 1;
}
first_err = 1;
for (i=0; i<ecount; i++)
{
if ((strlen (elist[i]->full_name) > 14) && !elist[i]->tagged)
{
if (first_err)
{
if (first_msg)
first_msg = 0;
else
putchar ('\n');
printf ("The following file names are too long for SysV:\n");
first_err = 0;
}
printf ("%.14s : %s\n", elist[i]->full_name, mpath (elist[i]));
}
}
}
/****************************************************************\
* Main entry point *
\****************************************************************/
main (argc, argv)
int argc;
char **argv;
{
FILE *input = stdin;
if (argc > 1)
{
input = fopen (argv[1], "r");
if (!input)
{
perror (argv[1]);
exit (1);
}
}
while (1)
{
char line[500];
char *lp;
fgets (line, 500, input);
if (feof (input))
break;
lp = line+strlen (line);
while ((lp != line) && (*lp <= ' '))
lp--;
lp[1] = 0;
handle_input (line);
}
display_problems ();
}

View File

@ -1,315 +0,0 @@
/* Declarations and definitions of codes relating to the DWARF symbolic
debugging information format.
Written by Ron Guilmette (rfg@netcom.com)
Copyright (C) 1992 Free Software Foundation, Inc.
This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU CC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* This file is derived from the DWARF specification (a public document)
Revision 1.0.1 (April 8, 1992) developed by the UNIX International
Programming Languages Special Interest Group (UI/PLSIG) and distributed
by UNIX International. Copies of this specification are available from
UNIX International, 20 Waterview Boulevard, Parsippany, NJ, 07054.
*/
/* Tag names and codes. */
enum dwarf_tag {
TAG_padding = 0x0000,
TAG_array_type = 0x0001,
TAG_class_type = 0x0002,
TAG_entry_point = 0x0003,
TAG_enumeration_type = 0x0004,
TAG_formal_parameter = 0x0005,
TAG_global_subroutine = 0x0006,
TAG_global_variable = 0x0007,
/* 0x0008 -- reserved */
/* 0x0009 -- reserved */
TAG_label = 0x000a,
TAG_lexical_block = 0x000b,
TAG_local_variable = 0x000c,
TAG_member = 0x000d,
/* 0x000e -- reserved */
TAG_pointer_type = 0x000f,
TAG_reference_type = 0x0010,
TAG_compile_unit = 0x0011,
TAG_string_type = 0x0012,
TAG_structure_type = 0x0013,
TAG_subroutine = 0x0014,
TAG_subroutine_type = 0x0015,
TAG_typedef = 0x0016,
TAG_union_type = 0x0017,
TAG_unspecified_parameters = 0x0018,
TAG_variant = 0x0019,
TAG_common_block = 0x001a,
TAG_common_inclusion = 0x001b,
TAG_inheritance = 0x001c,
TAG_inlined_subroutine = 0x001d,
TAG_module = 0x001e,
TAG_ptr_to_member_type = 0x001f,
TAG_set_type = 0x0020,
TAG_subrange_type = 0x0021,
TAG_with_stmt = 0x0022,
/* GNU extensions */
TAG_format_label = 0x8000, /* for FORTRAN 77 and Fortran 90 */
TAG_namelist = 0x8001, /* For Fortran 90 */
TAG_function_template = 0x8002, /* for C++ */
TAG_class_template = 0x8003 /* for C++ */
};
#define TAG_lo_user 0x8000 /* implementation-defined range start */
#define TAG_hi_user 0xffff /* implementation-defined range end */
#define TAG_source_file TAG_compile_unit /* for backward compatibility */
/* Form names and codes. */
enum dwarf_form {
FORM_ADDR = 0x1,
FORM_REF = 0x2,
FORM_BLOCK2 = 0x3,
FORM_BLOCK4 = 0x4,
FORM_DATA2 = 0x5,
FORM_DATA4 = 0x6,
FORM_DATA8 = 0x7,
FORM_STRING = 0x8
};
/* Attribute names and codes. */
enum dwarf_attribute {
AT_sibling = (0x0010|FORM_REF),
AT_location = (0x0020|FORM_BLOCK2),
AT_name = (0x0030|FORM_STRING),
AT_fund_type = (0x0050|FORM_DATA2),
AT_mod_fund_type = (0x0060|FORM_BLOCK2),
AT_user_def_type = (0x0070|FORM_REF),
AT_mod_u_d_type = (0x0080|FORM_BLOCK2),
AT_ordering = (0x0090|FORM_DATA2),
AT_subscr_data = (0x00a0|FORM_BLOCK2),
AT_byte_size = (0x00b0|FORM_DATA4),
AT_bit_offset = (0x00c0|FORM_DATA2),
AT_bit_size = (0x00d0|FORM_DATA4),
/* (0x00e0|FORM_xxxx) -- reserved */
AT_element_list = (0x00f0|FORM_BLOCK4),
AT_stmt_list = (0x0100|FORM_DATA4),
AT_low_pc = (0x0110|FORM_ADDR),
AT_high_pc = (0x0120|FORM_ADDR),
AT_language = (0x0130|FORM_DATA4),
AT_member = (0x0140|FORM_REF),
AT_discr = (0x0150|FORM_REF),
AT_discr_value = (0x0160|FORM_BLOCK2),
/* (0x0170|FORM_xxxx) -- reserved */
/* (0x0180|FORM_xxxx) -- reserved */
AT_string_length = (0x0190|FORM_BLOCK2),
AT_common_reference = (0x01a0|FORM_REF),
AT_comp_dir = (0x01b0|FORM_STRING),
AT_const_value_string = (0x01c0|FORM_STRING),
AT_const_value_data2 = (0x01c0|FORM_DATA2),
AT_const_value_data4 = (0x01c0|FORM_DATA4),
AT_const_value_data8 = (0x01c0|FORM_DATA8),
AT_const_value_block2 = (0x01c0|FORM_BLOCK2),
AT_const_value_block4 = (0x01c0|FORM_BLOCK4),
AT_containing_type = (0x01d0|FORM_REF),
AT_default_value_addr = (0x01e0|FORM_ADDR),
AT_default_value_data2 = (0x01e0|FORM_DATA2),
AT_default_value_data4 = (0x01e0|FORM_DATA4),
AT_default_value_data8 = (0x01e0|FORM_DATA8),
AT_default_value_string = (0x01e0|FORM_STRING),
AT_friends = (0x01f0|FORM_BLOCK2),
AT_inline = (0x0200|FORM_STRING),
AT_is_optional = (0x0210|FORM_STRING),
AT_lower_bound_ref = (0x0220|FORM_REF),
AT_lower_bound_data2 = (0x0220|FORM_DATA2),
AT_lower_bound_data4 = (0x0220|FORM_DATA4),
AT_lower_bound_data8 = (0x0220|FORM_DATA8),
AT_private = (0x0240|FORM_STRING),
AT_producer = (0x0250|FORM_STRING),
AT_program = (0x0230|FORM_STRING),
AT_protected = (0x0260|FORM_STRING),
AT_prototyped = (0x0270|FORM_STRING),
AT_public = (0x0280|FORM_STRING),
AT_pure_virtual = (0x0290|FORM_STRING),
AT_return_addr = (0x02a0|FORM_BLOCK2),
AT_abstract_origin = (0x02b0|FORM_REF),
AT_start_scope = (0x02c0|FORM_DATA4),
AT_stride_size = (0x02e0|FORM_DATA4),
AT_upper_bound_ref = (0x02f0|FORM_REF),
AT_upper_bound_data2 = (0x02f0|FORM_DATA2),
AT_upper_bound_data4 = (0x02f0|FORM_DATA4),
AT_upper_bound_data8 = (0x02f0|FORM_DATA8),
AT_virtual = (0x0300|FORM_STRING),
/* GNU extensions. */
AT_sf_names = (0x8000|FORM_DATA4),
AT_src_info = (0x8010|FORM_DATA4),
AT_mac_info = (0x8020|FORM_DATA4),
AT_src_coords = (0x8030|FORM_DATA4),
AT_body_begin = (0x8040|FORM_ADDR),
AT_body_end = (0x8050|FORM_ADDR)
};
#define AT_lo_user 0x2000 /* implementation-defined range start */
#define AT_hi_user 0x3ff0 /* implementation-defined range end */
/* Location atom names and codes. */
enum dwarf_location_atom {
OP_REG = 0x01,
OP_BASEREG = 0x02,
OP_ADDR = 0x03,
OP_CONST = 0x04,
OP_DEREF2 = 0x05,
OP_DEREF4 = 0x06,
OP_ADD = 0x07,
/* GNU extensions. */
OP_MULT = 0x80
};
#define OP_LO_USER 0x80 /* implementation-defined range start */
#define OP_HI_USER 0xff /* implementation-defined range end */
/* Fundamental type names and codes. */
enum dwarf_fundamental_type {
FT_char = 0x0001,
FT_signed_char = 0x0002,
FT_unsigned_char = 0x0003,
FT_short = 0x0004,
FT_signed_short = 0x0005,
FT_unsigned_short = 0x0006,
FT_integer = 0x0007,
FT_signed_integer = 0x0008,
FT_unsigned_integer = 0x0009,
FT_long = 0x000a,
FT_signed_long = 0x000b,
FT_unsigned_long = 0x000c,
FT_pointer = 0x000d, /* an alias for (void *) */
FT_float = 0x000e,
FT_dbl_prec_float = 0x000f,
FT_ext_prec_float = 0x0010, /* breaks "classic" svr4 SDB */
FT_complex = 0x0011, /* breaks "classic" svr4 SDB */
FT_dbl_prec_complex = 0x0012, /* breaks "classic" svr4 SDB */
/* 0x0013 -- reserved */
FT_void = 0x0014,
FT_boolean = 0x0015, /* breaks "classic" svr4 SDB */
FT_ext_prec_complex = 0x0016, /* breaks "classic" svr4 SDB */
FT_label = 0x0017,
/* GNU extensions
The low order byte must indicate the size (in bytes) for the type.
All of these types will probably break "classic" svr4 SDB */
FT_long_long = 0x8008,
FT_signed_long_long = 0x8108,
FT_unsigned_long_long = 0x8208,
FT_int8 = 0x9001,
FT_signed_int8 = 0x9101,
FT_unsigned_int8 = 0x9201,
FT_int16 = 0x9302,
FT_signed_int16 = 0x9402,
FT_unsigned_int16 = 0x9502,
FT_int32 = 0x9604,
FT_signed_int32 = 0x9704,
FT_unsigned_int32 = 0x9804,
FT_int64 = 0x9908,
FT_signed_int64 = 0x9a08,
FT_unsigned_int64 = 0x9b08,
FT_real32 = 0xa004,
FT_real64 = 0xa108,
FT_real96 = 0xa20c,
FT_real128 = 0xa310
};
#define FT_lo_user 0x8000 /* implementation-defined range start */
#define FT_hi_user 0xffff /* implementation defined range end */
/* Type modifier names and codes. */
enum dwarf_type_modifier {
MOD_pointer_to = 0x01,
MOD_reference_to = 0x02,
MOD_const = 0x03,
MOD_volatile = 0x04
};
#define MOD_lo_user 0x80 /* implementation-defined range start */
#define MOD_hi_user 0xff /* implementation-defined range end */
/* Array ordering names and codes. */
enum dwarf_array_dim_ordering {
ORD_row_major = 0,
ORD_col_major = 1
};
/* Array subscript format names and codes. */
enum dwarf_subscr_data_formats {
FMT_FT_C_C = 0x0,
FMT_FT_C_X = 0x1,
FMT_FT_X_C = 0x2,
FMT_FT_X_X = 0x3,
FMT_UT_C_C = 0x4,
FMT_UT_C_X = 0x5,
FMT_UT_X_C = 0x6,
FMT_UT_X_X = 0x7,
FMT_ET = 0x8
};
/* Derived from above for ease of use. */
#define FMT_CODE(_FUNDAMENTAL_TYPE_P, _UB_CONST_P, _LB_CONST_P) \
(((_FUNDAMENTAL_TYPE_P) ? 0 : 4) \
| ((_UB_CONST_P) ? 0 : 2) \
| ((_LB_CONST_P) ? 0 : 1))
/* Source language names and codes. */
enum dwarf_source_language {
LANG_C89 = 0x00000001,
LANG_C = 0x00000002,
LANG_ADA83 = 0x00000003,
LANG_C_PLUS_PLUS = 0x00000004,
LANG_COBOL74 = 0x00000005,
LANG_COBOL85 = 0x00000006,
LANG_FORTRAN77 = 0x00000007,
LANG_FORTRAN90 = 0x00000008,
LANG_PASCAL83 = 0x00000009,
LANG_MODULA2 = 0x0000000a
};
#define LANG_lo_user 0x00008000 /* implementation-defined range start */
#define LANG_hi_user 0x0000ffff /* implementation-defined range end */
/* Names and codes for GNU "macinfo" extension. */
enum dwarf_macinfo_record_type {
MACINFO_start = 's',
MACINFO_resume = 'r',
MACINFO_define = 'd',
MACINFO_undef = 'u'
};

File diff suppressed because it is too large Load Diff

View File

@ -1,42 +0,0 @@
/* dwarfout.h - Various declarations for functions found in dwarfout.c
Copyright (C) 1998 Free Software Foundation, Inc.
This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU CC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
extern void dwarfout_init PROTO ((FILE *asm_out_file,
char *main_input_filename));
extern void dwarfout_finish PROTO ((void));
extern void dwarfout_define PROTO ((unsigned, char *));
extern void dwarfout_undef PROTO ((unsigned, char *));
extern void dwarfout_file_scope_decl PROTO ((tree , int));
extern void dwarfout_start_new_source_file PROTO ((char *));
extern void dwarfout_resume_previous_source_file PROTO((unsigned));
extern void dwarfout_begin_function PROTO ((void));
extern void dwarfout_end_function PROTO ((void));
extern void dwarfout_begin_epilogue PROTO ((void));
extern void dwarfout_end_epilogue PROTO ((void));
extern void dwarfout_begin_block PROTO ((unsigned));
extern void dwarfout_end_block PROTO ((unsigned));
#ifdef RTX_CODE
extern void dwarfout_label PROTO ((rtx));
#endif
extern void dwarfout_line PROTO ((char *, unsigned));

View File

@ -73,28 +73,10 @@ Boston, MA 02111-1307, USA. */
extern struct obstack *rtl_obstack;
/* END CYGNUS LOCAL */
/* Get N_SLINE and N_SOL from stab.h if we can expect the file to exist. */
#ifdef DWARF_DEBUGGING_INFO
#include "dwarfout.h"
#endif
#if defined (DWARF2_UNWIND_INFO) || defined (DWARF2_DEBUGGING_INFO)
#include "dwarf2out.h"
#endif
/* .stabd code for line number. */
#ifndef N_SLINE
#define N_SLINE 0x44
#endif
/* .stabs code for included file name. */
#ifndef N_SOL
#define N_SOL 0x84
#endif
#ifndef INT_TYPE_SIZE
#define INT_TYPE_SIZE BITS_PER_WORD
#endif
@ -1392,10 +1374,6 @@ final_end_function (first, file, optimize)
app_on = 0;
}
#ifdef DWARF_DEBUGGING_INFO
if (write_symbols == DWARF_DEBUG)
dwarfout_end_function ();
#endif
#ifdef FUNCTION_EPILOGUE
/* Finally, output the function epilogue:
@ -1403,10 +1381,6 @@ final_end_function (first, file, optimize)
FUNCTION_EPILOGUE (file, get_frame_size ());
#endif
#ifdef DWARF_DEBUGGING_INFO
if (write_symbols == DWARF_DEBUG)
dwarfout_end_epilogue ();
#endif
#if defined (DWARF2_UNWIND_INFO) || defined (DWARF2_DEBUGGING_INFO)
if (dwarf2out_do_frame ())
@ -1609,12 +1583,6 @@ final_scan_insn (insn, file, optimize, prescan, nopeepholes)
break;
if (NOTE_LINE_NUMBER (insn) == NOTE_INSN_FUNCTION_BEG)
{
#ifdef DWARF_DEBUGGING_INFO
/* This outputs a marker where the function body starts, so it
must be after the prologue. */
if (write_symbols == DWARF_DEBUG)
dwarfout_begin_function ();
#endif
break;
}
if (NOTE_LINE_NUMBER (insn) == NOTE_INSN_DELETED)
@ -1653,10 +1621,6 @@ final_scan_insn (insn, file, optimize, prescan, nopeepholes)
/* Output debugging info about the symbol-block beginning. */
#ifdef DWARF_DEBUGGING_INFO
if (write_symbols == DWARF_DEBUG)
dwarfout_begin_block (next_block_index);
#endif
#ifdef DWARF2_DEBUGGING_INFO
if (write_symbols == DWARF2_DEBUG)
dwarf2out_begin_block (next_block_index);
@ -1678,10 +1642,6 @@ final_scan_insn (insn, file, optimize, prescan, nopeepholes)
abort ();
/* CYGNUS LOCAL LRS */
#ifdef DWARF_DEBUGGING_INFO
if (write_symbols == DWARF_DEBUG)
dwarfout_end_block (pending_blocks[block_depth].number);
#endif
#ifdef DWARF2_DEBUGGING_INFO
if (write_symbols == DWARF2_DEBUG)
dwarf2out_end_block (pending_blocks[block_depth].number);
@ -1692,10 +1652,6 @@ final_scan_insn (insn, file, optimize, prescan, nopeepholes)
&& (debug_info_level == DINFO_LEVEL_NORMAL
|| debug_info_level == DINFO_LEVEL_VERBOSE))
{
#ifdef DWARF_DEBUGGING_INFO
if (write_symbols == DWARF_DEBUG)
dwarfout_label (insn);
#endif
#ifdef DWARF2_DEBUGGING_INFO
if (write_symbols == DWARF2_DEBUG)
dwarf2out_label (insn);
@ -1808,10 +1764,6 @@ final_scan_insn (insn, file, optimize, prescan, nopeepholes)
FINAL_PRESCAN_INSN (insn, NULL_PTR, 0);
#endif
#ifdef DWARF_DEBUGGING_INFO
if (write_symbols == DWARF_DEBUG && LABEL_NAME (insn))
dwarfout_label (insn);
#endif
#ifdef DWARF2_DEBUGGING_INFO
if (write_symbols == DWARF2_DEBUG && LABEL_NAME (insn))
dwarf2out_label (insn);
@ -2416,10 +2368,6 @@ output_source_line (file, insn)
#ifdef DWARF_DEBUGGING_INFO
if (write_symbols == DWARF_DEBUG)
dwarfout_line (filename, NOTE_LINE_NUMBER (insn));
#endif
#ifdef DWARF2_DEBUGGING_INFO
if (write_symbols == DWARF2_DEBUG)

View File

@ -1,142 +0,0 @@
/* Machine-independent I/O routines for gcov.
Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
Contributed by Bob Manson <manson@cygnus.com>.
This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU CC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#ifndef GCOV_IO_H
#define GCOV_IO_H
#include <stdio.h>
#include <sys/types.h>
static int __fetch_long PROTO ((long *, char *, size_t));
static int __store_long PROTO ((long, char *, size_t));
static int __read_long PROTO ((long *, FILE *, size_t));
static int __write_long PROTO ((long, FILE *, size_t));
/* These routines only work for signed values. */
/* Store a portable representation of VALUE in DEST using BYTES*8-1 bits.
Return a non-zero value if VALUE requires more than BYTES*8-1 bits
to store. */
static int
__store_long (value, dest, bytes)
long value;
char *dest;
size_t bytes;
{
int upper_bit = (value < 0 ? 128 : 0);
size_t i;
if (value < 0)
{
long oldvalue = value;
value = -value;
if (oldvalue != -value)
return 1;
}
for(i = 0 ; i < (sizeof (value) < bytes ? sizeof (value) : bytes) ; i++) {
dest[i] = value & (i == (bytes - 1) ? 127 : 255);
value = value / 256;
}
if (value && value != -1)
return 1;
for(; i < bytes ; i++)
dest[i] = 0;
dest[bytes - 1] |= upper_bit;
return 0;
}
/* Retrieve a quantity containing BYTES*8-1 bits from SOURCE and store
the result in DEST. Returns a non-zero value if the value in SOURCE
will not fit in DEST. */
static int
__fetch_long (dest, source, bytes)
long *dest;
char *source;
size_t bytes;
{
long value = 0;
int i;
for (i = bytes - 1; (size_t) i > (sizeof (*dest) - 1); i--)
if (source[i] & ((size_t) i == (bytes - 1) ? 127 : 255 ))
return 1;
for (; i >= 0; i--)
value = value * 256 + (source[i] & ((size_t)i == (bytes - 1) ? 127 : 255));
if ((source[bytes - 1] & 128) && (value > 0))
value = - value;
*dest = value;
return 0;
}
/* Write a BYTES*8-bit quantity to FILE, portably. Returns a non-zero
value if the write fails, or if VALUE can't be stored in BYTES*8
bits.
Note that VALUE may not actually be large enough to hold BYTES*8
bits, but BYTES characters will be written anyway.
BYTES may be a maximum of 10. */
static int
__write_long (value, file, bytes)
long value;
FILE *file;
size_t bytes;
{
char c[10];
if (bytes > 10 || __store_long (value, c, bytes))
return 1;
else
return fwrite(c, 1, bytes, file) != bytes;
}
/* Read a quantity containing BYTES bytes from FILE, portably. Return
a non-zero value if the read fails or if the value will not fit
in DEST.
Note that DEST may not be large enough to hold all of the requested
data, but the function will read BYTES characters anyway.
BYTES may be a maximum of 10. */
static int
__read_long (dest, file, bytes)
long *dest;
FILE *file;
size_t bytes;
{
char c[10];
if (bytes > 10 || fread(c, 1, bytes, file) != bytes)
return 1;
else
return __fetch_long (dest, c, bytes);
}
#endif

View File

@ -1,17 +0,0 @@
#ifndef __GNU_STAB__
/* Indicate the GNU stab.h is in use. */
#define __GNU_STAB__
#define __define_stab(NAME, CODE, STRING) NAME=CODE,
enum __stab_debug_code
{
#include "stab.def"
LAST_UNUSED_STAB_CODE
};
#undef __define_stab
#endif /* __GNU_STAB_ */

View File

@ -1,86 +0,0 @@
/* For cross compilation, use the portable definitions from the COFF
documentation. */
#define __GNU_SYMS__
enum sdb_storage_class
{
C_EFCN = -1,
C_NULL = 0,
C_AUTO = 1,
C_EXT = 2,
C_STAT = 3,
C_REG = 4,
C_EXTDEF = 5,
C_LABEL = 6,
C_ULABEL = 7,
C_MOS = 8,
C_ARG = 9,
C_STRTAG = 10,
C_MOU = 11,
C_UNTAG = 12,
C_TPDEF = 13,
C_USTATIC = 14,
C_ENTAG = 15,
C_MOE = 16,
C_REGPARM = 17,
C_FIELD = 18,
C_BLOCK = 100,
C_FCN = 101,
C_EOS = 102,
C_FILE = 103,
C_LINE = 104,
C_ALIAS = 105,
C_HIDDEN = 106
};
enum sdb_type
{
T_NULL = 0,
T_ARG = 1,
T_VOID = 1,
T_CHAR = 2,
T_SHORT = 3,
T_INT = 4,
T_LONG = 5,
T_FLOAT = 6,
T_DOUBLE = 7,
T_STRUCT = 8,
T_UNION = 9,
T_ENUM = 10,
T_MOE = 11,
T_UCHAR = 12,
T_USHORT = 13,
T_UINT = 14,
T_ULONG = 15
#ifdef EXTENDED_SDB_BASIC_TYPES
, T_LNGDBL = 16
#endif
};
enum sdb_type_class
{
DT_NON = 0,
DT_PTR = 1,
DT_FCN = 2,
DT_ARY = 3
};
enum sdb_masks
{
#ifdef EXTENDED_SDB_BASIC_TYPES
N_BTMASK = 0x1f,
N_TMASK = 0x60,
N_TMASK1 = 0x300,
N_TMASK2 = 0x360,
N_BTSHFT = 5,
#else
N_BTMASK = 017,
N_TMASK = 060,
N_TMASK1 = 0300,
N_TMASK2 = 0360,
N_BTSHFT = 4,
#endif
N_TSHIFT = 2
};

View File

@ -1,150 +0,0 @@
/* Compile this one with gcc. */
/* Copyright (C) 1997 Free Software Foundation, Inc.
This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU CC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* As a special exception, if you link this library with other files,
some of which are compiled with GCC, to produce an executable,
this library does not by itself cause the resulting executable
to be covered by the GNU General Public License.
This exception does not however invalidate any other reasons why
the executable file might be covered by the GNU General Public License. */
#ifndef __gthr_dce_h
#define __gthr_dce_h
/* DCE threads interface.
DCE threads are based on POSIX threads draft 4, and many things
have changed since then. */
#define __GTHREADS 1
#include <pthread.h>
typedef pthread_key_t __gthread_key_t;
typedef pthread_once_t __gthread_once_t;
typedef pthread_mutex_t __gthread_mutex_t;
#define __GTHREAD_ONCE_INIT pthread_once_init
/* Howto define __GTHREAD_MUTEX_INIT? */
#if SUPPORTS_WEAK && GTHREAD_USE_WEAK
#pragma weak pthread_once
#pragma weak pthread_once_init
#pragma weak pthread_key_create
#pragma weak pthread_key_delete
#pragma weak pthread_getspecific
#pragma weak pthread_setspecific
#pragma weak pthread_create
#pragma weak pthread_mutex_lock
#pragma weak pthread_mutex_trylock
#pragma weak pthread_mutex_unlock
static void *__gthread_active_ptr = &pthread_create;
static inline int
__gthread_active_p ()
{
return __gthread_active_ptr != 0;
}
#else /* not SUPPORTS_WEAK */
static inline int
__gthread_active_p ()
{
return 1;
}
#endif /* SUPPORTS_WEAK */
static inline int
__gthread_once (__gthread_once_t *once, void (*func) ())
{
if (__gthread_active_p ())
return pthread_once (once, func);
else
return -1;
}
static inline int
__gthread_key_create (__gthread_key_t *key, void (*dtor) (void *))
{
return pthread_keycreate (key, dtor);
}
static inline int
__gthread_key_dtor (__gthread_key_t key, void *ptr)
{
/* Nothing needed. */
return 0;
}
static inline int
__gthread_key_delete (__gthread_key_t key)
{
return pthread_key_delete (key);
}
static inline void *
__gthread_getspecific (__gthread_key_t key)
{
void *ptr;
if (pthread_getspecific (key, &ptr) == 0)
return ptr;
else
return 0;
}
static inline int
__gthread_setspecific (__gthread_key_t key, const void *ptr)
{
return pthread_setspecific (key, (void *) ptr);
}
static inline int
__gthread_mutex_lock (__gthread_mutex_t *mutex)
{
if (__gthread_active_p ())
return pthread_mutex_lock (mutex);
else
return 0;
}
static inline int
__gthread_mutex_trylock (__gthread_mutex_t *mutex)
{
if (__gthread_active_p ())
return pthread_mutex_trylock (mutex);
else
return 0;
}
static inline int
__gthread_mutex_unlock (__gthread_mutex_t *mutex)
{
if (__gthread_active_p ())
return pthread_mutex_unlock (mutex);
else
return 0;
}
#endif /* not __gthr_dce_h */

View File

@ -1,147 +0,0 @@
/* Threads compatibily routines for libgcc2. */
/* Compile this one with gcc. */
/* Copyright (C) 1997 Free Software Foundation, Inc.
This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU CC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* As a special exception, if you link this library with other files,
some of which are compiled with GCC, to produce an executable,
this library does not by itself cause the resulting executable
to be covered by the GNU General Public License.
This exception does not however invalidate any other reasons why
the executable file might be covered by the GNU General Public License. */
#ifndef __gthr_posix_h
#define __gthr_posix_h
/* POSIX threads specific definitions.
Easy, since the interface is just one-to-one mapping. */
#define __GTHREADS 1
#include <pthread.h>
typedef pthread_key_t __gthread_key_t;
typedef pthread_once_t __gthread_once_t;
typedef pthread_mutex_t __gthread_mutex_t;
#define __GTHREAD_MUTEX_INIT PTHREAD_MUTEX_INITIALIZER
#define __GTHREAD_ONCE_INIT PTHREAD_ONCE_INIT
#if SUPPORTS_WEAK && GTHREAD_USE_WEAK
#pragma weak pthread_once
#pragma weak pthread_key_create
#pragma weak pthread_key_delete
#pragma weak pthread_getspecific
#pragma weak pthread_setspecific
#pragma weak pthread_create
#pragma weak pthread_mutex_lock
#pragma weak pthread_mutex_trylock
#pragma weak pthread_mutex_unlock
static void *__gthread_active_ptr = &pthread_create;
static inline int
__gthread_active_p ()
{
return __gthread_active_ptr != 0;
}
#else /* not SUPPORTS_WEAK */
static inline int
__gthread_active_p ()
{
return 1;
}
#endif /* SUPPORTS_WEAK */
static inline int
__gthread_once (__gthread_once_t *once, void (*func) ())
{
if (__gthread_active_p ())
return pthread_once (once, func);
else
return -1;
}
static inline int
__gthread_key_create (__gthread_key_t *key, void (*dtor) (void *))
{
return pthread_key_create (key, dtor);
}
static inline int
__gthread_key_dtor (__gthread_key_t key, void *ptr)
{
/* Just reset the key value to zero. */
if (ptr)
return pthread_setspecific (key, 0);
else
return 0;
}
static inline int
__gthread_key_delete (__gthread_key_t key)
{
return pthread_key_delete (key);
}
static inline void *
__gthread_getspecific (__gthread_key_t key)
{
return pthread_getspecific (key);
}
static inline int
__gthread_setspecific (__gthread_key_t key, const void *ptr)
{
return pthread_setspecific (key, ptr);
}
static inline int
__gthread_mutex_lock (__gthread_mutex_t *mutex)
{
if (__gthread_active_p ())
return pthread_mutex_lock (mutex);
else
return 0;
}
static inline int
__gthread_mutex_trylock (__gthread_mutex_t *mutex)
{
if (__gthread_active_p ())
return pthread_mutex_trylock (mutex);
else
return 0;
}
static inline int
__gthread_mutex_unlock (__gthread_mutex_t *mutex)
{
if (__gthread_active_p ())
return pthread_mutex_unlock (mutex);
else
return 0;
}
#endif /* not __gthr_posix_h */

View File

@ -1,152 +0,0 @@
/* CYGNUS LOCAL java quickthreads (entire file) */
/* Threads compatibility routines for libgcc2. */
/* Compile this one with gcc. */
/* Copyright (C) 1998 Free Software Foundation, Inc.
This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU CC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* As a special exception, if you link this library with other files,
some of which are compiled with GCC, to produce an executable,
this library does not by itself cause the resulting executable
to be covered by the GNU General Public License.
This exception does not however invalidate any other reasons why
the executable file might be covered by the GNU General Public License. */
#ifndef __gthr_qt_h
#define __gthr_qt_h
/* Cooperative threads package based on QuickThreads. */
#define __GTHREADS 1
#include <coop.h>
typedef int __gthread_key_t;
typedef void *__gthread_once_t;
typedef coop_m __gthread_mutex_t;
#define __GTHREAD_MUTEX_INIT_FUNCTION coop_mutex_init
#define __GTHREAD_ONCE_INIT 0
#if SUPPORTS_WEAK && GTHREAD_USE_WEAK
#pragma weak coop_once
#pragma weak coop_key_create
#pragma weak coop_key_destroy
#pragma weak coop_getspecific
#pragma weak coop_setspecific
#pragma weak coop_create
#pragma weak coop_mutex_init
#pragma weak coop_mutex_lock
#pragma weak coop_mutex_trylock
#pragma weak coop_mutex_unlock
static void *__gthread_active_ptr = &coop_create;
static inline int
__gthread_active_p ()
{
return __gthread_active_ptr != 0;
}
#else /* not SUPPORTS_WEAK */
static inline int
__gthread_active_p ()
{
return 1;
}
#endif /* SUPPORTS_WEAK */
static inline int
__gthread_once (__gthread_once_t *once, void (*func) ())
{
if (__gthread_active_p ())
{
coop_once (once, func);
return 0;
}
else
return -1;
}
static inline int
__gthread_key_create (__gthread_key_t *key, void (*dtor) (void *))
{
*key = coop_key_create (dtor);
return 0;
}
static inline int
__gthread_key_dtor (__gthread_key_t key, void *ptr)
{
/* Just reset the key value to zero. */
if (ptr)
coop_setspecific (0, key, 0);
return 0;
}
static inline int
__gthread_key_delete (__gthread_key_t key)
{
coop_key_destroy (key);
return 0;
}
static inline void *
__gthread_getspecific (__gthread_key_t key)
{
return coop_getspecific (key);
}
static inline int
__gthread_setspecific (__gthread_key_t key, const void *ptr)
{
coop_setspecific (0, key, ptr);
return 0;
}
static inline int
__gthread_mutex_lock (__gthread_mutex_t *mutex)
{
if (__gthread_active_p ())
coop_mutex_lock (mutex);
return 0;
}
static inline int
__gthread_mutex_trylock (__gthread_mutex_t *mutex)
{
if (__gthread_active_p ())
return coop_mutex_trylock (mutex);
else
return 0;
}
static inline int
__gthread_mutex_unlock (__gthread_mutex_t *mutex)
{
if (__gthread_active_p ())
coop_mutex_unlock (mutex);
return 0;
}
#endif /* __gthr_qt_h */

View File

@ -1,62 +0,0 @@
/* Threads compatibily routines for libgcc2. */
/* Compile this one with gcc. */
/* Copyright (C) 1997 Free Software Foundation, Inc.
This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU CC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* As a special exception, if you link this library with other files,
some of which are compiled with GCC, to produce an executable,
this library does not by itself cause the resulting executable
to be covered by the GNU General Public License.
This exception does not however invalidate any other reasons why
the executable file might be covered by the GNU General Public License. */
#ifndef __gthr_single_h
#define __gthr_single_h
/* Just provide compatibility for mutex handling. */
typedef int __gthread_mutex_t;
#define __GTHREAD_MUTEX_INIT 0
static inline int
__gthread_active_p ()
{
return 0;
}
static inline int
__gthread_mutex_lock (__gthread_mutex_t *mutex __attribute__ ((__unused__)))
{
return 0;
}
static inline int
__gthread_mutex_trylock (__gthread_mutex_t *mutex __attribute__ ((__unused__)))
{
return 0;
}
static inline int
__gthread_mutex_unlock (__gthread_mutex_t *mutex __attribute__ ((__unused__)))
{
return 0;
}
#endif /* not __gthr_single_h */

View File

@ -1,177 +0,0 @@
/* Threads compatibily routines for libgcc2. */
/* Compile this one with gcc. */
/* Copyright (C) 1997 Free Software Foundation, Inc.
This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU CC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* As a special exception, if you link this library with other files,
some of which are compiled with GCC, to produce an executable,
this library does not by itself cause the resulting executable
to be covered by the GNU General Public License.
This exception does not however invalidate any other reasons why
the executable file might be covered by the GNU General Public License. */
#ifndef __gthr_solaris_h
#define __gthr_solaris_h
/* Solaris threads as found in Solaris 2.[456].
Actually these are Unix International (UI) threads, but I don't
know if anyone else implements these. */
#define __GTHREADS 1
#include <thread.h>
#include <errno.h>
typedef thread_key_t __gthread_key_t;
typedef struct
{
mutex_t mutex;
int once;
} __gthread_once_t;
typedef mutex_t __gthread_mutex_t;
#define __GTHREAD_ONCE_INIT { DEFAULTMUTEX, 0 }
#define __GTHREAD_MUTEX_INIT DEFAULTMUTEX
#if SUPPORTS_WEAK && GTHREAD_USE_WEAK
#pragma weak thr_keycreate
#pragma weak thr_getspecific
#pragma weak thr_setspecific
#pragma weak thr_create
#pragma weak mutex_lock
#pragma weak mutex_trylock
#pragma weak mutex_unlock
/* This will not actually work in Solaris 2.5, since libc contains
dummy symbols of all thr_* routines. */
static void *__gthread_active_ptr = &thr_create;
static inline int
__gthread_active_p ()
{
return __gthread_active_ptr != 0;
}
#else /* not SUPPORTS_WEAK */
static inline int
__gthread_active_p ()
{
return 1;
}
#endif /* SUPPORTS_WEAK */
static inline int
__gthread_once (__gthread_once_t *once, void (*func) ())
{
if (! __gthread_active_p ())
return -1;
if (once == 0 || func == 0)
return EINVAL;
if (once->once == 0)
{
int status = mutex_lock (&once->mutex);
if (status != 0)
return status;
if (once->once == 0)
{
(*func) ();
once->once ++;
}
mutex_unlock (&once->mutex);
}
return 0;
}
static inline int
__gthread_key_create (__gthread_key_t *key, void (*dtor) (void *))
{
/* Solaris 2.5 contains thr_* routines no-op in libc, so test if we actually
got a reasonable key value, and if not, fail. */
*key = -1;
if (thr_keycreate (key, dtor) != 0 || *key == -1)
return -1;
else
return 0;
}
static inline int
__gthread_key_dtor (__gthread_key_t key, void *ptr)
{
/* Nothing needed. */
return 0;
}
static inline int
__gthread_key_delete (__gthread_key_t key)
{
/* Not possible. */
return -1;
}
static inline void *
__gthread_getspecific (__gthread_key_t key)
{
void *ptr;
if (thr_getspecific (key, &ptr) == 0)
return ptr;
else
return 0;
}
static inline int
__gthread_setspecific (__gthread_key_t key, const void *ptr)
{
return thr_setspecific (key, (void *) ptr);
}
static inline int
__gthread_mutex_lock (__gthread_mutex_t *mutex)
{
if (__gthread_active_p ())
return mutex_lock (mutex);
else
return 0;
}
static inline int
__gthread_mutex_trylock (__gthread_mutex_t *mutex)
{
if (__gthread_active_p ())
return mutex_trylock (mutex);
else
return 0;
}
static inline int
__gthread_mutex_unlock (__gthread_mutex_t *mutex)
{
if (__gthread_active_p ())
return mutex_unlock (mutex);
else
return 0;
}
#endif /* not __gthr_solaris_h */

View File

@ -1,142 +0,0 @@
/* Threads compatibily routines for libgcc2 for VxWorks. */
/* Compile this one with gcc. */
/* Copyright (C) 1997 Free Software Foundation, Inc.
Contributed by Mike Stump <mrs@wrs.com>.
This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU CC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* As a special exception, if you link this library with other files,
some of which are compiled with GCC, to produce an executable,
this library does not by itself cause the resulting executable
to be covered by the GNU General Public License.
This exception does not however invalidate any other reasons why
the executable file might be covered by the GNU General Public License. */
#ifndef __gthr_vxworks_h
#define __gthr_vxworks_h
/* POSIX threads specific definitions.
Easy, since the interface is just one-to-one mapping. */
#define __GTHREADS 1
#include <vxWorks.h>
#include <semLib.h>
/* typedef void *SEM_ID; */
typedef int __gthread_key_t;
typedef char __gthread_once_t;
typedef SEM_ID __gthread_mutex_t;
#define __GTHREAD_MUTEX_INIT 0
#define __GTHREAD_ONCE_INIT 0
#ifndef REG_SAVED_REG
static inline int
__gthread_once (__gthread_once_t *once, void (*func) ())
{
(*func)();
return 0;
}
extern __gthread_key_t eh_context_key;
/* This is not the right way to do it, but the semantic of pthreads
don't map well enough onto VxWorks. */
static void
__ehdtor (void *pTcb)
{
int tid = (int) pTcb;
void *p = (void*)taskVarGet(tid, &eh_context_key);
if (p != (void*)-1)
{
if (p)
free (p);
taskVarSet(tid, &eh_context_key, 0);
}
}
/* This only works for the code in libgcc2.c. */
static inline int
__gthread_key_create (__gthread_key_t *key, void (*dtor) (void *))
{
*key = 0;
/* Do this first so that the task variables are visible during the
running of the delete hook. */
taskVarInit();
/* We don't have a way to track dtor here, so instead, we
register a generic routine that can cleanup any task. */
taskDeleteHookAdd (__ehdtor);
return 0;
}
#define __gthread_setspecific(key, ptr) \
(key = (int) ptr, 0)
static inline int
__gthread_key_dtor (__gthread_key_t key, void *ptr)
{
/* Just reset the key value to zero. */
if (ptr)
return __gthread_setspecific (key, 0);
else
return 0;
}
#define __gthread_key_delete(key) \
taskVarDelete (taskIdSelf (), &key)
#define __gthread_getspecific(key) \
((key == 0) \
? ((taskVarAdd (taskIdSelf (), &key) != OK) \
? (__terminate (), (void*)0) \
: (void*)0) \
: (void*)key)
#endif
static inline int
__gthread_mutex_lock (__gthread_mutex_t *mutex)
{
if (*mutex == 0)
*mutex = semMCreate (SEM_Q_PRIORITY | SEM_INVERSION_SAFE | SEM_DELETE_SAFE);
return semTake (*mutex, WAIT_FOREVER);
}
static inline int
__gthread_mutex_trylock (__gthread_mutex_t *mutex)
{
if (*mutex == 0)
*mutex = semMCreate (SEM_Q_PRIORITY | SEM_INVERSION_SAFE | SEM_DELETE_SAFE);
return semTake (*mutex, NO_WAIT);
}
static inline int
__gthread_mutex_unlock (__gthread_mutex_t *mutex)
{
/* We could return the */
return semGive (*mutex);
}
#endif /* not __gthr_vxworks_h */

View File

@ -1,105 +0,0 @@
/* Threads compatibily routines for libgcc2. */
/* Compile this one with gcc. */
/* Copyright (C) 1997, 1998 Free Software Foundation, Inc.
This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU CC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* As a special exception, if you link this library with other files,
some of which are compiled with GCC, to produce an executable,
this library does not by itself cause the resulting executable
to be covered by the GNU General Public License.
This exception does not however invalidate any other reasons why
the executable file might be covered by the GNU General Public License. */
#ifndef __gthr_h
#define __gthr_h
/* If this file is compiled with threads support, it must
#define __GTHREADS 1
to indicate that threads support is present. Also it has define
function
int __gthread_active_p ()
that returns 1 if thread system is active, 0 if not.
The threads interface must define the following types:
__gthread_key_t
__gthread_once_t
__gthread_mutex_t
The threads interface must define the following macros:
__GTHREAD_ONCE_INIT
to initialize __gthread_once_t
__GTHREAD_MUTEX_INIT
to initialize __gthread_mutex_t to get a fast
non-recursive mutex.
__GTHREAD_MUTEX_INIT_FUNCTION
some systems can't initalize a mutex without a
function call. On such systems, define this to a
function which looks like this:
void __GTHREAD_MUTEX_INIT_FUNCTION (__gthread_mutex_t *)
Don't define __GTHREAD_MUTEX_INIT in this case
The threads interface must define the following static functions:
int __gthread_once (__gthread_once_t *once, void (*func) ())
int __gthread_key_create (__gthread_key_t *keyp, void (*dtor) (void *))
int __gthread_key_delete (__gthread_key_t key)
int __gthread_key_dtor (__gthread_key_t key, void *ptr)
void *__gthread_getspecific (__gthread_key_t key)
int __gthread_setspecific (__gthread_key_t key, const void *ptr)
int __gthread_mutex_lock (__gthread_mutex_t *mutex);
int __gthread_mutex_trylock (__gthread_mutex_t *mutex);
int __gthread_mutex_unlock (__gthread_mutex_t *mutex);
All functions returning int should return zero on success or the error
number. If the operation is not supported, -1 is returned.
Currently supported threads packages are
POSIX threads with -D_PTHREADS
DCE threads with -D_DCE_THREADS
Solaris/UI threads with -D_SOLARIS_THREADS
*/
/* Check first for thread specific defines. */
#if _PTHREADS
#include "gthr-posix.h"
#elif _DCE_THREADS
#include "gthr-dce.h"
#elif _SOLARIS_THREADS
#include "gthr-solaris.h"
/* Include GTHREAD_FILE if one is defined. */
#elif defined(HAVE_GTHR_DEFAULT)
#if SUPPORTS_WEAK
#ifndef GTHREAD_USE_WEAK
#define GTHREAD_USE_WEAK 1
#endif
#endif
#include "gthr-default.h"
/* Fallback to single thread definitions. */
#else
#include "gthr-single.h"
#endif
#endif /* not __gthr_h */

View File

@ -1,39 +0,0 @@
#!/bin/sh
# $Id: just-fixinc,v 1.42 1998/11/11 05:49:02 law Exp $
# This script exists for use after installing
# the GCC binaries from a distribution tape/CD-ROM.
# Use it *after* copying the directory of binaries
# to the proper installed location.
# It runs fixincludes (or fixinc.svr4, if appropriate) to correct bugs in
# the system header files.
# This script needs to be customized for each type of installation so that
# others may run it after the installation-sans-fixincludes is completed.
# The corrected header files go in the GCC installation directory
# so that only GCC sees them.
# This script does not modify the original header files in /usr/include.
# It only modifies copies in the GCC installation directory.
installed=/opt/gnu/lib/gcc-lib/sparc-sun-solaris2/2.6.0
cd $installed/include
rmdir tmpfoo > /dev/null 2>&1
mkdir tmpfoo
mv va-sparc.h varargs.h stdarg.h stddef.h limits.h float.h proto.h tmpfoo
$installed/fixinc.svr4 $installed/include /usr/include $installed
# Make sure fixed native limits.h gets renamed to syslimits.h before gcc's
# limits.h from tmpfoo is moved back.
rm -f syslimits.h
if test -f limits.h ; then
mv limits.h syslimits.h
else
cp $installed/gsyslimits.h syslimits.h
fi
chmod a+r syslimits.h
mv tmpfoo/* .
rmdir tmpfoo
# eof

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,69 +0,0 @@
#!/bin/sh
# patch-apollo-includes -- fix some (but not all!) Apollo brain damage.
FILES_TO_PATCH='sys/types.h setjmp.h'
mkdir sys
for i in $FILES_TO_PATCH;
do
cp /bsd4.3/usr/include/$i ./$i
done
patch -b -apollo <<'EOP'
*** /bsd4.3/usr/include/sys/types.h Fri Apr 8 20:29:06 1988
--- sys/types.h Wed Feb 26 21:17:57 1992
***************
*** 38,44 ****
--- 38,47 ----
typedef char * caddr_t;
typedef u_long ino_t;
typedef long swblk_t;
+ #ifndef _SIZE_T
+ #define _SIZE_T
typedef long size_t;
+ #endif
typedef long time_t;
typedef long dev_t;
typedef long off_t;
*** /bsd4.3/usr/include/setjmp.h Fri Feb 3 21:40:21 1989
--- setjmp.h Sun Feb 23 19:06:55 1992
***************
*** 24,30 ****
--- 24,39 ----
#endif
+ #ifdef __GNUC__
#ifdef _PROTOTYPES
+ extern int sigsetjmp (sigjmp_buf env, int savemask);
+ extern void siglongjmp (sigjmp_buf env, int val);
+ #else
+ extern int sigsetjmp();
+ extern void siglongjmp();
+ #endif /* _PROTOTYPES */
+ #else /* not __GNUC__ */
+ #ifdef _PROTOTYPES
extern int sigsetjmp(
sigjmp_buf env,
int savemask
***************
*** 37,43 ****
extern int sigsetjmp() #options(abnormal);
extern void siglongjmp() #options(noreturn);
#endif /* _PROTOTYPES */
!
#undef _PROTOTYPES
#ifdef __cplusplus
--- 46,52 ----
extern int sigsetjmp() #options(abnormal);
extern void siglongjmp() #options(noreturn);
#endif /* _PROTOTYPES */
! #endif /* not __GNUC__ */
#undef _PROTOTYPES
#ifdef __cplusplus
EOP
exit 0

View File

@ -1 +0,0 @@
main(){char*p="main(){char*p=%c%s%c;(void)printf(p,34,p,34,10);}%c";(void)printf(p,34,p,34,10);}

View File

@ -1 +0,0 @@
main(a){a="main(a){a=%c%s%c;printf(a,34,a,34);}";printf(a,34,a,34);}

View File

@ -1 +0,0 @@
main(){char*a="main(){char*a=%c%s%c;int b='%c';printf(a,b,a,b,b);}";int b='"';printf(a,b,a,b,b);}

View File

@ -1 +0,0 @@
main(a){printf(a,34,a="main(a){printf(a,34,a=%c%s%c,34);}",34);}

View File

@ -1292,8 +1292,7 @@ range_finish (stream, first_insn, count, range_max_regno)
rtx before;
int new_scope_p = (write_symbols != NO_DEBUG /* create new scope */
&& flag_live_range_scope /* block for vars? */
&& (write_symbols != DBX_DEBUG
|| !LIVE_RANGE_GDBSTAB_P ()));
);
after = range_start;
before = range_end;

View File

@ -37,17 +37,9 @@ extern int range_max_unique;
/* Allow copies from constant integers */
#define LIVE_RANGE_COPYIN_CONST 0x4
/* Default value for using GDB specific stabs to denote live ranges */
#define LIVE_RANGE_GDB_DEFAULT 1
/* Default value for creating scoping blocks for live ranges */
#define LIVE_RANGE_SCOPE_DEFAULT 0
/* Determine whether or not to use new style stabs for live range debugging.
Assumes that write_symbols == DBX_DEBUG has already been checked for. */
#define LIVE_RANGE_GDBSTAB_P() (use_gnu_debug_info_extensions \
&& flag_live_range_gdb)
/* Live range functions */
#ifdef BUFSIZ
extern void live_range_print PROTO((FILE *, rtx, char *, char *));

File diff suppressed because it is too large Load Diff

View File

@ -1,39 +0,0 @@
/* sdbout.h - Various declarations for functions found in sdbout.c
Copyright (C) 1998 Free Software Foundation, Inc.
This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU CC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
extern void sdbout_init PROTO ((FILE *, char*, tree));
extern void sdbout_begin_function PROTO ((int));
extern void sdbout_end_function PROTO ((int));
extern void sdbout_begin_block PROTO ((FILE *, int, int));
extern void sdbout_end_block PROTO ((FILE *, int, int));
extern void sdbout_label PROTO ((rtx));
extern void sdbout_symbol PROTO ((tree, int));
extern void sdbout_toplevel_data PROTO ((tree));
extern void sdbout_types PROTO ((tree));
extern void sdbout_end_epilogue PROTO ((void));
extern void sdbout_start_new_source_file PROTO ((char *));
extern void sdbout_resume_previous_source_file PROTO ((void));
extern void sdbout_mark_begin_function PROTO ((void));

View File

@ -1,234 +0,0 @@
/* Table of DBX symbol codes for the GNU system.
Copyright (C) 1988, 1997, 1998 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If not,
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* This contains contribution from Cygnus Support. */
/* Global variable. Only the name is significant.
To find the address, look in the corresponding external symbol. */
__define_stab (N_GSYM, 0x20, "GSYM")
/* Function name for BSD Fortran. Only the name is significant.
To find the address, look in the corresponding external symbol. */
__define_stab (N_FNAME, 0x22, "FNAME")
/* Function name or text-segment variable for C. Value is its address.
Desc is supposedly starting line number, but GCC doesn't set it
and DBX seems not to miss it. */
__define_stab (N_FUN, 0x24, "FUN")
/* Data-segment variable with internal linkage. Value is its address.
"Static Sym". */
__define_stab (N_STSYM, 0x26, "STSYM")
/* BSS-segment variable with internal linkage. Value is its address. */
__define_stab (N_LCSYM, 0x28, "LCSYM")
/* Name of main routine. Only the name is significant.
This is not used in C. */
__define_stab (N_MAIN, 0x2a, "MAIN")
/* Global symbol in Pascal.
Supposedly the value is its line number; I'm skeptical. */
__define_stab (N_PC, 0x30, "PC")
/* Number of symbols: 0, files,,funcs,lines according to Ultrix V4.0. */
__define_stab (N_NSYMS, 0x32, "NSYMS")
/* "No DST map for sym: name, ,0,type,ignored" according to Ultrix V4.0. */
__define_stab (N_NOMAP, 0x34, "NOMAP")
/* New stab from Solaris. I don't know what it means, but it
don't seem to contain useful information. */
__define_stab (N_OBJ, 0x38, "OBJ")
/* New stab from Solaris. I don't know what it means, but it
don't seem to contain useful information. Possibly related to the
optimization flags used in this module. */
__define_stab (N_OPT, 0x3c, "OPT")
/* Register variable. Value is number of register. */
__define_stab (N_RSYM, 0x40, "RSYM")
/* Modula-2 compilation unit. Can someone say what info it contains? */
__define_stab (N_M2C, 0x42, "M2C")
/* Line number in text segment. Desc is the line number;
value is corresponding address. */
__define_stab (N_SLINE, 0x44, "SLINE")
/* Similar, for data segment. */
__define_stab (N_DSLINE, 0x46, "DSLINE")
/* Similar, for bss segment. */
__define_stab (N_BSLINE, 0x48, "BSLINE")
/* Sun's source-code browser stabs. ?? Don't know what the fields are.
Supposedly the field is "path to associated .cb file". THIS VALUE
OVERLAPS WITH N_BSLINE! */
__define_stab (N_BROWS, 0x48, "BROWS")
/* GNU Modula-2 definition module dependency. Value is the modification time
of the definition file. Other is non-zero if it is imported with the
GNU M2 keyword %INITIALIZE. Perhaps N_M2C can be used if there
are enough empty fields? */
__define_stab(N_DEFD, 0x4a, "DEFD")
/* THE FOLLOWING TWO STAB VALUES CONFLICT. Happily, one is for Modula-2
and one is for C++. Still,... */
/* GNU C++ exception variable. Name is variable name. */
__define_stab (N_EHDECL, 0x50, "EHDECL")
/* Modula2 info "for imc": name,,0,0,0 according to Ultrix V4.0. */
__define_stab (N_MOD2, 0x50, "MOD2")
/* GNU C++ `catch' clause. Value is its address. Desc is nonzero if
this entry is immediately followed by a CAUGHT stab saying what exception
was caught. Multiple CAUGHT stabs means that multiple exceptions
can be caught here. If Desc is 0, it means all exceptions are caught
here. */
__define_stab (N_CATCH, 0x54, "CATCH")
/* Structure or union element. Value is offset in the structure. */
__define_stab (N_SSYM, 0x60, "SSYM")
/* Name of main source file.
Value is starting text address of the compilation. */
__define_stab (N_SO, 0x64, "SO")
/* Automatic variable in the stack. Value is offset from frame pointer.
Also used for type descriptions. */
__define_stab (N_LSYM, 0x80, "LSYM")
/* Beginning of an include file. Only Sun uses this.
In an object file, only the name is significant.
The Sun linker puts data into some of the other fields. */
__define_stab (N_BINCL, 0x82, "BINCL")
/* Name of sub-source file (#include file).
Value is starting text address of the compilation. */
__define_stab (N_SOL, 0x84, "SOL")
/* Parameter variable. Value is offset from argument pointer.
(On most machines the argument pointer is the same as the frame pointer. */
__define_stab (N_PSYM, 0xa0, "PSYM")
/* End of an include file. No name.
This and N_BINCL act as brackets around the file's output.
In an object file, there is no significant data in this entry.
The Sun linker puts data into some of the fields. */
__define_stab (N_EINCL, 0xa2, "EINCL")
/* Alternate entry point. Value is its address. */
__define_stab (N_ENTRY, 0xa4, "ENTRY")
/* Beginning of lexical block.
The desc is the nesting level in lexical blocks.
The value is the address of the start of the text for the block.
The variables declared inside the block *precede* the N_LBRAC symbol. */
__define_stab (N_LBRAC, 0xc0, "LBRAC")
/* Place holder for deleted include file. Replaces a N_BINCL and everything
up to the corresponding N_EINCL. The Sun linker generates these when
it finds multiple identical copies of the symbols from an include file.
This appears only in output from the Sun linker. */
__define_stab (N_EXCL, 0xc2, "EXCL")
/* Modula-2 scope information. Can someone say what info it contains? */
__define_stab (N_SCOPE, 0xc4, "SCOPE")
/* End of a lexical block. Desc matches the N_LBRAC's desc.
The value is the address of the end of the text for the block. */
__define_stab (N_RBRAC, 0xe0, "RBRAC")
/* Begin named common block. Only the name is significant. */
__define_stab (N_BCOMM, 0xe2, "BCOMM")
/* End named common block. Only the name is significant
(and it should match the N_BCOMM). */
__define_stab (N_ECOMM, 0xe4, "ECOMM")
/* End common (local name): value is address.
I'm not sure how this is used. */
__define_stab (N_ECOML, 0xe8, "ECOML")
/* These STAB's are used on Gould systems for Non-Base register symbols
or something like that. FIXME. I have assigned the values at random
since I don't have a Gould here. Fixups from Gould folk welcome... */
__define_stab (N_NBTEXT, 0xF0, "NBTEXT")
__define_stab (N_NBDATA, 0xF2, "NBDATA")
__define_stab (N_NBBSS, 0xF4, "NBBSS")
__define_stab (N_NBSTS, 0xF6, "NBSTS")
__define_stab (N_NBLCS, 0xF8, "NBLCS")
/* Second symbol entry containing a length-value for the preceding entry.
The value is the length. */
__define_stab (N_LENG, 0xfe, "LENG")
/* The above information, in matrix format.
STAB MATRIX
_________________________________________________
| 00 - 1F are not dbx stab symbols |
| In most cases, the low bit is the EXTernal bit|
| 00 UNDEF | 02 ABS | 04 TEXT | 06 DATA |
| 01 |EXT | 03 |EXT | 05 |EXT | 07 |EXT |
| 08 BSS | 0A INDR | 0C FN_SEQ | 0E |
| 09 |EXT | 0B | 0D | 0F |
| 10 | 12 COMM | 14 SETA | 16 SETT |
| 11 | 13 | 15 | 17 |
| 18 SETD | 1A SETB | 1C SETV | 1E WARNING|
| 19 | 1B | 1D | 1F FN |
|_______________________________________________|
| Debug entries with bit 01 set are unused. |
| 20 GSYM | 22 FNAME | 24 FUN | 26 STSYM |
| 28 LCSYM | 2A MAIN | 2C | 2E |
| 30 PC | 32 NSYMS | 34 NOMAP | 36 |
| 38 OBJ | 3A | 3C OPT | 3E |
| 40 RSYM | 42 M2C | 44 SLINE | 46 DSLINE |
| 48 BSLINE*| 4A DEFD | 4C | 4E |
| 50 EHDECL*| 52 | 54 CATCH | 56 |
| 58 | 5A | 5C | 5E |
| 60 SSYM | 62 | 64 SO | 66 |
| 68 | 6A | 6C | 6E |
| 70 | 72 | 74 | 76 |
| 78 | 7A | 7C | 7E |
| 80 LSYM | 82 BINCL | 84 SOL | 86 |
| 88 | 8A | 8C | 8E |
| 90 | 92 | 94 | 96 |
| 98 | 9A | 9C | 9E |
| A0 PSYM | A2 EINCL | A4 ENTRY | A6 |
| A8 | AA | AC | AE |
| B0 | B2 | B4 | B6 |
| B8 | BA | BC | BE |
| C0 LBRAC | C2 EXCL | C4 SCOPE | C6 |
| C8 | CA | CC | CE |
| D0 | D2 | D4 | D6 |
| D8 | DA | DC | DE |
| E0 RBRAC | E2 BCOMM | E4 ECOMM | E6 |
| E8 ECOML | EA | EC | EE |
| F0 | F2 | F4 | F6 |
| F8 | FA | FC | FE LENG |
+-----------------------------------------------+
* 50 EHDECL is also MOD2.
* 48 BSLINE is also BROWS.
*/

View File

@ -55,57 +55,13 @@ Boston, MA 02111-1307, USA. */
#include "range.h"
/* END CYGNUS LOCAL */
#ifdef DWARF_DEBUGGING_INFO
#include "dwarfout.h"
#endif
#if defined (DWARF2_UNWIND_INFO) || defined (DWARF2_DEBUGGING_INFO)
#include "dwarf2out.h"
#endif
#if defined(DBX_DEBUGGING_INFO) || defined(XCOFF_DEBUGGING_INFO)
#include "dbxout.h"
#endif
#ifdef SDB_DEBUGGING_INFO
#include "sdbout.h"
#endif
#ifdef XCOFF_DEBUGGING_INFO
#include "xcoffout.h"
#endif
#ifndef DEFAULT_GDB_EXTENSIONS
#define DEFAULT_GDB_EXTENSIONS 1
#endif
/* If more than one debugging type is supported, you must define
PREFERRED_DEBUGGING_TYPE to choose a format in a system-dependent way.
This is one long line cause VAXC can't handle a \-newline. */
#if 1 < (defined (DBX_DEBUGGING_INFO) + defined (SDB_DEBUGGING_INFO) + defined (DWARF_DEBUGGING_INFO) + defined (DWARF2_DEBUGGING_INFO) + defined (XCOFF_DEBUGGING_INFO))
#ifndef PREFERRED_DEBUGGING_TYPE
You Lose! You must define PREFERRED_DEBUGGING_TYPE!
#endif /* no PREFERRED_DEBUGGING_TYPE */
#else /* Only one debugging format supported. Define PREFERRED_DEBUGGING_TYPE
so the following code needn't care. */
#ifdef DBX_DEBUGGING_INFO
#define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
#endif
#ifdef SDB_DEBUGGING_INFO
#define PREFERRED_DEBUGGING_TYPE SDB_DEBUG
#endif
#ifdef DWARF_DEBUGGING_INFO
#define PREFERRED_DEBUGGING_TYPE DWARF_DEBUG
#endif
#ifdef DWARF2_DEBUGGING_INFO
#define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG
#endif
#ifdef XCOFF_DEBUGGING_INFO
#define PREFERRED_DEBUGGING_TYPE XCOFF_DEBUG
#endif
#endif /* More than one debugger format enabled. */
/* If still not defined, must have been because no debugging formats
are supported. */
@ -298,12 +254,6 @@ enum debug_info_type write_symbols = NO_DEBUG;
for the definitions of the different possible levels. */
enum debug_info_level debug_info_level = DINFO_LEVEL_NONE;
/* Nonzero means use GNU-only extensions in the generated symbolic
debugging information. */
/* Currently, this only has an effect when write_symbols is set to
DBX_DEBUG, XCOFF_DEBUG, or DWARF_DEBUG. */
int use_gnu_debug_info_extensions = 0;
/* Nonzero means do optimizations. -O.
Particular numeric values stand for particular amounts of optimization;
thus, -O2 stores 2 here. However, the optimizations beyond the basic
@ -698,9 +648,6 @@ int flag_unaligned_pointers = 0;
/* Enable live range splitting. */
int flag_live_range = 0;
/* Enable/disable using GDB extensions for denoting live ranges. */
int flag_live_range_gdb = LIVE_RANGE_GDB_DEFAULT;
/* Create scoping blocks for live ranges when debugging. */
int flag_live_range_scope = LIVE_RANGE_SCOPE_DEFAULT;
/* END CYGNUS LOCAL */
@ -747,32 +694,13 @@ static struct
/* Since PREFERRED_DEBUGGING_TYPE isn't necessarily a
constant expression, we use NO_DEBUG in its place. */
enum debug_info_type debug_type;
int use_extensions_p;
char * description;
} *da,
debug_args[] =
{
{ "g", NO_DEBUG, DEFAULT_GDB_EXTENSIONS,
"Generate default debug format output" },
{ "ggdb", NO_DEBUG, 1, "Generate default extended debug format output" },
#ifdef DBX_DEBUGGING_INFO
{ "gstabs", DBX_DEBUG, 0, "Generate STABS format debug output" },
{ "gstabs+", DBX_DEBUG, 1, "Generate extended STABS format debug output" },
#endif
#ifdef DWARF_DEBUGGING_INFO
{ "gdwarf", DWARF_DEBUG, 0, "Generate DWARF-1 format debug output"},
{ "gdwarf+", DWARF_DEBUG, 1,
"Generated extended DWARF-1 format debug output" },
#endif
{ "g", NO_DEBUG, "Generate default debug format output" },
#ifdef DWARF2_DEBUGGING_INFO
{ "gdwarf-2", DWARF2_DEBUG, 0, "Enable DWARF-2 debug output" },
#endif
#ifdef XCOFF_DEBUGGING_INFO
{ "gxcoff", XCOFF_DEBUG, 0, "Generate XCOFF format debug output" },
{ "gxcoff+", XCOFF_DEBUG, 1, "Generate extended XCOFF format debug output" },
#endif
#ifdef SDB_DEBUGGING_INFO
{ "gcoff", SDB_DEBUG, 0, "Generate COFF format debug output" },
{ "gdwarf-2", DWARF2_DEBUG, "Enable DWARF-2 debug output" },
#endif
{ 0, 0, 0, 0 }
};
@ -931,8 +859,6 @@ lang_independent_options f_options[] =
/* CYGNUS LOCAL LRS */
{"live-range", &flag_live_range, 1,
"Enable live range splitting" },
{"live-range-gdb", &flag_live_range_gdb, 1,
"Use GDB extensions to denote live ranges" },
{"live-range-scope", &flag_live_range_scope, 1,
"Create scope blocks for debugging live ranges"},
/* END CYGNUS LOCAL */
@ -2868,20 +2794,6 @@ compile_file (name)
/* If dbx symbol table desired, initialize writing it
and output the predefined types. */
#if defined (DBX_DEBUGGING_INFO) || defined (XCOFF_DEBUGGING_INFO)
if (write_symbols == DBX_DEBUG || write_symbols == XCOFF_DEBUG)
TIMEVAR (symout_time, dbxout_init (asm_out_file, main_input_filename,
getdecls ()));
#endif
#ifdef SDB_DEBUGGING_INFO
if (write_symbols == SDB_DEBUG)
TIMEVAR (symout_time, sdbout_init (asm_out_file, main_input_filename,
getdecls ()));
#endif
#ifdef DWARF_DEBUGGING_INFO
if (write_symbols == DWARF_DEBUG)
TIMEVAR (symout_time, dwarfout_init (asm_out_file, main_input_filename));
#endif
#ifdef DWARF2_UNWIND_INFO
if (dwarf2out_do_frame ())
dwarf2out_frame_init ();
@ -3073,37 +2985,6 @@ compile_file (name)
&& ! TREE_USED (DECL_NAME (decl)))
warning_with_decl (decl, "`%s' defined but not used");
#ifdef SDB_DEBUGGING_INFO
/* The COFF linker can move initialized global vars to the end.
And that can screw up the symbol ordering.
By putting the symbols in that order to begin with,
we avoid a problem. mcsun!unido!fauern!tumuc!pes@uunet.uu.net. */
if (write_symbols == SDB_DEBUG && TREE_CODE (decl) == VAR_DECL
&& TREE_PUBLIC (decl) && DECL_INITIAL (decl)
&& ! DECL_EXTERNAL (decl)
&& DECL_RTL (decl) != 0)
TIMEVAR (symout_time, sdbout_symbol (decl, 0));
/* Output COFF information for non-global
file-scope initialized variables. */
if (write_symbols == SDB_DEBUG
&& TREE_CODE (decl) == VAR_DECL
&& DECL_INITIAL (decl)
&& ! DECL_EXTERNAL (decl)
&& DECL_RTL (decl) != 0
&& GET_CODE (DECL_RTL (decl)) == MEM)
TIMEVAR (symout_time, sdbout_toplevel_data (decl));
#endif /* SDB_DEBUGGING_INFO */
#ifdef DWARF_DEBUGGING_INFO
/* Output DWARF information for file-scope tentative data object
declarations, file-scope (extern) function declarations (which
had no corresponding body) and file-scope tagged type declarations
and definitions which have not yet been forced out. */
if (write_symbols == DWARF_DEBUG
&& (TREE_CODE (decl) != FUNCTION_DECL || !DECL_INITIAL (decl)))
TIMEVAR (symout_time, dwarfout_file_scope_decl (decl, 1));
#endif
#ifdef DWARF2_DEBUGGING_INFO
/* Output DWARF2 information for file-scope tentative data object
declarations, file-scope (extern) function declarations (which
@ -3122,21 +3003,7 @@ compile_file (name)
weak_finish ();
/* Do dbx symbols */
#if defined (DBX_DEBUGGING_INFO) || defined (XCOFF_DEBUGGING_INFO)
if (write_symbols == DBX_DEBUG || write_symbols == XCOFF_DEBUG)
TIMEVAR (symout_time,
{
dbxout_finish (asm_out_file, main_input_filename);
});
#endif
#ifdef DWARF_DEBUGGING_INFO
if (write_symbols == DWARF_DEBUG)
TIMEVAR (symout_time,
{
dwarfout_finish ();
});
#endif
#ifdef DWARF2_UNWIND_INFO
if (dwarf2out_do_frame ())
@ -3345,38 +3212,15 @@ rest_of_decl_compilation (decl, asmspec, top_level, at_end)
else
error ("invalid register name `%s' for register variable", asmspec);
}
#if defined (DBX_DEBUGGING_INFO) || defined (XCOFF_DEBUGGING_INFO)
else if ((write_symbols == DBX_DEBUG || write_symbols == XCOFF_DEBUG)
&& TREE_CODE (decl) == TYPE_DECL)
TIMEVAR (symout_time, dbxout_symbol (decl, 0));
#endif
#ifdef SDB_DEBUGGING_INFO
else if (write_symbols == SDB_DEBUG && top_level
&& TREE_CODE (decl) == TYPE_DECL)
TIMEVAR (symout_time, sdbout_symbol (decl, 0));
#endif
}
/* Called after finishing a record, union or enumeral type. */
void
rest_of_type_compilation (type, toplev)
#if defined(DBX_DEBUGGING_INFO) || defined(XCOFF_DEBUGGING_INFO) || defined (SDB_DEBUGGING_INFO)
tree type;
int toplev;
#else
tree type ATTRIBUTE_UNUSED;
int toplev ATTRIBUTE_UNUSED;
#endif
{
#if defined (DBX_DEBUGGING_INFO) || defined (XCOFF_DEBUGGING_INFO)
if (write_symbols == DBX_DEBUG || write_symbols == XCOFF_DEBUG)
TIMEVAR (symout_time, dbxout_symbol (TYPE_STUB_DECL (type), !toplev));
#endif
#ifdef SDB_DEBUGGING_INFO
if (write_symbols == SDB_DEBUG)
TIMEVAR (symout_time, sdbout_symbol (TYPE_STUB_DECL (type), !toplev));
#endif
}
/* This is called from finish_function (within yyparse)
@ -3501,17 +3345,6 @@ rest_of_compilation (decl)
optimize = saved_optimize;
}
#ifdef DWARF_DEBUGGING_INFO
/* Generate the DWARF info for the "abstract" instance
of a function which we may later generate inlined and/or
out-of-line instances of. */
if (write_symbols == DWARF_DEBUG)
{
set_decl_abstract_flags (decl, 1);
TIMEVAR (symout_time, dwarfout_file_scope_decl (decl, 0));
set_decl_abstract_flags (decl, 0);
}
#endif
#ifdef DWARF2_DEBUGGING_INFO
/* Generate the DWARF2 info for the "abstract" instance
of a function which we may later generate inlined and/or
@ -3532,18 +3365,6 @@ rest_of_compilation (decl)
so that its compilation will not affect what others get. */
if (inlinable || DECL_DEFER_OUTPUT (decl))
{
#ifdef DWARF_DEBUGGING_INFO
/* Generate the DWARF info for the "abstract" instance of
a function which we will generate an out-of-line instance
of almost immediately (and which we may also later generate
various inlined instances of). */
if (write_symbols == DWARF_DEBUG)
{
set_decl_abstract_flags (decl, 1);
TIMEVAR (symout_time, dwarfout_file_scope_decl (decl, 0));
set_decl_abstract_flags (decl, 0);
}
#endif
#ifdef DWARF2_DEBUGGING_INFO
/* Generate the DWARF2 info for the "abstract" instance of
a function which we will generate an out-of-line instance
@ -4204,15 +4025,7 @@ rest_of_compilation (decl)
for those inline functions that need to have out-of-line copies
generated. During that call, we *will* be routed past here. */
#ifdef DBX_DEBUGGING_INFO
if (write_symbols == DBX_DEBUG)
TIMEVAR (symout_time, dbxout_function (decl));
#endif
#ifdef DWARF_DEBUGGING_INFO
if (write_symbols == DWARF_DEBUG)
TIMEVAR (symout_time, dwarfout_file_scope_decl (decl, 0));
#endif
#ifdef DWARF2_DEBUGGING_INFO
if (write_symbols == DWARF2_DEBUG)
@ -4226,10 +4039,6 @@ rest_of_compilation (decl)
/* In case the function was not output,
don't leave any temporary anonymous types
queued up for sdb output. */
#ifdef SDB_DEBUGGING_INFO
if (write_symbols == SDB_DEBUG)
sdbout_types (NULL_TREE);
#endif
/* Put back the tree of subblocks and list of arguments
from before we copied them.
@ -5082,9 +4891,6 @@ main (argc, argv)
#if defined (DWARF2_DEBUGGING_INFO) && !defined (LINKER_DOES_NOT_WORK_WITH_DWARF2)
type = DWARF2_DEBUG;
#else
#ifdef DBX_DEBUGGING_INFO
type = DBX_DEBUG;
#endif
#endif
}
}
@ -5115,7 +4921,6 @@ main (argc, argv)
write_symbols = (level == 0
? NO_DEBUG
: selected_debug_type);
use_gnu_debug_info_extensions = da->use_extensions_p;
debug_info_level = (enum debug_info_level) level;
}
break;
@ -5442,24 +5247,11 @@ void
debug_start_source_file (filename)
register char *filename;
{
#ifdef DBX_DEBUGGING_INFO
if (write_symbols == DBX_DEBUG)
dbxout_start_new_source_file (filename);
#endif
#ifdef DWARF_DEBUGGING_INFO
if (debug_info_level == DINFO_LEVEL_VERBOSE
&& write_symbols == DWARF_DEBUG)
dwarfout_start_new_source_file (filename);
#endif /* DWARF_DEBUGGING_INFO */
#ifdef DWARF2_DEBUGGING_INFO
if (debug_info_level == DINFO_LEVEL_VERBOSE
&& write_symbols == DWARF2_DEBUG)
dwarf2out_start_source_file (filename);
#endif /* DWARF2_DEBUGGING_INFO */
#ifdef SDB_DEBUGGING_INFO
if (write_symbols == SDB_DEBUG)
sdbout_start_new_source_file (filename);
#endif
}
/* Record the resumption of a source file. LINENO is the line number in
@ -5469,24 +5261,11 @@ void
debug_end_source_file (lineno)
register unsigned lineno ATTRIBUTE_UNUSED;
{
#ifdef DBX_DEBUGGING_INFO
if (write_symbols == DBX_DEBUG)
dbxout_resume_previous_source_file ();
#endif
#ifdef DWARF_DEBUGGING_INFO
if (debug_info_level == DINFO_LEVEL_VERBOSE
&& write_symbols == DWARF_DEBUG)
dwarfout_resume_previous_source_file (lineno);
#endif /* DWARF_DEBUGGING_INFO */
#ifdef DWARF2_DEBUGGING_INFO
if (debug_info_level == DINFO_LEVEL_VERBOSE
&& write_symbols == DWARF2_DEBUG)
dwarf2out_end_source_file ();
#endif /* DWARF2_DEBUGGING_INFO */
#ifdef SDB_DEBUGGING_INFO
if (write_symbols == SDB_DEBUG)
sdbout_resume_previous_source_file ();
#endif
}
/* Called from check_newline in c-parse.y. The `buffer' parameter contains
@ -5498,11 +5277,6 @@ debug_define (lineno, buffer)
register unsigned lineno;
register char *buffer;
{
#ifdef DWARF_DEBUGGING_INFO
if (debug_info_level == DINFO_LEVEL_VERBOSE
&& write_symbols == DWARF_DEBUG)
dwarfout_define (lineno, buffer);
#endif /* DWARF_DEBUGGING_INFO */
#ifdef DWARF2_DEBUGGING_INFO
if (debug_info_level == DINFO_LEVEL_VERBOSE
&& write_symbols == DWARF2_DEBUG)
@ -5519,11 +5293,6 @@ debug_undef (lineno, buffer)
register unsigned lineno;
register char *buffer;
{
#ifdef DWARF_DEBUGGING_INFO
if (debug_info_level == DINFO_LEVEL_VERBOSE
&& write_symbols == DWARF_DEBUG)
dwarfout_undef (lineno, buffer);
#endif /* DWARF_DEBUGGING_INFO */
#ifdef DWARF2_DEBUGGING_INFO
if (debug_info_level == DINFO_LEVEL_VERBOSE
&& write_symbols == DWARF2_DEBUG)

View File

@ -29,7 +29,6 @@ Boston, MA 02111-1307, USA. */
#include "config.h"
#include "system.h"
#include <setjmp.h>
/* #include <stab.h> */
#include "rtl.h"
#include "tree.h"
#include "flags.h"
@ -42,15 +41,9 @@ Boston, MA 02111-1307, USA. */
#include "defaults.h"
#include "real.h"
#include "toplev.h"
#include "dbxout.h"
#include "sdbout.h"
#include "obstack.h"
#include "c-pragma.h"
#ifdef XCOFF_DEBUGGING_INFO
#include "xcoffout.h"
#endif
#ifndef TRAMPOLINE_ALIGNMENT
#define TRAMPOLINE_ALIGNMENT FUNCTION_BOUNDARY
@ -865,14 +858,12 @@ assemble_asm (string)
flag_gnu_linker should be 0 on these systems,
which should prevent any output
if ASM_OUTPUT_CONSTRUCTOR and ASM_OUTPUT_DESTRUCTOR are absent. */
#if !(defined(DBX_DEBUGGING_INFO) && !defined(FASCIST_ASSEMBLER))
#ifndef ASM_OUTPUT_CONSTRUCTOR
#define ASM_OUTPUT_CONSTRUCTOR(file, name)
#endif
#ifndef ASM_OUTPUT_DESTRUCTOR
#define ASM_OUTPUT_DESTRUCTOR(file, name)
#endif
#endif
#endif /* 0 */
/* Record an element in the table of global destructors.
@ -998,17 +989,7 @@ assemble_start_function (decl, fnname)
ASM_OUTPUT_FUNCTION_PREFIX (asm_out_file, fnname);
#endif
#ifdef SDB_DEBUGGING_INFO
/* Output SDB definition of the function. */
if (write_symbols == SDB_DEBUG)
sdbout_mark_begin_function ();
#endif
#ifdef DBX_DEBUGGING_INFO
/* Output DBX definition of the function. */
if (write_symbols == DBX_DEBUG)
dbxout_begin_function (decl);
#endif
/* Make function name accessible from other files, if appropriate. */
@ -1294,19 +1275,6 @@ assemble_variable (decl, top_level, at_end, dont_output_data)
return;
TREE_ASM_WRITTEN (decl) = 1;
#if defined (DBX_DEBUGGING_INFO) || defined (XCOFF_DEBUGGING_INFO)
/* File-scope global variables are output here. */
if ((write_symbols == DBX_DEBUG || write_symbols == XCOFF_DEBUG)
&& top_level)
dbxout_symbol (decl, 0);
#endif
#ifdef SDB_DEBUGGING_INFO
if (write_symbols == SDB_DEBUG && top_level
/* Leave initialized global vars for end of compilation;
see comment in compile_file. */
&& (TREE_PUBLIC (decl) == 0 || DECL_INITIAL (decl) == 0))
sdbout_symbol (decl, 0);
#endif
/* Don't output any DWARF debugging information for variables here.
In the case of local variables, the information for them is output
@ -1464,18 +1432,6 @@ assemble_variable (decl, top_level, at_end, dont_output_data)
(decl, "requested alignment for %s is greater than implemented alignment of %d.",rounded);
#endif
#ifdef DBX_DEBUGGING_INFO
/* File-scope global variables are output here. */
if (write_symbols == DBX_DEBUG && top_level)
dbxout_symbol (decl, 0);
#endif
#ifdef SDB_DEBUGGING_INFO
if (write_symbols == SDB_DEBUG && top_level
/* Leave initialized global vars for end of compilation;
see comment in compile_file. */
&& (TREE_PUBLIC (decl) == 0 || DECL_INITIAL (decl) == 0))
sdbout_symbol (decl, 0);
#endif
/* Don't output any DWARF debugging information for variables here.
In the case of local variables, the information for them is output
@ -1545,18 +1501,6 @@ assemble_variable (decl, top_level, at_end, dont_output_data)
/* Output the dbx info now that we have chosen the section. */
#ifdef DBX_DEBUGGING_INFO
/* File-scope global variables are output here. */
if (write_symbols == DBX_DEBUG && top_level)
dbxout_symbol (decl, 0);
#endif
#ifdef SDB_DEBUGGING_INFO
if (write_symbols == SDB_DEBUG && top_level
/* Leave initialized global vars for end of compilation;
see comment in compile_file. */
&& (TREE_PUBLIC (decl) == 0 || DECL_INITIAL (decl) == 0))
sdbout_symbol (decl, 0);
#endif
/* Don't output any DWARF debugging information for variables here.
In the case of local variables, the information for them is output
@ -1596,27 +1540,8 @@ assemble_variable (decl, top_level, at_end, dont_output_data)
}
finish:
#ifdef XCOFF_DEBUGGING_INFO
/* Unfortunately, the IBM assembler cannot handle stabx before the actual
declaration. When something like ".stabx "aa:S-2",aa,133,0" is emitted
and `aa' hasn't been output yet, the assembler generates a stab entry with
a value of zero, in addition to creating an unnecessary external entry
for `aa'. Hence, we must postpone dbxout_symbol to here at the end. */
/* File-scope global variables are output here. */
if (write_symbols == XCOFF_DEBUG && top_level)
{
saved_in_section = in_section;
dbxout_symbol (decl, 0);
if (in_section != saved_in_section)
variable_section (decl, reloc);
}
#else
/* There must be a statement after a label. */
;
#endif
}
/* Return 1 if type TYPE contains any pointers. */

View File

@ -1 +0,0 @@
char *version_string = "2.9-arm-000512";

View File

@ -1,545 +0,0 @@
/* Output xcoff-format symbol table information from GNU compiler.
Copyright (C) 1992, 1994, 1995, 1997, 1998 Free Software Foundation, Inc.
This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU CC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* Output xcoff-format symbol table data. The main functionality is contained
in dbxout.c. This file implements the sdbout-like parts of the xcoff
interface. Many functions are very similar to their counterparts in
sdbout.c. */
#include "config.h"
#include "system.h"
#include "tree.h"
#include "rtl.h"
#include "flags.h"
#include "toplev.h"
#include "output.h"
#ifdef XCOFF_DEBUGGING_INFO
/* This defines the C_* storage classes. */
#include <dbxstclass.h>
#include "xcoffout.h"
#include "dbxout.h"
#if defined (USG) || !defined (HAVE_STAB_H)
#include "gstab.h"
#else
#include <stab.h>
/* This is a GNU extension we need to reference in this file. */
#ifndef N_CATCH
#define N_CATCH 0x54
#endif
#endif
/* Line number of beginning of current function, minus one.
Negative means not in a function or not using xcoff. */
static int xcoff_begin_function_line = -1;
static int xcoff_inlining = 0;
/* Name of the current include file. */
char *xcoff_current_include_file;
/* Name of the current function file. This is the file the `.bf' is
emitted from. In case a line is emitted from a different file,
(by including that file of course), then the line number will be
absolute. */
static char *xcoff_current_function_file;
/* Names of bss and data sections. These should be unique names for each
compilation unit. */
char *xcoff_bss_section_name;
char *xcoff_private_data_section_name;
char *xcoff_read_only_section_name;
/* Last source file name mentioned in a NOTE insn. */
char *xcoff_lastfile;
/* Macro definitions used below. */
#define ABS_OR_RELATIVE_LINENO(LINENO) \
((xcoff_inlining) ? (LINENO) : (LINENO) - xcoff_begin_function_line)
/* Output source line numbers via ".line" rather than ".stabd". */
#define ASM_OUTPUT_SOURCE_LINE(FILE,LINENUM) \
do { \
if (xcoff_begin_function_line >= 0) \
fprintf (FILE, "\t.line\t%d\n", ABS_OR_RELATIVE_LINENO (LINENUM)); \
} while (0)
#define ASM_OUTPUT_LFB(FILE,LINENUM) \
{ \
if (xcoff_begin_function_line == -1) \
{ \
xcoff_begin_function_line = (LINENUM) - 1;\
fprintf (FILE, "\t.bf\t%d\n", (LINENUM)); \
} \
xcoff_current_function_file \
= (xcoff_current_include_file \
? xcoff_current_include_file : main_input_filename); \
}
#define ASM_OUTPUT_LFE(FILE,LINENUM) \
do { \
fprintf (FILE, "\t.ef\t%d\n", (LINENUM)); \
xcoff_begin_function_line = -1; \
} while (0)
#define ASM_OUTPUT_LBB(FILE,LINENUM,BLOCKNUM) \
fprintf (FILE, "\t.bb\t%d\n", ABS_OR_RELATIVE_LINENO (LINENUM))
#define ASM_OUTPUT_LBE(FILE,LINENUM,BLOCKNUM) \
fprintf (FILE, "\t.eb\t%d\n", ABS_OR_RELATIVE_LINENO (LINENUM))
static void assign_type_number PROTO((tree, char *, int));
static void xcoffout_block PROTO((tree, int, tree));
/* Support routines for XCOFF debugging info. */
/* Assign NUMBER as the stabx type number for the type described by NAME.
Search all decls in the list SYMS to find the type NAME. */
static void
assign_type_number (syms, name, number)
tree syms;
char *name;
int number;
{
tree decl;
for (decl = syms; decl; decl = TREE_CHAIN (decl))
if (DECL_NAME (decl)
&& strcmp (IDENTIFIER_POINTER (DECL_NAME (decl)), name) == 0)
{
TREE_ASM_WRITTEN (decl) = 1;
TYPE_SYMTAB_ADDRESS (TREE_TYPE (decl)) = number;
}
}
/* Setup gcc primitive types to use the XCOFF built-in type numbers where
possible. */
void
xcoff_output_standard_types (syms)
tree syms;
{
/* Handle built-in C types here. */
assign_type_number (syms, "int", -1);
assign_type_number (syms, "char", -2);
assign_type_number (syms, "short int", -3);
assign_type_number (syms, "long int", (TARGET_64BIT ? -31 : -4));
assign_type_number (syms, "unsigned char", -5);
assign_type_number (syms, "signed char", -6);
assign_type_number (syms, "short unsigned int", -7);
assign_type_number (syms, "unsigned int", -8);
/* No such type "unsigned". */
assign_type_number (syms, "long unsigned int", (TARGET_64BIT ? -32 : -10));
assign_type_number (syms, "void", -11);
assign_type_number (syms, "float", -12);
assign_type_number (syms, "double", -13);
assign_type_number (syms, "long double", -14);
/* Pascal and Fortran types run from -15 to -29. */
assign_type_number (syms, "wchar", -30);
assign_type_number (syms, "long long int", -31);
assign_type_number (syms, "long long unsigned int", -32);
/* Additional Fortran types run from -33 to -37. */
/* ??? Should also handle built-in C++ and Obj-C types. There perhaps
aren't any that C doesn't already have. */
}
/* Print an error message for unrecognized stab codes. */
#define UNKNOWN_STAB(STR) \
do { \
fprintf(stderr, "Error, unknown stab %s: : 0x%x\n", STR, stab); \
fflush (stderr); \
} while (0)
/* Conversion routine from BSD stabs to AIX storage classes. */
int
stab_to_sclass (stab)
int stab;
{
switch (stab)
{
case N_GSYM:
return C_GSYM;
case N_FNAME:
UNKNOWN_STAB ("N_FNAME");
abort();
case N_FUN:
return C_FUN;
case N_STSYM:
case N_LCSYM:
return C_STSYM;
#ifdef N_MAIN
case N_MAIN:
UNKNOWN_STAB ("N_MAIN");
abort ();
#endif
case N_RSYM:
return C_RSYM;
case N_SSYM:
UNKNOWN_STAB ("N_SSYM");
abort ();
case N_RPSYM:
return C_RPSYM;
case N_PSYM:
return C_PSYM;
case N_LSYM:
return C_LSYM;
case N_DECL:
return C_DECL;
case N_ENTRY:
return C_ENTRY;
case N_SO:
UNKNOWN_STAB ("N_SO");
abort ();
case N_SOL:
UNKNOWN_STAB ("N_SOL");
abort ();
case N_SLINE:
UNKNOWN_STAB ("N_SLINE");
abort ();
#ifdef N_DSLINE
case N_DSLINE:
UNKNOWN_STAB ("N_DSLINE");
abort ();
#endif
#ifdef N_BSLINE
case N_BSLINE:
UNKNOWN_STAB ("N_BSLINE");
abort ();
#endif
#if 0
/* This has the same value as N_BSLINE. */
case N_BROWS:
UNKNOWN_STAB ("N_BROWS");
abort ();
#endif
#ifdef N_BINCL
case N_BINCL:
UNKNOWN_STAB ("N_BINCL");
abort ();
#endif
#ifdef N_EINCL
case N_EINCL:
UNKNOWN_STAB ("N_EINCL");
abort ();
#endif
#ifdef N_EXCL
case N_EXCL:
UNKNOWN_STAB ("N_EXCL");
abort ();
#endif
case N_LBRAC:
UNKNOWN_STAB ("N_LBRAC");
abort ();
case N_RBRAC:
UNKNOWN_STAB ("N_RBRAC");
abort ();
case N_BCOMM:
return C_BCOMM;
case N_ECOMM:
return C_ECOMM;
case N_ECOML:
return C_ECOML;
case N_LENG:
UNKNOWN_STAB ("N_LENG");
abort ();
case N_PC:
UNKNOWN_STAB ("N_PC");
abort ();
#ifdef N_M2C
case N_M2C:
UNKNOWN_STAB ("N_M2C");
abort ();
#endif
#ifdef N_SCOPE
case N_SCOPE:
UNKNOWN_STAB ("N_SCOPE");
abort ();
#endif
case N_CATCH:
UNKNOWN_STAB ("N_CATCH");
abort ();
default:
UNKNOWN_STAB ("default");
abort ();
}
}
/* Output debugging info to FILE to switch to sourcefile FILENAME.
INLINE_P is true if this is from an inlined function. */
void
xcoffout_source_file (file, filename, inline_p)
FILE *file;
char *filename;
int inline_p;
{
if (filename
&& (xcoff_lastfile == 0 || strcmp (filename, xcoff_lastfile)
|| (inline_p && ! xcoff_inlining)
|| (! inline_p && xcoff_inlining)))
{
if (xcoff_current_include_file)
{
fprintf (file, "\t.ei\t");
output_quoted_string (file, xcoff_current_include_file);
fprintf (file, "\n");
xcoff_current_include_file = NULL;
}
xcoff_inlining=inline_p;
if (strcmp (main_input_filename, filename) || inline_p)
{
fprintf (file, "\t.bi\t");
output_quoted_string (file, filename);
fprintf (file, "\n");
xcoff_current_include_file = filename;
}
xcoff_lastfile = filename;
}
}
/* Output a line number symbol entry into output stream FILE,
for source file FILENAME and line number NOTE. */
void
xcoffout_source_line (file, filename, note)
FILE *file;
char *filename;
rtx note;
{
xcoffout_source_file (file, filename, RTX_INTEGRATED_P (note));
ASM_OUTPUT_SOURCE_LINE (file, NOTE_LINE_NUMBER (note));
}
/* Output the symbols defined in block number DO_BLOCK.
Set NEXT_BLOCK_NUMBER to 0 before calling.
This function works by walking the tree structure of blocks,
counting blocks until it finds the desired block. */
static int do_block = 0;
static int next_block_number;
static void
xcoffout_block (block, depth, args)
register tree block;
int depth;
tree args;
{
while (block)
{
/* Ignore blocks never expanded or otherwise marked as real. */
if (TREE_USED (block))
{
/* When we reach the specified block, output its symbols. */
if (next_block_number == do_block)
{
/* Output the syms of the block. */
if (debug_info_level != DINFO_LEVEL_TERSE || depth == 0)
dbxout_syms (BLOCK_VARS (block));
if (args)
dbxout_reg_parms (args);
/* We are now done with the block. Don't go to inner blocks. */
return;
}
/* If we are past the specified block, stop the scan. */
else if (next_block_number >= do_block)
return;
next_block_number++;
/* Output the subblocks. */
xcoffout_block (BLOCK_SUBBLOCKS (block), depth + 1, NULL_TREE);
}
block = BLOCK_CHAIN (block);
}
}
/* Describe the beginning of an internal block within a function.
Also output descriptions of variables defined in this block.
N is the number of the block, by order of beginning, counting from 1,
and not counting the outermost (function top-level) block.
The blocks match the BLOCKs in DECL_INITIAL (current_function_decl),
if the count starts at 0 for the outermost one. */
void
xcoffout_begin_block (file, line, n)
FILE *file;
int line;
int n;
{
tree decl = current_function_decl;
/* The IBM AIX compiler does not emit a .bb for the function level scope,
so we avoid it here also. */
if (n != 1)
ASM_OUTPUT_LBB (file, line, n);
do_block = n;
next_block_number = 0;
xcoffout_block (DECL_INITIAL (decl), 0, DECL_ARGUMENTS (decl));
}
/* Describe the end line-number of an internal block within a function. */
void
xcoffout_end_block (file, line, n)
FILE *file;
int line;
int n;
{
if (n != 1)
ASM_OUTPUT_LBE (file, line, n);
}
/* Called at beginning of function (before prologue).
Declare function as needed for debugging. */
void
xcoffout_declare_function (file, decl, name)
FILE *file;
tree decl;
char *name;
{
char *n = name;
int i;
if (*n == '*')
n++;
else
for (i = 0; name[i]; ++i)
{
if (name[i] == '[')
{
n = (char *) alloca (i + 1);
strncpy (n, name, i);
n[i] = '\0';
break;
}
}
/* Any pending .bi or .ei must occur before the .function pseudo op.
Otherwise debuggers will think that the function is in the previous
file and/or at the wrong line number. */
xcoffout_source_file (file, DECL_SOURCE_FILE (decl), 0);
dbxout_symbol (decl, 0);
fprintf (file, "\t.function .%s,.%s,16,044,FE..%s-.%s\n", n, n, n, n);
}
/* Called at beginning of function body (after prologue).
Record the function's starting line number, so we can output
relative line numbers for the other lines.
Record the file name that this function is contained in. */
void
xcoffout_begin_function (file, last_linenum)
FILE *file;
int last_linenum;
{
ASM_OUTPUT_LFB (file, last_linenum);
dbxout_parms (DECL_ARGUMENTS (current_function_decl));
/* Emit the symbols for the outermost BLOCK's variables. sdbout.c does this
in sdbout_begin_block, but there is no guarantee that there will be any
inner block 1, so we must do it here. This gives a result similar to
dbxout, so it does make some sense. */
do_block = 0;
next_block_number = 0;
xcoffout_block (DECL_INITIAL (current_function_decl), 0,
DECL_ARGUMENTS (current_function_decl));
ASM_OUTPUT_SOURCE_LINE (file, last_linenum);
}
/* Called at end of function (before epilogue).
Describe end of outermost block. */
void
xcoffout_end_function (file, last_linenum)
FILE *file;
int last_linenum;
{
ASM_OUTPUT_LFE (file, last_linenum);
}
/* Output xcoff info for the absolute end of a function.
Called after the epilogue is output. */
void
xcoffout_end_epilogue (file)
FILE *file;
{
/* We need to pass the correct function size to .function, otherwise,
the xas assembler can't figure out the correct size for the function
aux entry. So, we emit a label after the last instruction which can
be used by the .function pseudo op to calculate the function size. */
char *fname = XSTR (XEXP (DECL_RTL (current_function_decl), 0), 0);
if (*fname == '*')
++fname;
fprintf (file, "FE..");
ASM_OUTPUT_LABEL (file, fname);
}
#endif /* XCOFF_DEBUGGING_INFO */

View File

@ -1,211 +0,0 @@
/* XCOFF definitions. These are needed in dbxout.c, final.c,
and xcoffout.h.
Copyright (C) 1998 Free Software Foundation, Inc.
This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU CC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#define ASM_STABS_OP ".stabx"
/* Tags and typedefs are C_DECL in XCOFF, not C_LSYM. */
#define DBX_TYPE_DECL_STABS_CODE N_DECL
/* Use the XCOFF predefined type numbers. */
/* ??? According to metin, typedef stabx must go in text control section,
but he did not make this changes everywhere where such typedef stabx
can be emitted, so it is really needed or not? */
#define DBX_OUTPUT_STANDARD_TYPES(SYMS) \
{ \
text_section (); \
xcoff_output_standard_types (SYMS); \
}
/* Any type with a negative type index has already been output. */
#define DBX_TYPE_DEFINED(TYPE) (TYPE_SYMTAB_ADDRESS (TYPE) < 0)
/* Must use N_STSYM for static const variables (those in the text section)
instead of N_FUN. */
#define DBX_STATIC_CONST_VAR_CODE N_STSYM
/* For static variables, output code to define the start of a static block.
??? The IBM rs6000/AIX assembler has a bug that causes bss block debug
info to be occasionally lost. A simple example is this:
int a; static int b;
The commands `gcc -g -c tmp.c; dump -t tmp.o' gives
[10] m 0x00000016 1 0 0x8f 0x0000 .bs
[11] m 0x00000000 1 0 0x90 0x0000 .es
...
[21] m 0x00000000 -2 0 0x85 0x0000 b:S-1
which is wrong. The `b:S-1' must be between the `.bs' and `.es'.
We can apparently work around the problem by forcing the text section
(even if we are already in the text section) immediately before outputting
the `.bs'. This should be fixed in the next major AIX release (3.3?). */
#define DBX_STATIC_BLOCK_START(ASMFILE,CODE) \
{ \
if ((CODE) == N_STSYM) \
fprintf ((ASMFILE), "\t.bs\t%s[RW]\n", xcoff_private_data_section_name);\
else if ((CODE) == N_LCSYM) \
{ \
fprintf ((ASMFILE), "%s\n", TEXT_SECTION_ASM_OP); \
fprintf ((ASMFILE), "\t.bs\t%s\n", xcoff_bss_section_name); \
} \
}
/* For static variables, output code to define the end of a static block. */
#define DBX_STATIC_BLOCK_END(ASMFILE,CODE) \
{ \
if ((CODE) == N_STSYM || (CODE) == N_LCSYM) \
fputs ("\t.es\n", (ASMFILE)); \
}
/* We must use N_RPYSM instead of N_RSYM for register parameters. */
#define DBX_REGPARM_STABS_CODE N_RPSYM
/* We must use 'R' instead of 'P' for register parameters. */
#define DBX_REGPARM_STABS_LETTER 'R'
/* Define our own finish symbol function, since xcoff stabs have their
own different format. */
#define DBX_FINISH_SYMBOL(SYM) \
{ \
if (current_sym_addr && current_sym_code == N_FUN) \
fprintf (asmfile, "\",."); \
else \
fprintf (asmfile, "\","); \
/* If we are writing a function name, we must ensure that \
there is no storage-class suffix on the name. */ \
if (current_sym_addr && current_sym_code == N_FUN \
&& GET_CODE (current_sym_addr) == SYMBOL_REF) \
{ \
char *_p = XSTR (current_sym_addr, 0); \
if (*_p == '*') \
fprintf (asmfile, "%s", _p+1); \
else \
for (; *_p != '[' && *_p; _p++) \
fprintf (asmfile, "%c", *_p); \
} \
else if (current_sym_addr) \
output_addr_const (asmfile, current_sym_addr); \
else if (current_sym_code == N_GSYM) \
assemble_name (asmfile, XSTR (XEXP (DECL_RTL (sym), 0), 0)); \
else \
fprintf (asmfile, "%d", current_sym_value); \
fprintf (asmfile, ",%d,0\n", stab_to_sclass (current_sym_code)); \
}
/* These are IBM XCOFF extensions we need to reference in dbxout.c
and xcoffout.c. */
/* AIX XCOFF uses this for typedefs. This can have any value, since it is
only used for translation into a C_DECL storage class. */
#ifndef N_DECL
#define N_DECL 0x8c
#endif
/* AIX XCOFF uses this for parameters passed in registers. This can have
any value, since it is only used for translation into a C_RPSYM storage
class. */
#ifndef N_RPSYM
#define N_RPSYM 0x8e
#endif
/* Name of the current include file. */
extern char *xcoff_current_include_file;
/* Names of bss and data sections. These should be unique names for each
compilation unit. */
extern char *xcoff_bss_section_name;
extern char *xcoff_private_data_section_name;
extern char *xcoff_read_only_section_name;
/* Last source file name mentioned in a NOTE insn. */
extern char *xcoff_lastfile;
/* Don't write out path name for main source file. */
#define DBX_OUTPUT_MAIN_SOURCE_DIRECTORY(FILE,FILENAME)
/* Write out main source file name using ".file" rather than ".stabs".
We don't actually do this here, because the assembler gets confused if there
is more than one .file directive. ASM_FILE_START in config/rs6000/rs6000.h
is already emitting a .file directory, so we don't output one here also.
Initialize xcoff_lastfile. */
#define DBX_OUTPUT_MAIN_SOURCE_FILENAME(FILE,FILENAME) \
xcoff_lastfile = (FILENAME)
/* If we are still in an include file, its end must be marked. */
#define DBX_OUTPUT_MAIN_SOURCE_FILE_END(FILE, FILENAME) \
{ \
if (xcoff_current_include_file) \
{ \
fputs ("\t.ei\t", (FILE)); \
output_quoted_string ((FILE), xcoff_current_include_file); \
putc ('\n', (FILE)); \
xcoff_current_include_file = NULL; \
} \
}
/* Do not break .stabs pseudos into continuations. */
#define DBX_CONTIN_LENGTH 0
/* Don't try to use the `x' type-cross-reference character in DBX data.
Also has the consequence of putting each struct, union or enum
into a separate .stabs, containing only cross-refs to the others. */
#define DBX_NO_XREFS
/* We must put stabs in the text section. If we don't the assembler
won't handle them correctly; it will sometimes put stabs where gdb
can't find them. */
#define DEBUG_SYMS_TEXT
/* Prototype functions in xcoffout.c. */
extern int stab_to_sclass PROTO ((int));
#ifdef BUFSIZ
extern void xcoffout_begin_function PROTO ((FILE *, int));
extern void xcoffout_begin_block PROTO ((FILE *, int, int));
extern void xcoffout_end_epilogue PROTO ((FILE *));
extern void xcoffout_end_function PROTO ((FILE *, int));
extern void xcoffout_end_block PROTO ((FILE *, int, int));
#endif /* BUFSIZ */
#ifdef TREE_CODE
extern void xcoff_output_standard_types PROTO ((tree));
#ifdef BUFSIZ
extern void xcoffout_declare_function PROTO ((FILE *, tree, char *));
#endif /* BUFSIZ */
#endif /* TREE_CODE */
#ifdef RTX_CODE
#ifdef BUFSIZ
extern void xcoffout_source_line PROTO ((FILE *, char *, rtx));
#endif /* BUFSIZ */
#endif /* RTX_CODE */