Example #1
0
            public DwarfTargetVariable(DieSubprogram subprog, string name, TargetType type,
						    DwarfLocation location, DieLexicalBlock lexical_block)
            {
                this.name = name;
                this.type = type;
                this.location = location;
                this.lexical_block = lexical_block;
            }
Example #2
0
            public DwarfLocation(CompilationUnit comp_unit, DwarfLocation frame_base,
					      Attribute attribute, bool is_byref)
            {
                this.comp_unit = comp_unit;
                this.frame_base = frame_base;
                this.is_byref = is_byref;

                if (comp_unit == null)
                    throw new InternalError ();

                switch (attribute.DwarfForm) {
                case DwarfForm.block1:
                    location_block = (byte []) attribute.Data;
                    break;
                case DwarfForm.data1:
                case DwarfForm.data2:
                case DwarfForm.data4:
                case DwarfForm.data8:
                    loclist_offset = (long) attribute.Data;
                    break;
                default:
                    throw new InternalError  ();
                }
            }
Example #3
0
            protected bool DoResolve()
            {
                if (!DoResolveType ())
                    return false;

                if ((Name == null) || (subprog == null) || (location_attr == null))
                    return false;

                DwarfLocation location = new DwarfLocation (
                    subprog, location_attr, type.IsByRef);
                variable = new DwarfTargetVariable (
                    subprog, Name, type, location, lexical_block);
                return true;
            }
Example #4
0
            protected override void ProcessAttribute(Attribute attribute)
            {
                debug ("SUBPROG PROCESS ATTRIBUTE: {0} {1}", Offset, attribute);

                switch (attribute.DwarfAttribute) {
                case DwarfAttribute.low_pc:
                    start_pc = (long) attribute.Data;
                    debug ("{0}: start_pc = {1:x}", Offset, start_pc);
                    break;

                case DwarfAttribute.high_pc:
                    end_pc = (long) attribute.Data;
                    debug ("{0}: end_pc = {1:x}", Offset, end_pc);
                    break;

                case DwarfAttribute.name:
                    name = (string) attribute.Data;
                    debug ("{0}: name = {1}", Offset, name);
                    break;

                case DwarfAttribute.frame_base:
                    frame_base = new DwarfLocation (this, attribute, false);
                    break;

                case DwarfAttribute.decl_file:
                    debug ("{0}: decl_file = {1}",
                           Offset, (long) attribute.Data);
                    break;

                case DwarfAttribute.decl_line:
                    debug ("{0}: decl_line = {1}",
                           Offset, (long) attribute.Data);
                    break;

                case DwarfAttribute.inline:
                    debug ("{0}: inline = {1}",
                           Offset, (DwarfInline) (long)attribute.Data);
                    break;

                case DwarfAttribute.abstract_origin:
                    abstract_origin = (long) attribute.Data;
                    debug ("{0} ABSTRACT ORIGIN: {1}", Offset, abstract_origin);
                    break;

                case DwarfAttribute.specification:
                    specification = (long) attribute.Data;
                    debug ("{0} SPECIFICATION: {1}", Offset, specification);
                    break;
                }
            }
Example #5
0
            protected override void ProcessAttribute(Attribute attribute)
            {
                switch (attribute.DwarfAttribute) {
                case DwarfAttribute.type:
                    type_offset = (long) attribute.Data;
                    break;

                case DwarfAttribute.data_member_location:
                    data_member_location = new DwarfLocation (comp_unit, null, attribute, false);
                    break;

                default:
                    base.ProcessAttribute (attribute);
                    break;
                }
            }