|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object scale.backend.Stabs
public class Stabs
This class represents "stabs" debugging information.
$Id: Stabs.java,v 1.42 2007-10-04 19:57:49 burrill Exp $
Copyright 2008 by the
Scale Compiler Group,
Department of Computer Science
University of Massachusetts,
Amherst MA. 01003, USA
All Rights Reserved.
Notes
visit...Type
methods from other classes.
Field Summary | |
---|---|
static int |
FMT_GCC
Output stabs in GCC format. |
static int |
FMT_SOLARIS
Output stabs in Solaris format. |
static short |
N_BCOMM
Begin named common block. |
static short |
N_BINCL
Beginning of an include file (Sun only). |
static short |
N_BROWS
Sun source code browser, path to `.cb' file. |
static short |
N_BSLINE
Line number in bss segment. |
static short |
N_CATCH
GNU C++ catch clause. |
static short |
N_DEFD
GNU Modula2 definition module dependency. |
static short |
N_DSLINE
Line number in data segment. |
static short |
N_ECOML
Member of a common block. |
static short |
N_ECOMM
End named common block. |
static short |
N_EHDECL
GNU C++ exception variable. |
static short |
N_EINCL
End of an include file. |
static short |
N_ENDM
Last stab for module (Solaris2). |
static short |
N_ENTRY
Alternate entry point. |
static short |
N_EXCL
Place holder for a deleted include file. |
static short |
N_FLINE
Function start/body/end line numbers (Solaris2). |
static short |
N_FNAME
Function name (for BSD Fortran). |
static short |
N_FUN
Function name or text segment variable. |
static short |
N_GSYM
Global symbol. |
static short |
N_LBRAC
Beginning of a lexical block. |
static short |
N_LCSYM
BSS segment file-scope variable. |
static short |
N_LSYM
Stack variable. |
static short |
N_M2C
Modula-2 compilation unit. |
static short |
N_MAIN
Name of main routine. |
static short |
N_MOD2
Modula2 info "for imc" (according to Ultrix V4.0). |
static short |
N_NBBSS
Gould non-base registers. |
static short |
N_NBDATA
Gould non-base registers. |
static short |
N_NBLCS
Gould non-base registers. |
static short |
N_NBSTS
Gould non-base registers. |
static short |
N_NBTEXT
Gould non-base registers. |
static short |
N_NOMAP
No DST map. |
static short |
N_NSYMS
Number of symbols (according to Ultrix V4.0). |
static short |
N_OBJ
Displacement file (Solaris2). |
static short |
N_OPT
Debugger options (Solaris2). |
static short |
N_PC
Global symbol (for Pascal). |
static short |
N_PSYM
Parameter variable. |
static short |
N_RBRAC
End of a lexical block. |
static short |
N_ROSYM
Variable in .rodata section. |
static short |
N_RSYM
Register variable. |
static short |
N_SCOPE
Modula2 scope information (Sun linker). |
static short |
N_SLINE
Line number in text segment. |
static short |
N_SO
Path and name of source file. |
static byte |
N_SO_ANSI_C
The source program is written in ANSI C. |
static byte |
N_SO_AS
The source program is written in assembly. |
static byte |
N_SO_C
The source program is written in C. |
static byte |
N_SO_CC
The source program is written in C++. |
static byte |
N_SO_FORTRAN
The source program is written in Fortran 77. |
static byte |
N_SO_FORTRAN90
The source program is written in Fortran 90. |
static byte |
N_SO_PASCAL
The source program is written in Pascal. |
static short |
N_SOL
Name of include file. |
static short |
N_SSYM
Structure of union element. |
static short |
N_STSYM
Data segment file-scope variable. |
static short |
N_WITH
Pascal with statement: type,,0,0,offset (Solaris2). |
Constructor Summary | |
---|---|
Stabs(Machine machine,
int fmt,
int lang)
|
Method Summary | |
---|---|
int |
addStabd(short type,
int other,
int desc)
Add a new "stabd". |
int |
addStabn(short type,
int other,
int desc,
Displacement value)
Add a new "stabn". |
int |
addStabn(short type,
int other,
int desc,
int value)
Add a new "stabn". |
int |
addStabs(java.lang.String string,
short type,
int other,
int desc,
Displacement value)
Add a new "stabs". |
int |
addStabs(java.lang.String string,
short type,
int other,
int desc,
int value)
Add a new "stabs". |
int |
addStabx(java.lang.String string,
Displacement value,
short type,
short std_type)
Add a new "stabx". |
int |
addStabx(java.lang.String string,
int value,
short type,
short std_type)
Add a new "stabx". |
int |
addXStabs(java.lang.String string,
short type,
int other,
int desc,
Displacement value)
Add a new "xstabs". |
int |
addXStabs(java.lang.String string,
short type,
int other,
int desc,
int value)
Add a new "xstabs". |
void |
assemble(Assembler asm,
Emit emit)
Generate the assembly statement for all of the stabs. |
void |
defineDeclInCommon(Declaration decl,
Displacement disp)
Associate information with a Declaration in COMMON. |
void |
defineDeclInMemory(Declaration decl,
Displacement disp)
Associate information with a Declaration kept in memory. |
void |
defineDeclInRegister(Declaration decl,
int register)
Associate information with a variable Declaration kept in a register. |
void |
defineDeclOnStack(Declaration decl,
Displacement disp)
Associate information with a Declaration kept on the stack. |
void |
defineParameterInRegister(Declaration decl,
int register)
Associate information with a variable Declaration kept in a register. |
void |
defineParameterOnStack(Declaration decl,
Displacement disp)
Associate information with a Declaration kept on the stack. |
void |
defineRoutineInfo(RoutineDecl rd,
Displacement disp)
Associate information with a routine. |
void |
endCommon()
Finish processing COMMON variables. |
int |
genFtnDescriptor(RoutineDecl rd)
Generate the stab for a {$link scale.clef.decl.RoutineDecl RoutineDecl}. |
void |
genTypeDecl(TypeDecl decl)
Generate the stabs for this {$link scale.clef.type.Type Type} and all the other types it depends upon. |
void |
genTypeName(TypeName tn)
Generate the stabs for this {$link scale.clef.type.Type Type} and all the other types it depends upon. |
int |
genVarDescriptor(VariableDecl decl)
Generate the stab for a {$link scale.clef.decl.VariableDecl VariableDecl}. |
int |
numberStabs()
Return the number of stab entries. |
void |
renumberRegisters(int first,
int end,
int[] map,
int nrr)
Renumber the registers in N_RSYM entries after register allocation. |
void |
startCommon()
Prepare for processing COMMON variables. |
void |
visitAggregateType(AggregateType type)
|
void |
visitAllocArrayType(AllocArrayType at)
|
void |
visitArrayType(ArrayType type)
|
void |
visitAtomicType(AtomicType type)
|
void |
visitBooleanType(BooleanType type)
|
void |
visitBound(Bound bd)
|
void |
visitCharacterType(CharacterType type)
|
void |
visitComplexType(ComplexType ct)
|
void |
visitCompositeType(CompositeType type)
|
void |
visitEnumerationType(EnumerationType et)
|
void |
visitFixedArrayType(FixedArrayType at)
|
void |
visitFloatType(FloatType ft)
|
void |
visitFortranCharType(FortranCharType it)
|
void |
visitIncompleteType(IncompleteType type)
|
void |
visitIntegerType(IntegerType it)
|
void |
visitNumericType(NumericType type)
|
void |
visitPointerType(PointerType pt)
|
void |
visitProcedureType(ProcedureType pt)
|
void |
visitRaise(Raise type)
|
void |
visitRaiseWithObject(RaiseWithObject type)
|
void |
visitRaiseWithType(RaiseWithType type)
|
void |
visitRealType(RealType type)
|
void |
visitRecordType(RecordType rt)
|
void |
visitRefType(RefType rt)
|
void |
visitSignedIntegerType(SignedIntegerType it)
|
void |
visitType(Type type)
|
void |
visitUnionType(UnionType ut)
|
void |
visitUnsignedIntegerType(UnsignedIntegerType it)
|
void |
visitVoidType(VoidType vt)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int FMT_SOLARIS
public static final int FMT_GCC
public static final short N_GSYM
public static final short N_FNAME
public static final short N_FUN
public static final short N_STSYM
public static final short N_LCSYM
public static final short N_MAIN
public static final short N_ROSYM
.rodata
section.
public static final short N_PC
public static final short N_NSYMS
public static final short N_NOMAP
public static final short N_OBJ
public static final short N_OPT
public static final short N_RSYM
public static final short N_M2C
public static final short N_SLINE
public static final short N_DSLINE
public static final short N_BSLINE
public static final short N_BROWS
public static final short N_DEFD
public static final short N_FLINE
public static final short N_EHDECL
public static final short N_MOD2
public static final short N_CATCH
catch
clause.
public static final short N_SSYM
public static final short N_ENDM
public static final short N_SO
public static final short N_LSYM
public static final short N_BINCL
public static final short N_SOL
public static final short N_PSYM
public static final short N_EINCL
public static final short N_ENTRY
public static final short N_LBRAC
public static final short N_EXCL
public static final short N_SCOPE
public static final short N_RBRAC
public static final short N_BCOMM
public static final short N_ECOMM
public static final short N_ECOML
public static final short N_WITH
with
statement: type,,0,0,offset (Solaris2).
public static final short N_NBTEXT
public static final short N_NBDATA
public static final short N_NBBSS
public static final short N_NBSTS
public static final short N_NBLCS
public static final byte N_SO_AS
public static final byte N_SO_C
public static final byte N_SO_ANSI_C
public static final byte N_SO_CC
public static final byte N_SO_FORTRAN
public static final byte N_SO_PASCAL
public static final byte N_SO_FORTRAN90
Constructor Detail |
---|
public Stabs(Machine machine, int fmt, int lang)
machine
- specifies the target architecturefmt
- specifies the stabs format: FMT_SOLARIS, FMT_GCC, etc.lang
- specifies the source language: N_SO_C, N_SO_FORTRAN, etcMethod Detail |
---|
public int addStabs(java.lang.String string, short type, int other, int desc, Displacement value)
public int addStabs(java.lang.String string, short type, int other, int desc, int value)
public int addXStabs(java.lang.String string, short type, int other, int desc, Displacement value)
public int addXStabs(java.lang.String string, short type, int other, int desc, int value)
public int addStabn(short type, int other, int desc, Displacement value)
public int addStabn(short type, int other, int desc, int value)
public int addStabd(short type, int other, int desc)
public int addStabx(java.lang.String string, Displacement value, short type, short std_type)
public int addStabx(java.lang.String string, int value, short type, short std_type)
public int numberStabs()
public void renumberRegisters(int first, int end, int[] map, int nrr)
nrr
, the corresponding stabs entry is
eliminated.
first
- is the handle of the first stab entry to processend
- is the handle of the stab entry after the last entry to processmap
- specifies the register mapping: virtual->realnrr
- is the number of real registerspublic void assemble(Assembler asm, Emit emit)
public void genTypeDecl(TypeDecl decl)
public void genTypeName(TypeName tn)
public int genFtnDescriptor(RoutineDecl rd)
public int genVarDescriptor(VariableDecl decl)
public void defineDeclInRegister(Declaration decl, int register)
decl
- is the variableregister
- is the register allocated for the variablepublic void defineParameterInRegister(Declaration decl, int register)
decl
- is the variableregister
- is the register allocated for the variablepublic void defineDeclOnStack(Declaration decl, Displacement disp)
decl
- is the variabledisp
- - displacement associated with declarationpublic void defineParameterOnStack(Declaration decl, Displacement disp)
decl
- is the variabledisp
- - displacement associated with declarationpublic void defineDeclInMemory(Declaration decl, Displacement disp)
decl
- is the variabledisp
- - displacement associated with declarationpublic void defineDeclInCommon(Declaration decl, Displacement disp)
decl
- is the variabledisp
- - displacement associated with declarationpublic void defineRoutineInfo(RoutineDecl rd, Displacement disp)
rd
- is the routinedisp
- - displacement associated with declarationpublic void startCommon()
public void endCommon()
public void visitAggregateType(AggregateType type)
visitAggregateType
in interface TypePredicate
public void visitArrayType(ArrayType type)
visitArrayType
in interface TypePredicate
public void visitAtomicType(AtomicType type)
visitAtomicType
in interface TypePredicate
public void visitBooleanType(BooleanType type)
visitBooleanType
in interface TypePredicate
public void visitCharacterType(CharacterType type)
visitCharacterType
in interface TypePredicate
public void visitComplexType(ComplexType ct)
visitComplexType
in interface TypePredicate
public void visitCompositeType(CompositeType type)
visitCompositeType
in interface TypePredicate
public void visitEnumerationType(EnumerationType et)
visitEnumerationType
in interface TypePredicate
public void visitAllocArrayType(AllocArrayType at)
visitAllocArrayType
in interface TypePredicate
public void visitFixedArrayType(FixedArrayType at)
visitFixedArrayType
in interface TypePredicate
public void visitFloatType(FloatType ft)
visitFloatType
in interface TypePredicate
public void visitIncompleteType(IncompleteType type)
visitIncompleteType
in interface TypePredicate
public void visitIntegerType(IntegerType it)
visitIntegerType
in interface TypePredicate
public void visitSignedIntegerType(SignedIntegerType it)
visitSignedIntegerType
in interface TypePredicate
public void visitUnsignedIntegerType(UnsignedIntegerType it)
visitUnsignedIntegerType
in interface TypePredicate
public void visitFortranCharType(FortranCharType it)
visitFortranCharType
in interface TypePredicate
public void visitNumericType(NumericType type)
visitNumericType
in interface TypePredicate
public void visitPointerType(PointerType pt)
visitPointerType
in interface TypePredicate
public void visitProcedureType(ProcedureType pt)
visitProcedureType
in interface TypePredicate
public void visitRaise(Raise type)
visitRaise
in interface TypePredicate
public void visitRaiseWithObject(RaiseWithObject type)
visitRaiseWithObject
in interface TypePredicate
public void visitRaiseWithType(RaiseWithType type)
visitRaiseWithType
in interface TypePredicate
public void visitBound(Bound bd)
visitBound
in interface TypePredicate
public void visitRealType(RealType type)
visitRealType
in interface TypePredicate
public void visitRecordType(RecordType rt)
visitRecordType
in interface TypePredicate
public void visitRefType(RefType rt)
visitRefType
in interface TypePredicate
public void visitType(Type type)
visitType
in interface TypePredicate
public void visitUnionType(UnionType ut)
visitUnionType
in interface TypePredicate
public void visitVoidType(VoidType vt)
visitVoidType
in interface TypePredicate
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |