1992-03-11 23:24:26 +01:00
|
|
|
|
/* Output xcoff-format symbol table information from GNU compiler.
|
cfgloop.h, [...]: Update copyright.
gcc/
* cfgloop.h, cfgloopanal.c, cpplex.c, except.h, loop-init.c,
loop-unroll.c, scan-decls.c, scan.h, stor-layout.c,
xcoffout.c, xcoffout.h, config/arm/mmintrin.h,
config/mips/linux64.h, config/pa/pa-64.h,
config/rs6000/aix51.h, config/rs6000/aix52.h,
config/rs6000/spe.md, config/sparc/linux.h,
config/sparc/linux64.h: Update copyright.
gcc/cp/
* cp-tree.def, cvt.c: Update copyright.
From-SVN: r78032
2004-02-18 16:05:17 +01:00
|
|
|
|
Copyright (C) 1992, 1994, 1995, 1997, 1998, 1999, 2000, 2002, 2003, 2004
|
2000-08-29 17:54:29 +02:00
|
|
|
|
Free Software Foundation, Inc.
|
1992-03-11 23:24:26 +01:00
|
|
|
|
|
Makefile.in, [...]: replace "GNU CC" with "GCC".
* Makefile.in, alias.c, basic-block.h, bb-reorder.c, bitmap.c,
bitmap.h, builtin-types.def, builtins.c, builtins.def,
c-aux-info.c, c-common.c, c-common.def, c-common.h,
c-convert.c, c-decl.c, c-dump.c, c-dump.h, c-errors.c,
c-format.c, c-lang.c, c-lex.c, c-lex.h, c-parse.in,
c-pragma.c, c-pragma.h, c-semantics.c, c-tree.h, c-typeck.c,
caller-save.c, calls.c, collect2.c, collect2.h, combine.c,
conditions.h, config.gcc, configure.frag, configure.in,
conflict.c, convert.c, convert.h, cppspec.c, crtstuff.c,
cse.c, cselib.c, cselib.h, dbxout.c, dbxout.h, defaults.h,
dependence.c, df.c, df.h, diagnostic.c, diagnostic.h,
doloop.c, dominance.c, dwarf.h, dwarf2.h, dwarf2asm.c,
dwarf2asm.h, dwarf2out.c, dwarf2out.h, dwarfout.c,
emit-rtl.c, errors.c, errors.h, except.c, except.h,
exgettext, explow.c, expmed.c, expr.c, expr.h, final.c,
fixproto, flags.h, flow.c, fold-const.c, fp-test.c,
function.c, function.h, gbl-ctors.h, gcc.c, gcc.h, gcc.hlp,
gccspec.c, gcov-io.h, gcse.c, genattr.c, genattrtab.c,
gencheck.c, gencodes.c, genconfig.c, genemit.c,
genextract.c, genflags.c, gengenrtl.c, genmultilib,
genopinit.c, genoutput.c, genpeep.c, genrecog.c,
gensupport.c, gensupport.h, ggc-callbacks.c, ggc-common.c,
ggc-none.c, ggc-page.c, ggc-simple.c, ggc.h, global.c,
graph.c, graph.h, gthr-aix.h, gthr-dce.h, gthr-posix.h,
gthr-rtems.h, gthr-single.h, gthr-solaris.h, gthr-vxworks.h,
gthr-win32.h, gthr.h, haifa-sched.c, halfpic.c, halfpic.h,
hard-reg-set.h, hwint.h, ifcvt.c, input.h, insn-addr.h,
integrate.c, integrate.h, jump.c, lcm.c, libgcc2.c,
libgcc2.h, lists.c, local-alloc.c, loop.c, loop.h,
machmode.def, machmode.h, main.c, mbchar.c, mbchar.h,
mips-tdump.c, mips-tfile.c, mklibgcc.in, mkmap-flat.awk,
mkmap-symver.awk, optabs.c, output.h, params.c, params.def,
params.h, predict.c, predict.def, predict.h, prefix.c,
prefix.h, print-rtl.c, print-tree.c, profile.c, protoize.c,
read-rtl.c, real.c, real.h, recog.c, recog.h, reg-stack.c,
regclass.c, regmove.c, regrename.c, regs.h, reload.c,
reload.h, reload1.c, reorg.c, resource.c, resource.h, rtl.c,
rtl.def, rtl.h, rtlanal.c, sbitmap.c, sbitmap.h,
sched-deps.c, sched-ebb.c, sched-int.h, sched-rgn.c,
sched-vis.c, sdbout.c, sdbout.h, sibcall.c, simplify-rtx.c,
ssa-ccp.c, ssa-dce.c, ssa.c, ssa.h, stmt.c, stor-layout.c,
stringpool.c, system.h, timevar.c, timevar.def, timevar.h,
tlink.c, toplev.c, toplev.h, tree.c, tree.def, tree.h,
tsystem.h, unroll.c, unwind-dw2-fde.c, unwind-dw2-fde.h,
unwind-dw2.c, unwind-pe.h, unwind-sjlj.c, unwind.h,
unwind.inc, varasm.c, varray.c, varray.h, xcoffout.c,
xcoffout.h: replace "GNU CC" with "GCC".
From-SVN: r45105
2001-08-22 16:35:51 +02:00
|
|
|
|
This file is part of GCC.
|
1992-03-11 23:24:26 +01:00
|
|
|
|
|
Makefile.in, [...]: replace "GNU CC" with "GCC".
* Makefile.in, alias.c, basic-block.h, bb-reorder.c, bitmap.c,
bitmap.h, builtin-types.def, builtins.c, builtins.def,
c-aux-info.c, c-common.c, c-common.def, c-common.h,
c-convert.c, c-decl.c, c-dump.c, c-dump.h, c-errors.c,
c-format.c, c-lang.c, c-lex.c, c-lex.h, c-parse.in,
c-pragma.c, c-pragma.h, c-semantics.c, c-tree.h, c-typeck.c,
caller-save.c, calls.c, collect2.c, collect2.h, combine.c,
conditions.h, config.gcc, configure.frag, configure.in,
conflict.c, convert.c, convert.h, cppspec.c, crtstuff.c,
cse.c, cselib.c, cselib.h, dbxout.c, dbxout.h, defaults.h,
dependence.c, df.c, df.h, diagnostic.c, diagnostic.h,
doloop.c, dominance.c, dwarf.h, dwarf2.h, dwarf2asm.c,
dwarf2asm.h, dwarf2out.c, dwarf2out.h, dwarfout.c,
emit-rtl.c, errors.c, errors.h, except.c, except.h,
exgettext, explow.c, expmed.c, expr.c, expr.h, final.c,
fixproto, flags.h, flow.c, fold-const.c, fp-test.c,
function.c, function.h, gbl-ctors.h, gcc.c, gcc.h, gcc.hlp,
gccspec.c, gcov-io.h, gcse.c, genattr.c, genattrtab.c,
gencheck.c, gencodes.c, genconfig.c, genemit.c,
genextract.c, genflags.c, gengenrtl.c, genmultilib,
genopinit.c, genoutput.c, genpeep.c, genrecog.c,
gensupport.c, gensupport.h, ggc-callbacks.c, ggc-common.c,
ggc-none.c, ggc-page.c, ggc-simple.c, ggc.h, global.c,
graph.c, graph.h, gthr-aix.h, gthr-dce.h, gthr-posix.h,
gthr-rtems.h, gthr-single.h, gthr-solaris.h, gthr-vxworks.h,
gthr-win32.h, gthr.h, haifa-sched.c, halfpic.c, halfpic.h,
hard-reg-set.h, hwint.h, ifcvt.c, input.h, insn-addr.h,
integrate.c, integrate.h, jump.c, lcm.c, libgcc2.c,
libgcc2.h, lists.c, local-alloc.c, loop.c, loop.h,
machmode.def, machmode.h, main.c, mbchar.c, mbchar.h,
mips-tdump.c, mips-tfile.c, mklibgcc.in, mkmap-flat.awk,
mkmap-symver.awk, optabs.c, output.h, params.c, params.def,
params.h, predict.c, predict.def, predict.h, prefix.c,
prefix.h, print-rtl.c, print-tree.c, profile.c, protoize.c,
read-rtl.c, real.c, real.h, recog.c, recog.h, reg-stack.c,
regclass.c, regmove.c, regrename.c, regs.h, reload.c,
reload.h, reload1.c, reorg.c, resource.c, resource.h, rtl.c,
rtl.def, rtl.h, rtlanal.c, sbitmap.c, sbitmap.h,
sched-deps.c, sched-ebb.c, sched-int.h, sched-rgn.c,
sched-vis.c, sdbout.c, sdbout.h, sibcall.c, simplify-rtx.c,
ssa-ccp.c, ssa-dce.c, ssa.c, ssa.h, stmt.c, stor-layout.c,
stringpool.c, system.h, timevar.c, timevar.def, timevar.h,
tlink.c, toplev.c, toplev.h, tree.c, tree.def, tree.h,
tsystem.h, unroll.c, unwind-dw2-fde.c, unwind-dw2-fde.h,
unwind-dw2.c, unwind-pe.h, unwind-sjlj.c, unwind.h,
unwind.inc, varasm.c, varray.c, varray.h, xcoffout.c,
xcoffout.h: replace "GNU CC" with "GCC".
From-SVN: r45105
2001-08-22 16:35:51 +02:00
|
|
|
|
GCC 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.
|
1992-03-11 23:24:26 +01:00
|
|
|
|
|
Makefile.in, [...]: replace "GNU CC" with "GCC".
* Makefile.in, alias.c, basic-block.h, bb-reorder.c, bitmap.c,
bitmap.h, builtin-types.def, builtins.c, builtins.def,
c-aux-info.c, c-common.c, c-common.def, c-common.h,
c-convert.c, c-decl.c, c-dump.c, c-dump.h, c-errors.c,
c-format.c, c-lang.c, c-lex.c, c-lex.h, c-parse.in,
c-pragma.c, c-pragma.h, c-semantics.c, c-tree.h, c-typeck.c,
caller-save.c, calls.c, collect2.c, collect2.h, combine.c,
conditions.h, config.gcc, configure.frag, configure.in,
conflict.c, convert.c, convert.h, cppspec.c, crtstuff.c,
cse.c, cselib.c, cselib.h, dbxout.c, dbxout.h, defaults.h,
dependence.c, df.c, df.h, diagnostic.c, diagnostic.h,
doloop.c, dominance.c, dwarf.h, dwarf2.h, dwarf2asm.c,
dwarf2asm.h, dwarf2out.c, dwarf2out.h, dwarfout.c,
emit-rtl.c, errors.c, errors.h, except.c, except.h,
exgettext, explow.c, expmed.c, expr.c, expr.h, final.c,
fixproto, flags.h, flow.c, fold-const.c, fp-test.c,
function.c, function.h, gbl-ctors.h, gcc.c, gcc.h, gcc.hlp,
gccspec.c, gcov-io.h, gcse.c, genattr.c, genattrtab.c,
gencheck.c, gencodes.c, genconfig.c, genemit.c,
genextract.c, genflags.c, gengenrtl.c, genmultilib,
genopinit.c, genoutput.c, genpeep.c, genrecog.c,
gensupport.c, gensupport.h, ggc-callbacks.c, ggc-common.c,
ggc-none.c, ggc-page.c, ggc-simple.c, ggc.h, global.c,
graph.c, graph.h, gthr-aix.h, gthr-dce.h, gthr-posix.h,
gthr-rtems.h, gthr-single.h, gthr-solaris.h, gthr-vxworks.h,
gthr-win32.h, gthr.h, haifa-sched.c, halfpic.c, halfpic.h,
hard-reg-set.h, hwint.h, ifcvt.c, input.h, insn-addr.h,
integrate.c, integrate.h, jump.c, lcm.c, libgcc2.c,
libgcc2.h, lists.c, local-alloc.c, loop.c, loop.h,
machmode.def, machmode.h, main.c, mbchar.c, mbchar.h,
mips-tdump.c, mips-tfile.c, mklibgcc.in, mkmap-flat.awk,
mkmap-symver.awk, optabs.c, output.h, params.c, params.def,
params.h, predict.c, predict.def, predict.h, prefix.c,
prefix.h, print-rtl.c, print-tree.c, profile.c, protoize.c,
read-rtl.c, real.c, real.h, recog.c, recog.h, reg-stack.c,
regclass.c, regmove.c, regrename.c, regs.h, reload.c,
reload.h, reload1.c, reorg.c, resource.c, resource.h, rtl.c,
rtl.def, rtl.h, rtlanal.c, sbitmap.c, sbitmap.h,
sched-deps.c, sched-ebb.c, sched-int.h, sched-rgn.c,
sched-vis.c, sdbout.c, sdbout.h, sibcall.c, simplify-rtx.c,
ssa-ccp.c, ssa-dce.c, ssa.c, ssa.h, stmt.c, stor-layout.c,
stringpool.c, system.h, timevar.c, timevar.def, timevar.h,
tlink.c, toplev.c, toplev.h, tree.c, tree.def, tree.h,
tsystem.h, unroll.c, unwind-dw2-fde.c, unwind-dw2-fde.h,
unwind-dw2.c, unwind-pe.h, unwind-sjlj.c, unwind.h,
unwind.inc, varasm.c, varray.c, varray.h, xcoffout.c,
xcoffout.h: replace "GNU CC" with "GCC".
From-SVN: r45105
2001-08-22 16:35:51 +02:00
|
|
|
|
GCC 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.
|
1992-03-11 23:24:26 +01:00
|
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
Makefile.in, [...]: replace "GNU CC" with "GCC".
* Makefile.in, alias.c, basic-block.h, bb-reorder.c, bitmap.c,
bitmap.h, builtin-types.def, builtins.c, builtins.def,
c-aux-info.c, c-common.c, c-common.def, c-common.h,
c-convert.c, c-decl.c, c-dump.c, c-dump.h, c-errors.c,
c-format.c, c-lang.c, c-lex.c, c-lex.h, c-parse.in,
c-pragma.c, c-pragma.h, c-semantics.c, c-tree.h, c-typeck.c,
caller-save.c, calls.c, collect2.c, collect2.h, combine.c,
conditions.h, config.gcc, configure.frag, configure.in,
conflict.c, convert.c, convert.h, cppspec.c, crtstuff.c,
cse.c, cselib.c, cselib.h, dbxout.c, dbxout.h, defaults.h,
dependence.c, df.c, df.h, diagnostic.c, diagnostic.h,
doloop.c, dominance.c, dwarf.h, dwarf2.h, dwarf2asm.c,
dwarf2asm.h, dwarf2out.c, dwarf2out.h, dwarfout.c,
emit-rtl.c, errors.c, errors.h, except.c, except.h,
exgettext, explow.c, expmed.c, expr.c, expr.h, final.c,
fixproto, flags.h, flow.c, fold-const.c, fp-test.c,
function.c, function.h, gbl-ctors.h, gcc.c, gcc.h, gcc.hlp,
gccspec.c, gcov-io.h, gcse.c, genattr.c, genattrtab.c,
gencheck.c, gencodes.c, genconfig.c, genemit.c,
genextract.c, genflags.c, gengenrtl.c, genmultilib,
genopinit.c, genoutput.c, genpeep.c, genrecog.c,
gensupport.c, gensupport.h, ggc-callbacks.c, ggc-common.c,
ggc-none.c, ggc-page.c, ggc-simple.c, ggc.h, global.c,
graph.c, graph.h, gthr-aix.h, gthr-dce.h, gthr-posix.h,
gthr-rtems.h, gthr-single.h, gthr-solaris.h, gthr-vxworks.h,
gthr-win32.h, gthr.h, haifa-sched.c, halfpic.c, halfpic.h,
hard-reg-set.h, hwint.h, ifcvt.c, input.h, insn-addr.h,
integrate.c, integrate.h, jump.c, lcm.c, libgcc2.c,
libgcc2.h, lists.c, local-alloc.c, loop.c, loop.h,
machmode.def, machmode.h, main.c, mbchar.c, mbchar.h,
mips-tdump.c, mips-tfile.c, mklibgcc.in, mkmap-flat.awk,
mkmap-symver.awk, optabs.c, output.h, params.c, params.def,
params.h, predict.c, predict.def, predict.h, prefix.c,
prefix.h, print-rtl.c, print-tree.c, profile.c, protoize.c,
read-rtl.c, real.c, real.h, recog.c, recog.h, reg-stack.c,
regclass.c, regmove.c, regrename.c, regs.h, reload.c,
reload.h, reload1.c, reorg.c, resource.c, resource.h, rtl.c,
rtl.def, rtl.h, rtlanal.c, sbitmap.c, sbitmap.h,
sched-deps.c, sched-ebb.c, sched-int.h, sched-rgn.c,
sched-vis.c, sdbout.c, sdbout.h, sibcall.c, simplify-rtx.c,
ssa-ccp.c, ssa-dce.c, ssa.c, ssa.h, stmt.c, stor-layout.c,
stringpool.c, system.h, timevar.c, timevar.def, timevar.h,
tlink.c, toplev.c, toplev.h, tree.c, tree.def, tree.h,
tsystem.h, unroll.c, unwind-dw2-fde.c, unwind-dw2-fde.h,
unwind-dw2.c, unwind-pe.h, unwind-sjlj.c, unwind.h,
unwind.inc, varasm.c, varray.c, varray.h, xcoffout.c,
xcoffout.h: replace "GNU CC" with "GCC".
From-SVN: r45105
2001-08-22 16:35:51 +02:00
|
|
|
|
along with GCC; see the file COPYING. If not, write to the Free
|
|
|
|
|
Software Foundation, 59 Temple Place - Suite 330, Boston, MA
|
|
|
|
|
02111-1307, USA. */
|
1992-03-11 23:24:26 +01:00
|
|
|
|
|
|
|
|
|
/* 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"
|
Major cutover to using system.h:
* Makefile.in (alias.o, bitmap.o, c-aux-info.o, c-common.o,
c-decl.o, c-iterate.o, c-lang.o, c-lex.o, c-pragma.o, c-typeck.o,
caller-save.o, calls.o, collect2.o, combine.o, cse.o, dbxout.o,
dwarf2out.o, dwarfout.o, emit-rtl.o, except.o, explow.o, expmed.o,
expr.o, final.o, flow.o, function.o, getpwd.o, global.o,
integrate.o, jump.o, local-alloc.o, loop.o, optabs.o, pexecute.o,
prefix.o, print-rtl.o, print-tree.o, profile.o, real.o, recog.o,
reg-stack.o, regclass.o, regmove.o, reload.o, reload1.o, reorg.o,
rtl.o, rtlanal.o, sdbout.o, stmt.o, stor-layout.o, stupid.o,
tlink.o, toplev.o, tree.o, unroll.o, varasm.o, xcoffout.o): Depend
on system.h.
* alias.c, bitmap.c, c-aux-info.c, c-common.c, c-decl.c,
c-iterate.c, c-lang.c, c-lex.c, c-pragma.c, c-typeck.c,
caller-save.c, calls.c, collect2.c, combine.c, cse.c, dbxout.c,
dwarf2out.c, dwarfout.c, emit-rtl.c, except.c, explow.c, expmed.c,
expr.c, final.c, flow.c, function.c, gcc.c, getpwd.c, global.c,
integrate.c, jump.c, local-alloc.c, loop.c, optabs.c, pexecute.c,
prefix.c, print-rtl.c, print-tree.c, profile.c, real.c, recog.c,
reg-stack.c, regclass.c, regmove.c, reload.c, reload1.c, reorg.c,
rtl.c, rtlanal.c, sched.c, sdbout.c, stmt.c, stor-layout.c,
stupid.c, tlink.c, toplev.c, tree.c, unroll.c, varasm.c,
xcoffout.c: Include system.h. Organize include ordering so
that stdarg/varargs comes before other system headers. Remove
spurious casts of functions assured of a prototype in system.h.
From-SVN: r18726
1998-03-20 15:58:42 +01:00
|
|
|
|
#include "system.h"
|
2002-12-16 19:23:00 +01:00
|
|
|
|
#include "coretypes.h"
|
|
|
|
|
#include "tm.h"
|
1992-03-11 23:24:26 +01:00
|
|
|
|
#include "tree.h"
|
|
|
|
|
#include "rtl.h"
|
|
|
|
|
#include "flags.h"
|
Warning fixes:
* Makefile.in (xcoffout.o): Depend on toplev.h, output.h and dbxout.h.
* config/fp-bit.c (_fpmul_parts): Move variables `x', `ylow',
`yhigh' and `bit' into the scope in which they are used.
(_fpdiv_parts): Remove unused variables `low', `high', `r0', `r1',
`y0', `y1', `q', `remainder', `carry', `d0' and `d1'.
* rs6000.c: Move include of output.h below tree.h. Include toplev.h.
(any_operand): Mark unused parameters `op' and `mode' with
ATTRIBUTE_UNUSED.
(count_register_operand): Likewise for parameter `mode'.
(fpmem_operand): Likewise.
(short_cint_operand): Likewise.
(u_short_cint_operand): Likewise.
(non_short_cint_operand): Likewise.
(got_operand): Likewise.
(got_no_const_operand): Likewise.
(non_add_cint_operand): Likewise.
(non_logical_cint_operand): Likewise.
(mask_operand): Likewise.
(current_file_function_operand): Likewise.
(small_data_operand): Likewise for parameters `op' and `mode' but
only when !TARGET_ELF.
(init_cumulative_args): Mark parameters `libname' with
ATTRIBUTE_UNUSED.
(function_arg_pass_by_reference): Likewise for parameters `cum',
`mode' and `named'.
(expand_builtin_saveregs): Likewise for parameter `args'.
(load_multiple_operation): Likewise for parameter `mode'.
(store_multiple_operation): Likewise.
(branch_comparison_operator): Likewise.
(secondary_reload_class): Likewise.
(print_operand): Add parentheses around & operation.
(output_prolog): Mark parameter `size' with ATTRIBUTE_UNUSED.
(output_epilog): Likewise. Cast argument to fprintf to int.
(rs6000_adjust_cost): Mark parameter `dep_insn' with ATTRIBUTE_UNUSED.
(rs6000_valid_decl_attribute_p): Likewise for parameters `decl',
`attributes', `identifier' and `args'.
(rs6000_valid_type_attribute_p): Likewise for parameter `attributes'.
(rs6000_comp_type_attributes): Likewise for parameters `type1' and
`type2'.
(rs6000_set_default_type_attributes): Likewise for parameter `type'.
* rs6000.h (RTX_COSTS): Add parentheses around & operation.
(toc_section, private_data_section, trap_comparison_operator): Add
prototypes.
* dbxout.h (dbxout_parms, dbxout_reg_parms, dbxout_syms): Add
prototypes.
* xcoffout.c: Include toplev.h, outout.h and dbxout.h.
* xcoffout.h (stab_to_sclass, xcoffout_begin_function,
xcoffout_begin_block, xcoffout_end_epilogue,
xcoffout_end_function, xcoffout_end_block,
xcoff_output_standard_types, xcoffout_declare_function,
xcoffout_source_line): Add prototypes.
From-SVN: r20717
1998-06-25 15:05:20 +02:00
|
|
|
|
#include "toplev.h"
|
|
|
|
|
#include "output.h"
|
1999-11-06 19:00:18 +01:00
|
|
|
|
#include "ggc.h"
|
system.h (STRIP_NAME_ENCODING): Poison it.
* system.h (STRIP_NAME_ENCODING): Poison it.
* output.h (STRIP_NAME_ENCODING): Remove.
(default_strip_name_encoding): Declare.
* target-def.h (TARGET_STRIP_NAME_ENCODING): New.
* target.h (strip_name_encoding): New.
* varasm.c (default_strip_name_encoding): New.
* dwarf2asm.c, varasm.c, config/darwin.c, config/darwin.h,
config/alpha/alpha.c, config/arm/pe.c, config/avr/avr.c,
config/cris/cris.c, config/i386/cygwin.h, config/i386/interix.c,
config/i386/winnt.c, config/m32r/m32r.h, config/mcore/mcore-elf.h,
config/mcore/mcore-pe.h, config/mcore/mcore.c, config/mcore/mcore.h,
config/mips/mips.c, config/mn10200/mn10200.h, config/mn10300/mn10300.h,
config/pa/pa.c, config/pa/pa.h, config/pa/som.h,
config/rs6000/rs6000.c, config/rs6000/sysv4.h, config/rs6000/xcoff.h,
config/v850/v850.h: Use the hook, not the macro.
* config/darwin-protos.h, config/darwin.c, config/darwin.h,
config/alpha/alpha.c, config/alpha/alpha.h, config/h8300/h8300.c,
config/h8300/h8300.h, config/i386/cygwin.h, config/i386/i386-interix.h,
config/i386/i386-protos.h, config/i386/win32.h, config/i386/winnt.c,
config/ia64/ia64.c, config/ia64/ia64.h, config/m32r/m32r.c,
config/m32r/m32r.h, config/mcore/mcore.c, config/mcore/mcore.h,
config/pa/pa.c, config/rs6000/rs6000.c, config/rs6000/sysv4.h,
config/rs6000/xcoff.h, config/sh/sh.c, config/sh/sh.h,
config/v850/v850.c, config/v850/v850.h:
Move STRIP_NAME_ENCODING to out-of-line function and add
TARGET_STRIP_NAME_ENCODING.
* config/arm/arm.c, config/arm/arm.h, config/mmix/mmix-protos.h,
config/mmix/mmix.c, config/mmix/mmix.h: Replace STRIP_NAME_ENCODING
with TARGET_STRIP_NAME_ENCODING referencing existing function;
make function static.
* xcoffout.c: Include target.h
* Makefile.in (xcoffout.o): Update.
* config/avr/avr.c (avr_encode_section_info): Correct prototype.
* config/avr/avr.h (STRIP_NAME_ENCODING): Remove.
* config/rs6000/rs6000.c (rs6000_xcoff_unique_section): Mark
reloc argument unused.
* config/sh/sh.c (TARGET_ENCODE_SECTION_INFO): New.
* doc/tm.texi (TARGET_STRIP_NAME_ENCODING): Update from previous
STRIP_NAME_ENCODING docs.
From-SVN: r53615
2002-05-19 09:55:48 +02:00
|
|
|
|
#include "target.h"
|
1992-03-11 23:24:26 +01:00
|
|
|
|
|
|
|
|
|
#ifdef XCOFF_DEBUGGING_INFO
|
|
|
|
|
|
|
|
|
|
/* This defines the C_* storage classes. */
|
2003-12-02 10:07:25 +01:00
|
|
|
|
#include "xcoff.h"
|
1992-03-23 20:29:32 +01:00
|
|
|
|
#include "xcoffout.h"
|
Warning fixes:
* Makefile.in (xcoffout.o): Depend on toplev.h, output.h and dbxout.h.
* config/fp-bit.c (_fpmul_parts): Move variables `x', `ylow',
`yhigh' and `bit' into the scope in which they are used.
(_fpdiv_parts): Remove unused variables `low', `high', `r0', `r1',
`y0', `y1', `q', `remainder', `carry', `d0' and `d1'.
* rs6000.c: Move include of output.h below tree.h. Include toplev.h.
(any_operand): Mark unused parameters `op' and `mode' with
ATTRIBUTE_UNUSED.
(count_register_operand): Likewise for parameter `mode'.
(fpmem_operand): Likewise.
(short_cint_operand): Likewise.
(u_short_cint_operand): Likewise.
(non_short_cint_operand): Likewise.
(got_operand): Likewise.
(got_no_const_operand): Likewise.
(non_add_cint_operand): Likewise.
(non_logical_cint_operand): Likewise.
(mask_operand): Likewise.
(current_file_function_operand): Likewise.
(small_data_operand): Likewise for parameters `op' and `mode' but
only when !TARGET_ELF.
(init_cumulative_args): Mark parameters `libname' with
ATTRIBUTE_UNUSED.
(function_arg_pass_by_reference): Likewise for parameters `cum',
`mode' and `named'.
(expand_builtin_saveregs): Likewise for parameter `args'.
(load_multiple_operation): Likewise for parameter `mode'.
(store_multiple_operation): Likewise.
(branch_comparison_operator): Likewise.
(secondary_reload_class): Likewise.
(print_operand): Add parentheses around & operation.
(output_prolog): Mark parameter `size' with ATTRIBUTE_UNUSED.
(output_epilog): Likewise. Cast argument to fprintf to int.
(rs6000_adjust_cost): Mark parameter `dep_insn' with ATTRIBUTE_UNUSED.
(rs6000_valid_decl_attribute_p): Likewise for parameters `decl',
`attributes', `identifier' and `args'.
(rs6000_valid_type_attribute_p): Likewise for parameter `attributes'.
(rs6000_comp_type_attributes): Likewise for parameters `type1' and
`type2'.
(rs6000_set_default_type_attributes): Likewise for parameter `type'.
* rs6000.h (RTX_COSTS): Add parentheses around & operation.
(toc_section, private_data_section, trap_comparison_operator): Add
prototypes.
* dbxout.h (dbxout_parms, dbxout_reg_parms, dbxout_syms): Add
prototypes.
* xcoffout.c: Include toplev.h, outout.h and dbxout.h.
* xcoffout.h (stab_to_sclass, xcoffout_begin_function,
xcoffout_begin_block, xcoffout_end_epilogue,
xcoffout_end_function, xcoffout_end_block,
xcoff_output_standard_types, xcoffout_declare_function,
xcoffout_source_line): Add prototypes.
From-SVN: r20717
1998-06-25 15:05:20 +02:00
|
|
|
|
#include "dbxout.h"
|
1992-03-11 23:24:26 +01:00
|
|
|
|
#include "gstab.h"
|
|
|
|
|
|
|
|
|
|
/* Line number of beginning of current function, minus one.
|
|
|
|
|
Negative means not in a function or not using xcoff. */
|
|
|
|
|
|
1995-12-15 12:34:57 +01:00
|
|
|
|
static int xcoff_begin_function_line = -1;
|
|
|
|
|
static int xcoff_inlining = 0;
|
1992-03-11 23:24:26 +01:00
|
|
|
|
|
|
|
|
|
/* Name of the current include file. */
|
|
|
|
|
|
2000-05-06 06:31:16 +02:00
|
|
|
|
const char *xcoff_current_include_file;
|
1992-03-11 23:24:26 +01:00
|
|
|
|
|
|
|
|
|
/* 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. */
|
|
|
|
|
|
2000-05-06 06:31:16 +02:00
|
|
|
|
static const char *xcoff_current_function_file;
|
1992-03-11 23:24:26 +01:00
|
|
|
|
|
|
|
|
|
/* 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;
|
1994-06-01 02:22:08 +02:00
|
|
|
|
|
|
|
|
|
/* Last source file name mentioned in a NOTE insn. */
|
|
|
|
|
|
2000-05-06 06:31:16 +02:00
|
|
|
|
const char *xcoff_lastfile;
|
1992-03-11 23:24:26 +01:00
|
|
|
|
|
|
|
|
|
/* Macro definitions used below. */
|
|
|
|
|
|
1994-06-01 02:22:08 +02:00
|
|
|
|
#define ABS_OR_RELATIVE_LINENO(LINENO) \
|
1995-09-11 23:39:30 +02:00
|
|
|
|
((xcoff_inlining) ? (LINENO) : (LINENO) - xcoff_begin_function_line)
|
1994-06-01 02:22:08 +02:00
|
|
|
|
|
|
|
|
|
/* Output source line numbers via ".line" rather than ".stabd". */
|
2003-06-17 10:06:58 +02:00
|
|
|
|
#define ASM_OUTPUT_SOURCE_LINE(FILE,LINENUM,COUNTER) \
|
2002-01-10 17:55:14 +01:00
|
|
|
|
do \
|
|
|
|
|
{ \
|
|
|
|
|
if (xcoff_begin_function_line >= 0) \
|
|
|
|
|
fprintf (FILE, "\t.line\t%d\n", ABS_OR_RELATIVE_LINENO (LINENUM)); \
|
|
|
|
|
} \
|
|
|
|
|
while (0)
|
1994-06-01 02:22:08 +02:00
|
|
|
|
|
1992-03-11 23:24:26 +01:00
|
|
|
|
#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); \
|
|
|
|
|
}
|
|
|
|
|
|
2003-07-06 18:53:24 +02:00
|
|
|
|
#define ASM_OUTPUT_LFE(FILE,LINENUM) \
|
2002-01-10 17:55:14 +01:00
|
|
|
|
do \
|
|
|
|
|
{ \
|
|
|
|
|
fprintf (FILE, "\t.ef\t%d\n", (LINENUM)); \
|
|
|
|
|
xcoff_begin_function_line = -1; \
|
|
|
|
|
} \
|
|
|
|
|
while (0)
|
1992-03-11 23:24:26 +01:00
|
|
|
|
|
|
|
|
|
#define ASM_OUTPUT_LBB(FILE,LINENUM,BLOCKNUM) \
|
1994-05-20 18:48:11 +02:00
|
|
|
|
fprintf (FILE, "\t.bb\t%d\n", ABS_OR_RELATIVE_LINENO (LINENUM))
|
1992-03-11 23:24:26 +01:00
|
|
|
|
|
|
|
|
|
#define ASM_OUTPUT_LBE(FILE,LINENUM,BLOCKNUM) \
|
1994-05-20 18:48:11 +02:00
|
|
|
|
fprintf (FILE, "\t.eb\t%d\n", ABS_OR_RELATIVE_LINENO (LINENUM))
|
Major cutover to using system.h:
* Makefile.in (alias.o, bitmap.o, c-aux-info.o, c-common.o,
c-decl.o, c-iterate.o, c-lang.o, c-lex.o, c-pragma.o, c-typeck.o,
caller-save.o, calls.o, collect2.o, combine.o, cse.o, dbxout.o,
dwarf2out.o, dwarfout.o, emit-rtl.o, except.o, explow.o, expmed.o,
expr.o, final.o, flow.o, function.o, getpwd.o, global.o,
integrate.o, jump.o, local-alloc.o, loop.o, optabs.o, pexecute.o,
prefix.o, print-rtl.o, print-tree.o, profile.o, real.o, recog.o,
reg-stack.o, regclass.o, regmove.o, reload.o, reload1.o, reorg.o,
rtl.o, rtlanal.o, sdbout.o, stmt.o, stor-layout.o, stupid.o,
tlink.o, toplev.o, tree.o, unroll.o, varasm.o, xcoffout.o): Depend
on system.h.
* alias.c, bitmap.c, c-aux-info.c, c-common.c, c-decl.c,
c-iterate.c, c-lang.c, c-lex.c, c-pragma.c, c-typeck.c,
caller-save.c, calls.c, collect2.c, combine.c, cse.c, dbxout.c,
dwarf2out.c, dwarfout.c, emit-rtl.c, except.c, explow.c, expmed.c,
expr.c, final.c, flow.c, function.c, gcc.c, getpwd.c, global.c,
integrate.c, jump.c, local-alloc.c, loop.c, optabs.c, pexecute.c,
prefix.c, print-rtl.c, print-tree.c, profile.c, real.c, recog.c,
reg-stack.c, regclass.c, regmove.c, reload.c, reload1.c, reorg.c,
rtl.c, rtlanal.c, sched.c, sdbout.c, stmt.c, stor-layout.c,
stupid.c, tlink.c, toplev.c, tree.c, unroll.c, varasm.c,
xcoffout.c: Include system.h. Organize include ordering so
that stdarg/varargs comes before other system headers. Remove
spurious casts of functions assured of a prototype in system.h.
From-SVN: r18726
1998-03-20 15:58:42 +01:00
|
|
|
|
|
2003-07-06 18:53:24 +02:00
|
|
|
|
static void xcoffout_block (tree, int, tree);
|
|
|
|
|
static void xcoffout_source_file (FILE *, const char *, int);
|
1992-03-11 23:24:26 +01:00
|
|
|
|
|
|
|
|
|
/* Support routines for XCOFF debugging info. */
|
|
|
|
|
|
2004-02-12 22:42:28 +01:00
|
|
|
|
struct xcoff_type_number
|
1992-03-11 23:24:26 +01:00
|
|
|
|
{
|
2004-02-12 22:42:28 +01:00
|
|
|
|
const char *name;
|
|
|
|
|
int number;
|
|
|
|
|
};
|
|
|
|
|
static const struct xcoff_type_number xcoff_type_numbers[] = {
|
|
|
|
|
{ "int", -1 },
|
|
|
|
|
{ "char", -2 },
|
|
|
|
|
{ "short int", -3 },
|
|
|
|
|
{ "long int", -4 }, /* fiddled to -31 if 64 bits */
|
|
|
|
|
{ "unsigned char", -5 },
|
|
|
|
|
{ "signed char", -6 },
|
|
|
|
|
{ "short unsigned int", -7 },
|
|
|
|
|
{ "unsigned int", -8 },
|
1992-03-11 23:24:26 +01:00
|
|
|
|
/* No such type "unsigned". */
|
2004-02-12 22:42:28 +01:00
|
|
|
|
{ "long unsigned int", -10 }, /* fiddled to -32 if 64 bits */
|
|
|
|
|
{ "void", -11 },
|
|
|
|
|
{ "float", -12 },
|
|
|
|
|
{ "double", -13 },
|
|
|
|
|
{ "long double", -14 },
|
1992-03-11 23:24:26 +01:00
|
|
|
|
/* Pascal and Fortran types run from -15 to -29. */
|
2004-02-12 22:42:28 +01:00
|
|
|
|
{ "wchar", -30 }, /* XXX Should be "wchar_t" ? */
|
|
|
|
|
{ "long long int", -31 },
|
|
|
|
|
{ "long long unsigned int", -32 },
|
1994-12-03 00:14:05 +01:00
|
|
|
|
/* Additional Fortran types run from -33 to -37. */
|
1992-03-11 23:24:26 +01:00
|
|
|
|
|
|
|
|
|
/* ??? Should also handle built-in C++ and Obj-C types. There perhaps
|
|
|
|
|
aren't any that C doesn't already have. */
|
2004-02-12 22:42:28 +01:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/* Returns an XCOFF fundamental type number for DECL (assumed to be a
|
|
|
|
|
TYPE_DECL), or 0 if dbxout.c should assign a type number normally. */
|
|
|
|
|
int
|
|
|
|
|
xcoff_assign_fundamental_type_number (tree decl)
|
|
|
|
|
{
|
2004-02-13 19:24:06 +01:00
|
|
|
|
const char *name;
|
2004-02-12 22:42:28 +01:00
|
|
|
|
size_t i;
|
|
|
|
|
|
|
|
|
|
/* Do not waste time searching the list for non-intrinsic types. */
|
2004-02-13 19:24:06 +01:00
|
|
|
|
if (DECL_NAME (decl) == 0 || DECL_SOURCE_LINE (decl) > 0)
|
2004-02-12 22:42:28 +01:00
|
|
|
|
return 0;
|
|
|
|
|
|
2004-02-13 19:24:06 +01:00
|
|
|
|
name = IDENTIFIER_POINTER (DECL_NAME (decl));
|
|
|
|
|
|
2004-02-12 22:42:28 +01:00
|
|
|
|
/* Linear search, blech, but the list is too small to bother
|
|
|
|
|
doing anything else. */
|
|
|
|
|
for (i = 0; i < ARRAY_SIZE (xcoff_type_numbers); i++)
|
|
|
|
|
if (!strcmp (xcoff_type_numbers[i].name, name))
|
|
|
|
|
goto found;
|
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
|
|
found:
|
|
|
|
|
/* -4 and -10 should be replaced with -31 and -32, respectively,
|
|
|
|
|
when used for a 64-bit type. */
|
|
|
|
|
if (int_size_in_bytes (TREE_TYPE (decl)) == 8)
|
|
|
|
|
{
|
|
|
|
|
if (xcoff_type_numbers[i].number == -4)
|
|
|
|
|
return -31;
|
|
|
|
|
if (xcoff_type_numbers[i].number == -10)
|
|
|
|
|
return -32;
|
|
|
|
|
}
|
|
|
|
|
return xcoff_type_numbers[i].number;
|
1992-03-11 23:24:26 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Print an error message for unrecognized stab codes. */
|
|
|
|
|
|
|
|
|
|
#define UNKNOWN_STAB(STR) \
|
c-decl.c (duplicate_decls, [...]): Remove leading capital from diagnostics.
* c-decl.c (duplicate_decls, push_parm_decl): Remove leading
capital from diagnostics.
* c-lex.c (cb_file_change): Similarly.
* c-parse.in : Similarly.
* cfgrtl.c (verify_flow_info): Similarly.
* collect2.c: Similarly.
* cppfiles.c (find_include_file): Similarly.
* cppinit.c (cpp_handle_option): Similarly.
* cpplex.c (cpp_spell_token): Similarly.
* cppmain.c (do_preprocessing): Similarly.
* gcc.c (translate_options, process_command, do_spec1,
main, pfatal_execute): Similarly.
* genattr.c (main): Similarly.
* genattrtab.c (check_attr_test, operate_exp, simplify_test_exp,
write_test_expr, main): Similarly.
* gencodes.c (main): Similarly.
* genconfig.c (main): Similarly.
* genconstants.c (main): Similarly.
* genemit.c (main): Similarly.
* genextract.c (main): Similarly.
* genflags.c (main): Similarly.
* genopinit.c (main): Similarly.
* genoutput.c (process_template, main): Similarly.
* genpeep.c (main): Similarly.
* genrecog.c (main): Similarly.
* gensupport.c (is_predicable, identify_predicable_attribute,
alter_predicate_for_insn, init_md_reader_args, main): Similarly.
* ggc-page.c (alloc_anon): Similarly.
* mips-tfile.c (add_string, add_procedure, add_file, read_line,
parse_begin, parse_bend, parse_def, parse_end, parse_file,
parse_stabs_common, parse_stabs, write_varray, write_object,
read_seek, copy_object, main, error): Similarly.
* profile.c (compute_branch_probabilities): Similarly.
* reg-stack.c (check_asm_stack_operands): Similarly.
* reload.c (find_reloads): Similarly.
* reload1.c (spill_failure, failed_reload): Similarly.
* rtl-error.c (_fatal_insn_not_found): Similarly.
* toplev.c (read_integral_parameter, crash_signal,
decode_f_option, set_target_switch, parse_options_and_default_flags)
: Similarly.
* tradcif.y (parse_number, yylex): Similarly.
* tradcpp.c (main, fancy_abort): Similarly.
* tree.c (tree_check_failed): Similarly.
* varray.c (varray_check_failed): Similarly.
* xcoffout.c (xcoff_output_standard_types): Similarly.
cp:
* call.c (build_java_interface_fn_ref): Similarly.
* except.c (is_admissible_throw_operand): Similarly.
* init.c (build_java_class_ref): Similarly.
* xref.c (open_xref_file): Similarly.
objc:
* objc-act.c (get_object_ref, lookup_and_install_protocols,
build_objc_string_object, objc_declare_alias, build_ivar_chain,
finish_message_expr, build_protocol_expr, is_public,
start_class): Similarly.
testsuite:
* objc.dg/alias.m: Update.
* objc.dg/class-1.m: Update.
* objc.dg/const-str-1.m: Update.
* objc.dg/fwd-proto-1.m: Update.
* objc.dg/id-1.m: Update.
* objc.dg/super-class-1.m: Update.
From-SVN: r47518
2001-12-02 01:04:36 +01:00
|
|
|
|
internal_error ("no sclass for %s stab (0x%x)\n", STR, stab)
|
1992-03-11 23:24:26 +01:00
|
|
|
|
|
|
|
|
|
/* Conversion routine from BSD stabs to AIX storage classes. */
|
|
|
|
|
|
|
|
|
|
int
|
2003-07-06 18:53:24 +02:00
|
|
|
|
stab_to_sclass (int stab)
|
1992-03-11 23:24:26 +01:00
|
|
|
|
{
|
|
|
|
|
switch (stab)
|
|
|
|
|
{
|
|
|
|
|
case N_GSYM:
|
|
|
|
|
return C_GSYM;
|
|
|
|
|
|
|
|
|
|
case N_FNAME:
|
2000-08-29 17:54:29 +02:00
|
|
|
|
UNKNOWN_STAB ("N_FNAME");
|
1992-03-11 23:24:26 +01:00
|
|
|
|
|
|
|
|
|
case N_FUN:
|
|
|
|
|
return C_FUN;
|
|
|
|
|
|
|
|
|
|
case N_STSYM:
|
|
|
|
|
case N_LCSYM:
|
|
|
|
|
return C_STSYM;
|
|
|
|
|
|
|
|
|
|
case N_MAIN:
|
2000-08-29 17:54:29 +02:00
|
|
|
|
UNKNOWN_STAB ("N_MAIN");
|
1992-03-11 23:24:26 +01:00
|
|
|
|
|
|
|
|
|
case N_RSYM:
|
|
|
|
|
return C_RSYM;
|
|
|
|
|
|
|
|
|
|
case N_SSYM:
|
2000-08-29 17:54:29 +02:00
|
|
|
|
UNKNOWN_STAB ("N_SSYM");
|
1992-03-11 23:24:26 +01:00
|
|
|
|
|
|
|
|
|
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:
|
2000-08-29 17:54:29 +02:00
|
|
|
|
UNKNOWN_STAB ("N_SO");
|
1992-03-11 23:24:26 +01:00
|
|
|
|
|
|
|
|
|
case N_SOL:
|
2000-08-29 17:54:29 +02:00
|
|
|
|
UNKNOWN_STAB ("N_SOL");
|
1992-03-11 23:24:26 +01:00
|
|
|
|
|
|
|
|
|
case N_SLINE:
|
2000-08-29 17:54:29 +02:00
|
|
|
|
UNKNOWN_STAB ("N_SLINE");
|
1992-03-11 23:24:26 +01:00
|
|
|
|
|
|
|
|
|
case N_DSLINE:
|
2000-08-29 17:54:29 +02:00
|
|
|
|
UNKNOWN_STAB ("N_DSLINE");
|
1992-03-11 23:24:26 +01:00
|
|
|
|
|
|
|
|
|
case N_BSLINE:
|
2000-08-29 17:54:29 +02:00
|
|
|
|
UNKNOWN_STAB ("N_BSLINE");
|
1992-03-11 23:24:26 +01:00
|
|
|
|
|
|
|
|
|
case N_BINCL:
|
2000-08-29 17:54:29 +02:00
|
|
|
|
UNKNOWN_STAB ("N_BINCL");
|
1992-03-11 23:24:26 +01:00
|
|
|
|
|
|
|
|
|
case N_EINCL:
|
2000-08-29 17:54:29 +02:00
|
|
|
|
UNKNOWN_STAB ("N_EINCL");
|
1992-03-11 23:24:26 +01:00
|
|
|
|
|
|
|
|
|
case N_EXCL:
|
2000-08-29 17:54:29 +02:00
|
|
|
|
UNKNOWN_STAB ("N_EXCL");
|
1992-03-11 23:24:26 +01:00
|
|
|
|
|
|
|
|
|
case N_LBRAC:
|
2000-08-29 17:54:29 +02:00
|
|
|
|
UNKNOWN_STAB ("N_LBRAC");
|
1992-03-11 23:24:26 +01:00
|
|
|
|
|
|
|
|
|
case N_RBRAC:
|
2000-08-29 17:54:29 +02:00
|
|
|
|
UNKNOWN_STAB ("N_RBRAC");
|
1992-03-11 23:24:26 +01:00
|
|
|
|
|
|
|
|
|
case N_BCOMM:
|
|
|
|
|
return C_BCOMM;
|
|
|
|
|
case N_ECOMM:
|
|
|
|
|
return C_ECOMM;
|
|
|
|
|
case N_ECOML:
|
|
|
|
|
return C_ECOML;
|
|
|
|
|
|
|
|
|
|
case N_LENG:
|
2000-08-29 17:54:29 +02:00
|
|
|
|
UNKNOWN_STAB ("N_LENG");
|
1992-03-11 23:24:26 +01:00
|
|
|
|
|
|
|
|
|
case N_PC:
|
2000-08-29 17:54:29 +02:00
|
|
|
|
UNKNOWN_STAB ("N_PC");
|
1992-03-11 23:24:26 +01:00
|
|
|
|
|
|
|
|
|
case N_M2C:
|
2000-08-29 17:54:29 +02:00
|
|
|
|
UNKNOWN_STAB ("N_M2C");
|
1992-03-11 23:24:26 +01:00
|
|
|
|
|
|
|
|
|
case N_SCOPE:
|
2000-08-29 17:54:29 +02:00
|
|
|
|
UNKNOWN_STAB ("N_SCOPE");
|
1992-03-11 23:24:26 +01:00
|
|
|
|
|
|
|
|
|
case N_CATCH:
|
2000-08-29 17:54:29 +02:00
|
|
|
|
UNKNOWN_STAB ("N_CATCH");
|
2001-04-18 08:15:38 +02:00
|
|
|
|
|
|
|
|
|
case N_OPT:
|
|
|
|
|
UNKNOWN_STAB ("N_OPT");
|
1992-03-11 23:24:26 +01:00
|
|
|
|
|
|
|
|
|
default:
|
2001-04-18 08:15:38 +02:00
|
|
|
|
UNKNOWN_STAB ("?");
|
2000-08-29 17:54:29 +02:00
|
|
|
|
}
|
1992-03-11 23:24:26 +01:00
|
|
|
|
}
|
1994-06-01 02:22:08 +02:00
|
|
|
|
|
|
|
|
|
/* Output debugging info to FILE to switch to sourcefile FILENAME.
|
|
|
|
|
INLINE_P is true if this is from an inlined function. */
|
|
|
|
|
|
2000-07-04 13:14:13 +02:00
|
|
|
|
static void
|
2003-07-06 18:53:24 +02:00
|
|
|
|
xcoffout_source_file (FILE *file, const char *filename, int inline_p)
|
1994-06-01 02:22:08 +02:00
|
|
|
|
{
|
|
|
|
|
if (filename
|
|
|
|
|
&& (xcoff_lastfile == 0 || strcmp (filename, xcoff_lastfile)
|
1995-09-11 23:39:30 +02:00
|
|
|
|
|| (inline_p && ! xcoff_inlining)
|
|
|
|
|
|| (! inline_p && xcoff_inlining)))
|
1994-06-01 02:22:08 +02:00
|
|
|
|
{
|
|
|
|
|
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;
|
|
|
|
|
}
|
2000-08-29 17:54:29 +02:00
|
|
|
|
xcoff_inlining = inline_p;
|
1994-06-01 02:22:08 +02:00
|
|
|
|
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;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
dbxout.c (dbxout_really_begin_function): Rename to dbxout_begin_function.
* dbxout.c (dbxout_really_begin_function): Rename to
dbxout_begin_function.
(dbx_debug_hooks, xcoff_debug_hooks): Update.
(dbxout_begin_function): Remove.
(dbxout_function): Update.
(dbxout_source_line): Update prototype.
* dbxout.h (dbxout_begin_function): Remove.
* debug.c (do_nothing_debug_hooks): Update.
(debug_nothing_tree): Update.
(debug_nothing_charstar_rtx): Remove.
* debug.h (union tree_node): Declare.
(struct rtx_def): Remove.
(gcc_debug_hooks): New hooks begin_prologue, end_prologue,
begin_function. Change source_line prototype.
(debug_nothing_tree): New.
(debug_nothing_charstar_rtx): Delete.
(dwarf2out_begin_prologue): Moved from ...
* tree.h: ... here.
* dwarf2out.c (dwarf2_debug_hooks): Update.
(dwarf2out_begin_prologue): Update prototype. If genuine dwarf2
debug info, call dwarf2out_source_line.
(dwarf2out_souce_line): Update prototype.
* dwarfout.c (dwarfout_begin_function): Rename dwarfout_end_prologue.
Change prototype, make static.
(dwarfout_source_line): Update prototype.
(dwarf_debug_hooks): Update.
* dwarfout.h (dwarfout_begin_function): Remove.
* final.c (final_start_function, final_scan_insn): Use appropriate
debug hooks, update to use notice_source_line.
(output_source_line): Rename notice_source_line. Don't call the
source_line debug hook.
* sdbout.c (sdbout_begin_function): Rename sdbout_begin_prologue,
make static, update prototype.
(sdbout_mark_begin_function): Rename sdbout_begin_function, update
prototype.
(sdbout_end_prologue): New.
(sdbout_source_line): Update prototype.
(sdbout_debug_hooks): Update.
(sdbout_symbol): Remove unused var.
* sdbout.h (sdbout_begin_function, sdbout_mark_begin_function):
Delete.
* varasm.c: Include debug.h.
(assemble_start_function): Use begin_function debug_hook.
* xcoffout.c (xcoffout_begin_prologue): Rename xcoffout_begin_function,
update with prototype.
(xcoffout_source_line): Update prototype.
* xcoffout.h (xcoffout_begin_prologue): Rename xcoffout_begin_function,
update prototype.
(xcoffout_source_line): Update prototype.
From-SVN: r44087
2001-07-17 21:47:58 +02:00
|
|
|
|
/* Output a line number symbol entry for location (FILENAME, LINE). */
|
1994-06-01 02:22:08 +02:00
|
|
|
|
|
|
|
|
|
void
|
2003-07-06 18:53:24 +02:00
|
|
|
|
xcoffout_source_line (unsigned int line, const char *filename)
|
1994-06-01 02:22:08 +02:00
|
|
|
|
{
|
dbxout.c (dbxout_really_begin_function): Rename to dbxout_begin_function.
* dbxout.c (dbxout_really_begin_function): Rename to
dbxout_begin_function.
(dbx_debug_hooks, xcoff_debug_hooks): Update.
(dbxout_begin_function): Remove.
(dbxout_function): Update.
(dbxout_source_line): Update prototype.
* dbxout.h (dbxout_begin_function): Remove.
* debug.c (do_nothing_debug_hooks): Update.
(debug_nothing_tree): Update.
(debug_nothing_charstar_rtx): Remove.
* debug.h (union tree_node): Declare.
(struct rtx_def): Remove.
(gcc_debug_hooks): New hooks begin_prologue, end_prologue,
begin_function. Change source_line prototype.
(debug_nothing_tree): New.
(debug_nothing_charstar_rtx): Delete.
(dwarf2out_begin_prologue): Moved from ...
* tree.h: ... here.
* dwarf2out.c (dwarf2_debug_hooks): Update.
(dwarf2out_begin_prologue): Update prototype. If genuine dwarf2
debug info, call dwarf2out_source_line.
(dwarf2out_souce_line): Update prototype.
* dwarfout.c (dwarfout_begin_function): Rename dwarfout_end_prologue.
Change prototype, make static.
(dwarfout_source_line): Update prototype.
(dwarf_debug_hooks): Update.
* dwarfout.h (dwarfout_begin_function): Remove.
* final.c (final_start_function, final_scan_insn): Use appropriate
debug hooks, update to use notice_source_line.
(output_source_line): Rename notice_source_line. Don't call the
source_line debug hook.
* sdbout.c (sdbout_begin_function): Rename sdbout_begin_prologue,
make static, update prototype.
(sdbout_mark_begin_function): Rename sdbout_begin_function, update
prototype.
(sdbout_end_prologue): New.
(sdbout_source_line): Update prototype.
(sdbout_debug_hooks): Update.
(sdbout_symbol): Remove unused var.
* sdbout.h (sdbout_begin_function, sdbout_mark_begin_function):
Delete.
* varasm.c: Include debug.h.
(assemble_start_function): Use begin_function debug_hook.
* xcoffout.c (xcoffout_begin_prologue): Rename xcoffout_begin_function,
update with prototype.
(xcoffout_source_line): Update prototype.
* xcoffout.h (xcoffout_begin_prologue): Rename xcoffout_begin_function,
update prototype.
(xcoffout_source_line): Update prototype.
From-SVN: r44087
2001-07-17 21:47:58 +02:00
|
|
|
|
bool inline_p = (strcmp (xcoff_current_function_file, filename) != 0
|
|
|
|
|
|| (int) line < xcoff_begin_function_line);
|
|
|
|
|
|
|
|
|
|
xcoffout_source_file (asm_out_file, filename, inline_p);
|
1994-06-01 02:22:08 +02:00
|
|
|
|
|
2003-06-17 10:06:58 +02:00
|
|
|
|
ASM_OUTPUT_SOURCE_LINE (asm_out_file, line, 0);
|
1994-06-01 02:22:08 +02:00
|
|
|
|
}
|
|
|
|
|
|
1992-03-11 23:24:26 +01:00
|
|
|
|
/* Output the symbols defined in block number DO_BLOCK.
|
|
|
|
|
|
|
|
|
|
This function works by walking the tree structure of blocks,
|
|
|
|
|
counting blocks until it finds the desired block. */
|
|
|
|
|
|
|
|
|
|
static int do_block = 0;
|
|
|
|
|
|
|
|
|
|
static void
|
2003-07-06 18:53:24 +02:00
|
|
|
|
xcoffout_block (tree block, int depth, tree args)
|
1992-03-11 23:24:26 +01:00
|
|
|
|
{
|
|
|
|
|
while (block)
|
|
|
|
|
{
|
|
|
|
|
/* Ignore blocks never expanded or otherwise marked as real. */
|
|
|
|
|
if (TREE_USED (block))
|
|
|
|
|
{
|
|
|
|
|
/* When we reach the specified block, output its symbols. */
|
2000-02-28 10:51:42 +01:00
|
|
|
|
if (BLOCK_NUMBER (block) == do_block)
|
1992-03-11 23:24:26 +01:00
|
|
|
|
{
|
|
|
|
|
/* 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. */
|
2000-02-28 10:51:42 +01:00
|
|
|
|
else if (BLOCK_NUMBER (block) >= do_block)
|
1992-03-11 23:24:26 +01:00
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
/* Output the subblocks. */
|
1992-07-06 22:15:06 +02:00
|
|
|
|
xcoffout_block (BLOCK_SUBBLOCKS (block), depth + 1, NULL_TREE);
|
1992-03-11 23:24:26 +01:00
|
|
|
|
}
|
|
|
|
|
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
|
2003-07-06 18:53:24 +02:00
|
|
|
|
xcoffout_begin_block (unsigned int line, unsigned int n)
|
1992-03-11 23:24:26 +01:00
|
|
|
|
{
|
|
|
|
|
tree decl = current_function_decl;
|
|
|
|
|
|
1994-01-17 22:37:52 +01:00
|
|
|
|
/* The IBM AIX compiler does not emit a .bb for the function level scope,
|
|
|
|
|
so we avoid it here also. */
|
|
|
|
|
if (n != 1)
|
dbxout.c (dbxout_source_line): Make static, update prototype.
* dbxout.c (dbxout_source_line): Make static, update prototype.
(dbx_debug_hooks, xcoff_debug_hooks): Add new hooks.
(dbxout_init, dbxout_finish, dbxout_source_line,
dbxout_begin_block, dbxout_end_block): Update for new prototypes.
* dbxout.h (dbxout_source_line): Delete.
* debug.c (debug_nothing_file, debug_nothing_file_int,
debug_nothing_file_charstar_rtx): New.
(do_nothing_debug_hooks): Update.
(debug_nothing_void, debug_nothing_charstar_rtx,
dwarf2out_end_epilogue): New.
(debug_nothing_file_charstar, debug_nothing_file_int_int): Rename.
* debug.h (struct rtx_def): Declare.
(gcc_debug_hooks): New hooks source_line, end_epilogue
and end_function.
(debug_nothing_void, debug_nothing_charstar_rtx,
dwarf2out_end_epilogue): New.
(debug_nothing_file_charstar, debug_nothing_file_int_int): Rename.
* dwarf2out.c (dwarf2out_source_line): Make static, update prototype.
(dwarf2_debug_hooks): Update.
(dwarf2out_init, dwarf2out_finish, dwarf2out_source_line,
dwarf2out_begin_block, dwarf2out_end_block): Update for new prototypes.
* dwarf2out.h (dwarf2out_source_line): Remove.
* dwarfout.c (dwarfout_end_epilogue, dwarfout_end_function):
Make static, update prototype.
(dwarfout_init, dwarfout_finish, dwarfout_source_line,
dwarfout_begin_block, dwarfout_end_block): Update for new prototypes.
(dwarf_debug_hooks): Update.
* dwarfout.h (dwarfout_end_epilogue, dwarfout_source_line,
dwarfout_end_function): Remove.
* final.c (profile_function): Use debug hooks for ending functions
and epilogues.
(output_source_line, final_end_function): Update prototype,
use debug hooks.
(final_start_function, final_scan_insn): Update.
* output.h (sdb_begin_function_line): Remove.
(final_end_function): Update prototype.
* sdbout.c (sdb_begin_function_line): Make static.
(PUT_SDB_EPILOGUE_END): Move to sdbout_end_epilogue.
(sdbout_source_line): New.
(sdbout_end_epilogue, sdbout_end_function): Make static, update
prototypes.
(sdb_debug_hooks): Update.
(sdbout_init, sdbout_source_line,
sdbout_begin_block, sdbout_end_block): Update for new prototypes.
* sdbout.h (sdbout_end_epilogue, sdbout_end_function): Remove.
* toplev.c (compile_file, rest_of_compilation): Update.
* tree.h (dwarf2out_end_epilogue): Move to debug.h.
* xcoffout.c (xcoffout_source_line, xcoffout_begin_block,
xcoffout_end_block, xcoffout_end_epilogue, xcoffout_end_function):
Update for prototype changes.
* xcoffout.h (xcoffout_source_line, xcoffout_begin_block,
xcoffout_end_block, xcoffout_end_epilogue): Update prototypes.
From-SVN: r44017
2001-07-15 10:34:46 +02:00
|
|
|
|
ASM_OUTPUT_LBB (asm_out_file, line, n);
|
1992-03-11 23:24:26 +01:00
|
|
|
|
|
|
|
|
|
do_block = n;
|
|
|
|
|
xcoffout_block (DECL_INITIAL (decl), 0, DECL_ARGUMENTS (decl));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Describe the end line-number of an internal block within a function. */
|
|
|
|
|
|
|
|
|
|
void
|
2003-07-06 18:53:24 +02:00
|
|
|
|
xcoffout_end_block (unsigned int line, unsigned int n)
|
1992-03-11 23:24:26 +01:00
|
|
|
|
{
|
1994-01-17 22:37:52 +01:00
|
|
|
|
if (n != 1)
|
dbxout.c (dbxout_source_line): Make static, update prototype.
* dbxout.c (dbxout_source_line): Make static, update prototype.
(dbx_debug_hooks, xcoff_debug_hooks): Add new hooks.
(dbxout_init, dbxout_finish, dbxout_source_line,
dbxout_begin_block, dbxout_end_block): Update for new prototypes.
* dbxout.h (dbxout_source_line): Delete.
* debug.c (debug_nothing_file, debug_nothing_file_int,
debug_nothing_file_charstar_rtx): New.
(do_nothing_debug_hooks): Update.
(debug_nothing_void, debug_nothing_charstar_rtx,
dwarf2out_end_epilogue): New.
(debug_nothing_file_charstar, debug_nothing_file_int_int): Rename.
* debug.h (struct rtx_def): Declare.
(gcc_debug_hooks): New hooks source_line, end_epilogue
and end_function.
(debug_nothing_void, debug_nothing_charstar_rtx,
dwarf2out_end_epilogue): New.
(debug_nothing_file_charstar, debug_nothing_file_int_int): Rename.
* dwarf2out.c (dwarf2out_source_line): Make static, update prototype.
(dwarf2_debug_hooks): Update.
(dwarf2out_init, dwarf2out_finish, dwarf2out_source_line,
dwarf2out_begin_block, dwarf2out_end_block): Update for new prototypes.
* dwarf2out.h (dwarf2out_source_line): Remove.
* dwarfout.c (dwarfout_end_epilogue, dwarfout_end_function):
Make static, update prototype.
(dwarfout_init, dwarfout_finish, dwarfout_source_line,
dwarfout_begin_block, dwarfout_end_block): Update for new prototypes.
(dwarf_debug_hooks): Update.
* dwarfout.h (dwarfout_end_epilogue, dwarfout_source_line,
dwarfout_end_function): Remove.
* final.c (profile_function): Use debug hooks for ending functions
and epilogues.
(output_source_line, final_end_function): Update prototype,
use debug hooks.
(final_start_function, final_scan_insn): Update.
* output.h (sdb_begin_function_line): Remove.
(final_end_function): Update prototype.
* sdbout.c (sdb_begin_function_line): Make static.
(PUT_SDB_EPILOGUE_END): Move to sdbout_end_epilogue.
(sdbout_source_line): New.
(sdbout_end_epilogue, sdbout_end_function): Make static, update
prototypes.
(sdb_debug_hooks): Update.
(sdbout_init, sdbout_source_line,
sdbout_begin_block, sdbout_end_block): Update for new prototypes.
* sdbout.h (sdbout_end_epilogue, sdbout_end_function): Remove.
* toplev.c (compile_file, rest_of_compilation): Update.
* tree.h (dwarf2out_end_epilogue): Move to debug.h.
* xcoffout.c (xcoffout_source_line, xcoffout_begin_block,
xcoffout_end_block, xcoffout_end_epilogue, xcoffout_end_function):
Update for prototype changes.
* xcoffout.h (xcoffout_source_line, xcoffout_begin_block,
xcoffout_end_block, xcoffout_end_epilogue): Update prototypes.
From-SVN: r44017
2001-07-15 10:34:46 +02:00
|
|
|
|
ASM_OUTPUT_LBE (asm_out_file, line, n);
|
1992-03-11 23:24:26 +01:00
|
|
|
|
}
|
|
|
|
|
|
1992-05-22 12:33:37 +02:00
|
|
|
|
/* Called at beginning of function (before prologue).
|
|
|
|
|
Declare function as needed for debugging. */
|
|
|
|
|
|
|
|
|
|
void
|
2003-07-06 18:53:24 +02:00
|
|
|
|
xcoffout_declare_function (FILE *file, tree decl, const char *name)
|
1992-05-22 12:33:37 +02:00
|
|
|
|
{
|
|
|
|
|
int i;
|
|
|
|
|
|
2000-07-04 13:14:13 +02:00
|
|
|
|
if (*name == '*')
|
|
|
|
|
name++;
|
1995-10-29 13:47:58 +01:00
|
|
|
|
else
|
|
|
|
|
for (i = 0; name[i]; ++i)
|
|
|
|
|
{
|
|
|
|
|
if (name[i] == '[')
|
|
|
|
|
{
|
2003-07-19 16:47:15 +02:00
|
|
|
|
char *n = alloca (i + 1);
|
1995-10-29 13:47:58 +01:00
|
|
|
|
strncpy (n, name, i);
|
|
|
|
|
n[i] = '\0';
|
2000-07-04 13:14:13 +02:00
|
|
|
|
name = n;
|
1995-10-29 13:47:58 +01:00
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
1992-05-22 12:33:37 +02:00
|
|
|
|
|
1995-05-16 14:39:54 +02:00
|
|
|
|
/* Any pending .bi or .ei must occur before the .function pseudo op.
|
1993-03-20 03:05:32 +01:00
|
|
|
|
Otherwise debuggers will think that the function is in the previous
|
|
|
|
|
file and/or at the wrong line number. */
|
2003-09-22 07:09:32 +02:00
|
|
|
|
xcoffout_source_file (file, DECL_SOURCE_FILE (decl), 0);
|
1992-05-22 12:33:37 +02:00
|
|
|
|
dbxout_symbol (decl, 0);
|
1999-09-28 20:13:58 +02:00
|
|
|
|
|
|
|
|
|
/* .function NAME, TOP, MAPPING, TYPE, SIZE
|
|
|
|
|
16 and 044 are placeholders for backwards compatibility */
|
2000-07-04 13:14:13 +02:00
|
|
|
|
fprintf (file, "\t.function .%s,.%s,16,044,FE..%s-.%s\n",
|
|
|
|
|
name, name, name, name);
|
1992-05-22 12:33:37 +02:00
|
|
|
|
}
|
|
|
|
|
|
dbxout.c (dbxout_really_begin_function): Rename to dbxout_begin_function.
* dbxout.c (dbxout_really_begin_function): Rename to
dbxout_begin_function.
(dbx_debug_hooks, xcoff_debug_hooks): Update.
(dbxout_begin_function): Remove.
(dbxout_function): Update.
(dbxout_source_line): Update prototype.
* dbxout.h (dbxout_begin_function): Remove.
* debug.c (do_nothing_debug_hooks): Update.
(debug_nothing_tree): Update.
(debug_nothing_charstar_rtx): Remove.
* debug.h (union tree_node): Declare.
(struct rtx_def): Remove.
(gcc_debug_hooks): New hooks begin_prologue, end_prologue,
begin_function. Change source_line prototype.
(debug_nothing_tree): New.
(debug_nothing_charstar_rtx): Delete.
(dwarf2out_begin_prologue): Moved from ...
* tree.h: ... here.
* dwarf2out.c (dwarf2_debug_hooks): Update.
(dwarf2out_begin_prologue): Update prototype. If genuine dwarf2
debug info, call dwarf2out_source_line.
(dwarf2out_souce_line): Update prototype.
* dwarfout.c (dwarfout_begin_function): Rename dwarfout_end_prologue.
Change prototype, make static.
(dwarfout_source_line): Update prototype.
(dwarf_debug_hooks): Update.
* dwarfout.h (dwarfout_begin_function): Remove.
* final.c (final_start_function, final_scan_insn): Use appropriate
debug hooks, update to use notice_source_line.
(output_source_line): Rename notice_source_line. Don't call the
source_line debug hook.
* sdbout.c (sdbout_begin_function): Rename sdbout_begin_prologue,
make static, update prototype.
(sdbout_mark_begin_function): Rename sdbout_begin_function, update
prototype.
(sdbout_end_prologue): New.
(sdbout_source_line): Update prototype.
(sdbout_debug_hooks): Update.
(sdbout_symbol): Remove unused var.
* sdbout.h (sdbout_begin_function, sdbout_mark_begin_function):
Delete.
* varasm.c: Include debug.h.
(assemble_start_function): Use begin_function debug_hook.
* xcoffout.c (xcoffout_begin_prologue): Rename xcoffout_begin_function,
update with prototype.
(xcoffout_source_line): Update prototype.
* xcoffout.h (xcoffout_begin_prologue): Rename xcoffout_begin_function,
update prototype.
(xcoffout_source_line): Update prototype.
From-SVN: r44087
2001-07-17 21:47:58 +02:00
|
|
|
|
/* Called at beginning of function body (at start of prologue).
|
1992-03-11 23:24:26 +01:00
|
|
|
|
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
|
2003-07-06 18:53:24 +02:00
|
|
|
|
xcoffout_begin_prologue (unsigned int line,
|
|
|
|
|
const char *file ATTRIBUTE_UNUSED)
|
1992-03-11 23:24:26 +01:00
|
|
|
|
{
|
dbxout.c (dbxout_really_begin_function): Rename to dbxout_begin_function.
* dbxout.c (dbxout_really_begin_function): Rename to
dbxout_begin_function.
(dbx_debug_hooks, xcoff_debug_hooks): Update.
(dbxout_begin_function): Remove.
(dbxout_function): Update.
(dbxout_source_line): Update prototype.
* dbxout.h (dbxout_begin_function): Remove.
* debug.c (do_nothing_debug_hooks): Update.
(debug_nothing_tree): Update.
(debug_nothing_charstar_rtx): Remove.
* debug.h (union tree_node): Declare.
(struct rtx_def): Remove.
(gcc_debug_hooks): New hooks begin_prologue, end_prologue,
begin_function. Change source_line prototype.
(debug_nothing_tree): New.
(debug_nothing_charstar_rtx): Delete.
(dwarf2out_begin_prologue): Moved from ...
* tree.h: ... here.
* dwarf2out.c (dwarf2_debug_hooks): Update.
(dwarf2out_begin_prologue): Update prototype. If genuine dwarf2
debug info, call dwarf2out_source_line.
(dwarf2out_souce_line): Update prototype.
* dwarfout.c (dwarfout_begin_function): Rename dwarfout_end_prologue.
Change prototype, make static.
(dwarfout_source_line): Update prototype.
(dwarf_debug_hooks): Update.
* dwarfout.h (dwarfout_begin_function): Remove.
* final.c (final_start_function, final_scan_insn): Use appropriate
debug hooks, update to use notice_source_line.
(output_source_line): Rename notice_source_line. Don't call the
source_line debug hook.
* sdbout.c (sdbout_begin_function): Rename sdbout_begin_prologue,
make static, update prototype.
(sdbout_mark_begin_function): Rename sdbout_begin_function, update
prototype.
(sdbout_end_prologue): New.
(sdbout_source_line): Update prototype.
(sdbout_debug_hooks): Update.
(sdbout_symbol): Remove unused var.
* sdbout.h (sdbout_begin_function, sdbout_mark_begin_function):
Delete.
* varasm.c: Include debug.h.
(assemble_start_function): Use begin_function debug_hook.
* xcoffout.c (xcoffout_begin_prologue): Rename xcoffout_begin_function,
update with prototype.
(xcoffout_source_line): Update prototype.
* xcoffout.h (xcoffout_begin_prologue): Rename xcoffout_begin_function,
update prototype.
(xcoffout_source_line): Update prototype.
From-SVN: r44087
2001-07-17 21:47:58 +02:00
|
|
|
|
ASM_OUTPUT_LFB (asm_out_file, line);
|
1995-07-28 15:03:35 +02:00
|
|
|
|
dbxout_parms (DECL_ARGUMENTS (current_function_decl));
|
1998-07-02 00:28:06 +02:00
|
|
|
|
|
|
|
|
|
/* 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. */
|
2000-02-28 22:46:44 +01:00
|
|
|
|
do_block = BLOCK_NUMBER (DECL_INITIAL (current_function_decl));
|
1998-07-02 00:28:06 +02:00
|
|
|
|
xcoffout_block (DECL_INITIAL (current_function_decl), 0,
|
|
|
|
|
DECL_ARGUMENTS (current_function_decl));
|
|
|
|
|
|
2003-06-17 10:06:58 +02:00
|
|
|
|
ASM_OUTPUT_SOURCE_LINE (asm_out_file, line, 0);
|
1992-03-11 23:24:26 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Called at end of function (before epilogue).
|
|
|
|
|
Describe end of outermost block. */
|
|
|
|
|
|
|
|
|
|
void
|
2003-07-06 18:53:24 +02:00
|
|
|
|
xcoffout_end_function (unsigned int last_linenum)
|
1992-03-11 23:24:26 +01:00
|
|
|
|
{
|
dbxout.c (dbxout_source_line): Make static, update prototype.
* dbxout.c (dbxout_source_line): Make static, update prototype.
(dbx_debug_hooks, xcoff_debug_hooks): Add new hooks.
(dbxout_init, dbxout_finish, dbxout_source_line,
dbxout_begin_block, dbxout_end_block): Update for new prototypes.
* dbxout.h (dbxout_source_line): Delete.
* debug.c (debug_nothing_file, debug_nothing_file_int,
debug_nothing_file_charstar_rtx): New.
(do_nothing_debug_hooks): Update.
(debug_nothing_void, debug_nothing_charstar_rtx,
dwarf2out_end_epilogue): New.
(debug_nothing_file_charstar, debug_nothing_file_int_int): Rename.
* debug.h (struct rtx_def): Declare.
(gcc_debug_hooks): New hooks source_line, end_epilogue
and end_function.
(debug_nothing_void, debug_nothing_charstar_rtx,
dwarf2out_end_epilogue): New.
(debug_nothing_file_charstar, debug_nothing_file_int_int): Rename.
* dwarf2out.c (dwarf2out_source_line): Make static, update prototype.
(dwarf2_debug_hooks): Update.
(dwarf2out_init, dwarf2out_finish, dwarf2out_source_line,
dwarf2out_begin_block, dwarf2out_end_block): Update for new prototypes.
* dwarf2out.h (dwarf2out_source_line): Remove.
* dwarfout.c (dwarfout_end_epilogue, dwarfout_end_function):
Make static, update prototype.
(dwarfout_init, dwarfout_finish, dwarfout_source_line,
dwarfout_begin_block, dwarfout_end_block): Update for new prototypes.
(dwarf_debug_hooks): Update.
* dwarfout.h (dwarfout_end_epilogue, dwarfout_source_line,
dwarfout_end_function): Remove.
* final.c (profile_function): Use debug hooks for ending functions
and epilogues.
(output_source_line, final_end_function): Update prototype,
use debug hooks.
(final_start_function, final_scan_insn): Update.
* output.h (sdb_begin_function_line): Remove.
(final_end_function): Update prototype.
* sdbout.c (sdb_begin_function_line): Make static.
(PUT_SDB_EPILOGUE_END): Move to sdbout_end_epilogue.
(sdbout_source_line): New.
(sdbout_end_epilogue, sdbout_end_function): Make static, update
prototypes.
(sdb_debug_hooks): Update.
(sdbout_init, sdbout_source_line,
sdbout_begin_block, sdbout_end_block): Update for new prototypes.
* sdbout.h (sdbout_end_epilogue, sdbout_end_function): Remove.
* toplev.c (compile_file, rest_of_compilation): Update.
* tree.h (dwarf2out_end_epilogue): Move to debug.h.
* xcoffout.c (xcoffout_source_line, xcoffout_begin_block,
xcoffout_end_block, xcoffout_end_epilogue, xcoffout_end_function):
Update for prototype changes.
* xcoffout.h (xcoffout_source_line, xcoffout_begin_block,
xcoffout_end_block, xcoffout_end_epilogue): Update prototypes.
From-SVN: r44017
2001-07-15 10:34:46 +02:00
|
|
|
|
ASM_OUTPUT_LFE (asm_out_file, last_linenum);
|
1992-03-11 23:24:26 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Output xcoff info for the absolute end of a function.
|
|
|
|
|
Called after the epilogue is output. */
|
|
|
|
|
|
|
|
|
|
void
|
2003-07-06 18:53:24 +02:00
|
|
|
|
xcoffout_end_epilogue (unsigned int line ATTRIBUTE_UNUSED,
|
|
|
|
|
const char *file ATTRIBUTE_UNUSED)
|
1992-03-11 23:24:26 +01:00
|
|
|
|
{
|
|
|
|
|
/* 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
|
1992-05-07 08:41:23 +02:00
|
|
|
|
be used by the .function pseudo op to calculate the function size. */
|
1992-03-11 23:24:26 +01:00
|
|
|
|
|
2000-05-06 06:31:16 +02:00
|
|
|
|
const char *fname = XSTR (XEXP (DECL_RTL (current_function_decl), 0), 0);
|
1992-03-11 23:24:26 +01:00
|
|
|
|
if (*fname == '*')
|
|
|
|
|
++fname;
|
dbxout.c (dbxout_source_line): Make static, update prototype.
* dbxout.c (dbxout_source_line): Make static, update prototype.
(dbx_debug_hooks, xcoff_debug_hooks): Add new hooks.
(dbxout_init, dbxout_finish, dbxout_source_line,
dbxout_begin_block, dbxout_end_block): Update for new prototypes.
* dbxout.h (dbxout_source_line): Delete.
* debug.c (debug_nothing_file, debug_nothing_file_int,
debug_nothing_file_charstar_rtx): New.
(do_nothing_debug_hooks): Update.
(debug_nothing_void, debug_nothing_charstar_rtx,
dwarf2out_end_epilogue): New.
(debug_nothing_file_charstar, debug_nothing_file_int_int): Rename.
* debug.h (struct rtx_def): Declare.
(gcc_debug_hooks): New hooks source_line, end_epilogue
and end_function.
(debug_nothing_void, debug_nothing_charstar_rtx,
dwarf2out_end_epilogue): New.
(debug_nothing_file_charstar, debug_nothing_file_int_int): Rename.
* dwarf2out.c (dwarf2out_source_line): Make static, update prototype.
(dwarf2_debug_hooks): Update.
(dwarf2out_init, dwarf2out_finish, dwarf2out_source_line,
dwarf2out_begin_block, dwarf2out_end_block): Update for new prototypes.
* dwarf2out.h (dwarf2out_source_line): Remove.
* dwarfout.c (dwarfout_end_epilogue, dwarfout_end_function):
Make static, update prototype.
(dwarfout_init, dwarfout_finish, dwarfout_source_line,
dwarfout_begin_block, dwarfout_end_block): Update for new prototypes.
(dwarf_debug_hooks): Update.
* dwarfout.h (dwarfout_end_epilogue, dwarfout_source_line,
dwarfout_end_function): Remove.
* final.c (profile_function): Use debug hooks for ending functions
and epilogues.
(output_source_line, final_end_function): Update prototype,
use debug hooks.
(final_start_function, final_scan_insn): Update.
* output.h (sdb_begin_function_line): Remove.
(final_end_function): Update prototype.
* sdbout.c (sdb_begin_function_line): Make static.
(PUT_SDB_EPILOGUE_END): Move to sdbout_end_epilogue.
(sdbout_source_line): New.
(sdbout_end_epilogue, sdbout_end_function): Make static, update
prototypes.
(sdb_debug_hooks): Update.
(sdbout_init, sdbout_source_line,
sdbout_begin_block, sdbout_end_block): Update for new prototypes.
* sdbout.h (sdbout_end_epilogue, sdbout_end_function): Remove.
* toplev.c (compile_file, rest_of_compilation): Update.
* tree.h (dwarf2out_end_epilogue): Move to debug.h.
* xcoffout.c (xcoffout_source_line, xcoffout_begin_block,
xcoffout_end_block, xcoffout_end_epilogue, xcoffout_end_function):
Update for prototype changes.
* xcoffout.h (xcoffout_source_line, xcoffout_begin_block,
xcoffout_end_block, xcoffout_end_epilogue): Update prototypes.
From-SVN: r44017
2001-07-15 10:34:46 +02:00
|
|
|
|
fprintf (asm_out_file, "FE..");
|
|
|
|
|
ASM_OUTPUT_LABEL (asm_out_file, fname);
|
1992-03-11 23:24:26 +01:00
|
|
|
|
}
|
|
|
|
|
#endif /* XCOFF_DEBUGGING_INFO */
|