示例#1
0
 internal DebugInfoSection(DWARFData data, ISection section)
 {
     _stream  = section.GetSectionStream();
     _sheader = section.Header;
     _data    = data;
     ParseCompilationUnits();
 }
示例#2
0
 public DebugInfoEntry(DWARFData data, EndianBinaryReader stream, CompilationUnit compilationUnit, long offset)
 {
     _data   = data;
     _stream = stream;
     Unit    = compilationUnit;
     Offset  = offset;
     Parse();
 }
示例#3
0
        public void Load(string file)
        {
            if (File.Exists(file))
            {
                _file = file;

                ElfFile         = ELFReader.Load(_file);
                Dwarf           = new DWARFData(ElfFile);
                Disassembly     = new AvrDisassembler().Disassemble(file);
                SourceFiles     = GetSourceFiles(Dwarf);
                _debugCtxSymbol = LoadDebugContextInfo(ElfFile);
            }
        }
示例#4
0
        private List <string> GetSourceFiles(DWARFData _dwarf)
        {
            var sourceFiles = new List <string>();

            _dwarf.LineSection.GetFiles().ForEach(f =>
            {
                var path = Path.Combine(f.Directory, f.File);
                if (path.StartsWith("/") || path.StartsWith("..") || path.StartsWith("\\"))
                {
                    path = Path.Combine(Path.GetDirectoryName(_file), path);
                }
                sourceFiles.Add(Path.GetFullPath(path));
            });
            return(sourceFiles);
        }
示例#5
0
 internal DebugLineSection(DWARFData data, ISection section)
 {
     _data   = data;
     _stream = section.GetSectionStream();
     LoadLinePrograms();
 }