home *** CD-ROM | disk | FTP | other *** search
/ Computer Shopper 275 / DPCS0111DVD.ISO / Toolkit / Audio-Visual / VirtualDub / Source / VirtualDub-1.9.10-src.7z / src / Asuka / h / symbols.h < prev    next >
Encoding:
C/C++ Source or Header  |  2009-09-14  |  1.7 KB  |  61 lines

  1. //    Asuka - VirtualDub Build/Post-Mortem Utility
  2. //    Copyright (C) 2005 Avery Lee
  3. //
  4. //    This program is free software; you can redistribute it and/or modify
  5. //    it under the terms of the GNU General Public License as published by
  6. //    the Free Software Foundation; either version 2 of the License, or
  7. //    (at your option) any later version.
  8. //
  9. //    This program is distributed in the hope that it will be useful,
  10. //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  12. //    GNU General Public License for more details.
  13. //
  14. //    You should have received a copy of the GNU General Public License
  15. //    along with this program; if not, write to the Free Software
  16. //    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  17.  
  18. #ifndef f_VD2_ASUKA_SYMBOLS_H
  19. #define f_VD2_ASUKA_SYMBOLS_H
  20.  
  21. #include <vd2/system/vdtypes.h>
  22. #include <vd2/system/vdstl.h>
  23. #include <vector>
  24.  
  25. struct VDSymbol {
  26.     sint64 rva;
  27.     int group;
  28.     long start;
  29.     char *name;
  30. };
  31.  
  32. struct VDSection {
  33.     sint64    mAbsStart;
  34.     long    mStart;
  35.     long    mLength;
  36.     int        mGroup;
  37.  
  38.     VDSection(long s=0, long l=0, int g=0) : mStart(s), mLength(l), mGroup(g) {}
  39. };
  40.  
  41. class VDINTERFACE IVDSymbolSource {
  42. public:
  43.     virtual ~IVDSymbolSource() {}
  44.  
  45.     virtual void Init(const wchar_t *filename) = 0;
  46.     virtual const VDSymbol *LookupSymbol(sint64 addr) = 0;
  47.     virtual const VDSection *LookupSection(sint64 addr) = 0;
  48.     virtual void GetAllSymbols(vdfastvector<VDSymbol>&) = 0;
  49.  
  50.     virtual uint32 GetCodeGroupMask() = 0;
  51.  
  52.     virtual int GetSectionCount() = 0;
  53.     virtual const VDSection *GetSection(int sec) = 0;
  54.  
  55.     virtual bool LookupLine(sint64 addr, const char *& filename, int& lineno) = 0;
  56. };
  57.  
  58. IVDSymbolSource *VDCreateSymbolSourceLinkMap();
  59.  
  60. #endif
  61.