Debian Codegraph @

src/SymbolTable.h

raw symbols SCIP
1 #cxx . . $ `<file>/src/SymbolTable.h`/ifndef SYMBOLTABLE_H
2 #define SYMBOLTABLE_Hcxx . . $ `src/SymbolTable.h:2:9`!
3
4 #include <QString>
5 #include <QList>
6 #include <QMultiMap>
7 #include <QMultiHash>
8 #include <QDateTime>
9 #include <QXmlStreamReader>
10 #include <QXmlStreamWriter>
11 #include <QFileSystemWatcher>
12 #include <cstdint>
13 #include <memory>
14 #include <vector>
15
16 struct MemoryLayoutcxx . . $ MemoryLayout#;
17 class SymbolTablecxx . . $ SymbolTable#;
18
19 class Symbolcxx . . $ Symbol#
20 {
21 public:
22 Symbolcxx . . $ Symbol#Symbol(c6501d5eb6bcce0e).(QStringcxx . . $ QString# str, int addr, const QStringcxx . . $ QString#* source = nullptr);
23 Symbolcxx . . $ Symbol#Symbol(83ad1a05ba4f922d).(const Symbolcxx . . $ Symbol#& symbol);
24 Symbolcxx . . $ Symbol#& operatorcxx . . $ Symbol#`operator=`(45800a3cbf45c510).=(const Symbolcxx . . $ Symbol#&) = default;
25
26 // ACTIVE status is for regular symbols. HIDDEN is for symbols
27 // that are in the list but not shown anywhere. LOST is a special
28 // status for symbols that were once loaded from a symbol file, but
29 // weren't found later. These aren't deleted immediately because
30 // the possible custom settings would be lost even if the reload
31 // was of a bad file (after a failed assembler run for instance).
32 enum SymbolStatuscxx . . $ Symbol#SymbolStatus# { ACTIVEcxx . . $ Symbol#ACTIVE., HIDDENcxx . . $ Symbol#HIDDEN., LOSTcxx . . $ Symbol#LOST. };
33 enum SymbolTypecxx . . $ Symbol#SymbolType# { JUMPLABELcxx . . $ Symbol#JUMPLABEL., VARIABLELABELcxx . . $ Symbol#VARIABLELABEL., VALUEcxx . . $ Symbol#VALUE. };
34 enum Registercxx . . $ Symbol#Register# { REG_Acxx . . $ Symbol#REG_A. = 1 << 0, REG_Bcxx . . $ Symbol#REG_B. = 1 << 1, REG_Ccxx . . $ Symbol#REG_C. = 1 << 2, REG_Dcxx . . $ Symbol#REG_D. = 1 << 3, REG_Ecxx . . $ Symbol#REG_E. = 1 << 4,
35 REG_Hcxx . . $ Symbol#REG_H. = 1 << 5, REG_Lcxx . . $ Symbol#REG_L. = 1 << 6, REG_BCcxx . . $ Symbol#REG_BC. = 1 << 7, REG_DEcxx . . $ Symbol#REG_DE. = 1 << 8,
36 REG_HLcxx . . $ Symbol#REG_HL. = 1 << 9, REG_IXcxx . . $ Symbol#REG_IX. = 1 << 10, REG_IYcxx . . $ Symbol#REG_IY. = 1 << 11, REG_IXLcxx . . $ Symbol#REG_IXL. = 1 << 12,
37 REG_IXHcxx . . $ Symbol#REG_IXH. = 1 << 13, REG_IYLcxx . . $ Symbol#REG_IYL. = 1 << 15, REG_IYHcxx . . $ Symbol#REG_IYH. = 1 << 15,
38 REG_OFFSETcxx . . $ Symbol#REG_OFFSET. = 1 << 16, REG_Icxx . . $ Symbol#REG_I. = 1 << 17,
39 REG_ALL8cxx . . $ Symbol#REG_ALL8. = REG_Acxx . . $ Symbol#REG_A. | REG_Bcxx . . $ Symbol#REG_B. | REG_Ccxx . . $ Symbol#REG_C. | REG_Dcxx . . $ Symbol#REG_D. | REG_Ecxx . . $ Symbol#REG_E. | REG_Hcxx . . $ Symbol#REG_H. | REG_Lcxx . . $ Symbol#REG_L.
40 | REG_IXLcxx . . $ Symbol#REG_IXL. | REG_IXHcxx . . $ Symbol#REG_IXH. | REG_IYLcxx . . $ Symbol#REG_IYL. | REG_IYHcxx . . $ Symbol#REG_IYH.
41 | REG_OFFSETcxx . . $ Symbol#REG_OFFSET. | REG_Icxx . . $ Symbol#REG_I.,
42 REG_ALL16cxx . . $ Symbol#REG_ALL16. = REG_BCcxx . . $ Symbol#REG_BC. | REG_DEcxx . . $ Symbol#REG_DE. | REG_HLcxx . . $ Symbol#REG_HL. | REG_IXcxx . . $ Symbol#REG_IX. | REG_IYcxx . . $ Symbol#REG_IY.,
43 REG_ALLcxx . . $ Symbol#REG_ALL. = REG_ALL8cxx . . $ Symbol#REG_ALL8. | REG_ALL16cxx . . $ Symbol#REG_ALL16. };
44
45 [[nodiscard]] const QStringcxx . . $ QString#& textcxx . . $ Symbol#text(a2fb7a6ce195d51).() const { return symTextcxx . . $ Symbol#symText.; }
46 void setTextcxx . . $ Symbol#setText(3520e46b33348bf6).(const QStringcxx . . $ QString#& str) { symTextcxx . . $ Symbol#symText. =cxx . . $ QString#`operator=`(b79fde0b0ce9b948). str; }
47 [[nodiscard]] int valuecxx . . $ Symbol#value(455f465bc33b4cdf).() const { return symValuecxx . . $ Symbol#symValue.; }
48 void setValuecxx . . $ Symbol#setValue(d4f767463ce0a6b3).(int addr);
49 [[nodiscard]] uint16_tcxx . . $ uint16_t# validSlotscxx . . $ Symbol#validSlots(72085aa11f4b6e09).() const { return symSlotscxx . . $ Symbol#symSlots.; }
50 void setValidSlotscxx . . $ Symbol#setValidSlots(ed53e3bbd3fa2f69).(uint16_tcxx . . $ uint16_t# val) { symSlotscxx . . $ Symbol#symSlots. = val; }
51 [[nodiscard]] int validRegisterscxx . . $ Symbol#validRegisters(455f465bc33b4cdf).() const { return symRegisterscxx . . $ Symbol#symRegisters.; }
52 void setValidRegisterscxx . . $ Symbol#setValidRegisters(d4f767463ce0a6b3).(int regs);
53 [[nodiscard]] const QStringcxx . . $ QString#* sourcecxx . . $ Symbol#source(88f341a3c13628a).() const { return symSourcecxx . . $ Symbol#symSource.; }
54 void setSourcecxx . . $ Symbol#setSource(b62801a724e345f3).(const QStringcxx . . $ QString#* name) { symSourcecxx . . $ Symbol#symSource. = name; }
55 [[nodiscard]] SymbolStatuscxx . . $ Symbol#SymbolStatus# statuscxx . . $ Symbol#status(71980a2ae356e487).() const { return symStatuscxx . . $ Symbol#symStatus.; }
56 void setStatuscxx . . $ Symbol#setStatus(48246a611bcf1fe4).(SymbolStatuscxx . . $ Symbol#SymbolStatus# s) { symStatuscxx . . $ Symbol#symStatus. = s; }
57 [[nodiscard]] SymbolTypecxx . . $ Symbol#SymbolType# typecxx . . $ Symbol#type(4ac61bd11a1ab7d9).() const { return symTypecxx . . $ Symbol#symType.; }
58 void setTypecxx . . $ Symbol#setType(940f9e37a621fd9).(SymbolTypecxx . . $ Symbol#SymbolType# t);
59
60 bool isSlotValidcxx . . $ Symbol#isSlotValid(6c1b4f50bcd5f0fa).(const MemoryLayoutcxx . . $ MemoryLayout#* ml = nullptr) const;
61
62 private:
63 SymbolTablecxx . . $ SymbolTable#* tablecxx . . $ Symbol#table. = nullptr;
64
65 QStringcxx . . $ QString# symTextcxx . . $ Symbol#symText.;
66 int symValuecxx . . $ Symbol#symValue.;
67 uint16_tcxx . . $ uint16_t# symSlotscxx . . $ Symbol#symSlots. = 0xffff;
68 //QList<uint8_t> symSegments;
69 int symRegisterscxx . . $ Symbol#symRegisters.;
70 const QStringcxx . . $ QString#* symSourcecxx . . $ Symbol#symSource. = nullptr;
71 SymbolStatuscxx . . $ Symbol#SymbolStatus# symStatuscxx . . $ Symbol#symStatus. = ACTIVEcxx . . $ Symbol#ACTIVE.;
72 SymbolTypecxx . . $ Symbol#SymbolType# symTypecxx . . $ Symbol#symType. = JUMPLABELcxx . . $ Symbol#JUMPLABEL.;
73
74 friend class SymbolTablecxx . . $ SymbolTable#;
75 };
76
77
78 class SymbolTablecxx . . $ SymbolTable# : public QObjectcxx . . $ QObject#
79 {
80 Q_OBJECTcxx . . $ SymbolTable#tr(75d9f1c324b4579d).
81 public:
82 enum FileTypecxx . . $ SymbolTable#FileType# {
83 DETECT_FILEcxx . . $ SymbolTable#DETECT_FILE.,
84 OMDS_FILEcxx . . $ SymbolTable#OMDS_FILE.,
85 TNIASM0_FILEcxx . . $ SymbolTable#TNIASM0_FILE.,
86 TNIASM1_FILEcxx . . $ SymbolTable#TNIASM1_FILE.,
87 SJASM_FILEcxx . . $ SymbolTable#SJASM_FILE.,
88 ASMSX_FILEcxx . . $ SymbolTable#ASMSX_FILE.,
89 LINKMAP_FILEcxx . . $ SymbolTable#LINKMAP_FILE.,
90 HTC_FILEcxx . . $ SymbolTable#HTC_FILE.,
91 NOICE_FILEcxx . . $ SymbolTable#NOICE_FILE.,
92 PASMO_FILEcxx . . $ SymbolTable#PASMO_FILE.,
93 VASM_FILEcxx . . $ SymbolTable#VASM_FILE.
94 };
95
96 SymbolTablecxx . . $ SymbolTable#SymbolTable(49f6e7a06ebc5aa8).();
97
98 Symbolcxx . . $ Symbol#* addcxx . . $ SymbolTable#add(c241dcc49dd75ec1).(stdcxx . . $ std/::unique_ptrcxx . . $ std/unique_ptr#<Symbolcxx . . $ Symbol#> symbol);
99 stdcxx . . $ std/::unique_ptrcxx . . $ std/unique_ptr#<Symbolcxx . . $ Symbol#> removeAtcxx . . $ SymbolTable#removeAt(50138e977a8c09a7).(size_t index);
100 stdcxx . . $ std/::unique_ptrcxx . . $ std/unique_ptr#<Symbolcxx . . $ Symbol#> removecxx . . $ SymbolTable#remove(de12313ba27c44a5).(Symbolcxx . . $ Symbol# *symbol);
101 void clearcxx . . $ SymbolTable#clear(49f6e7a06ebc5aa8).();
102 [[nodiscard]] int sizecxx . . $ SymbolTable#size(455f465bc33b4cdf).() const;
103
104 // xml session file functions
105 void saveSymbolscxx . . $ SymbolTable#saveSymbols(b6139443264d70c1).(QXmlStreamWritercxx . . $ QXmlStreamWriter#& xml);
106 void loadSymbolscxx . . $ SymbolTable#loadSymbols(e225a1e01f50193c).(QXmlStreamReadercxx . . $ QXmlStreamReader#& xml);
107
108 // Symbol access functions
109 [[nodiscard]] Symbolcxx . . $ Symbol#* findFirstAddressSymbolcxx . . $ SymbolTable#findFirstAddressSymbol(6425489d2f72da67).(int addr, MemoryLayoutcxx . . $ MemoryLayout#* ml = nullptr);
110 [[nodiscard]] Symbolcxx . . $ Symbol#* getCurrentAddressSymbolcxx . . $ SymbolTable#getCurrentAddressSymbol(5476d8503598437c).();
111 [[nodiscard]] Symbolcxx . . $ Symbol#* findNextAddressSymbolcxx . . $ SymbolTable#findNextAddressSymbol(fd05edddcc119593).(MemoryLayoutcxx . . $ MemoryLayout#* ml = nullptr);
112 [[nodiscard]] Symbolcxx . . $ Symbol#* getValueSymbolcxx . . $ SymbolTable#getValueSymbol(e2ed6cd7c93c4d8e).(int val, Symbolcxx . . $ Symbol#::Registercxx . . $ Symbol#Register# reg, MemoryLayoutcxx . . $ MemoryLayout#* ml = nullptr);
113 [[nodiscard]] Symbolcxx . . $ Symbol#* getAddressSymbolcxx . . $ SymbolTable#getAddressSymbol(6425489d2f72da67).(int val, MemoryLayoutcxx . . $ MemoryLayout#* ml = nullptr);
114 [[nodiscard]] Symbolcxx . . $ Symbol#* getAddressSymbolcxx . . $ SymbolTable#getAddressSymbol(3ca1c26422e5e6a6).(const QStringcxx . . $ QString#& label, bool case_sensitive = false);
115
116 [[nodiscard]] QStringListcxx . . $ QStringList# labelListcxx . . $ SymbolTable#labelList(cfa6acfd8fe17c4a).(bool include_vars = false, const MemoryLayoutcxx . . $ MemoryLayout#* ml = nullptr) const;
117
118 void symbolTypeChangedcxx . . $ SymbolTable#symbolTypeChanged(e1770879d1475328).(Symbolcxx . . $ Symbol#* symbol);
119 void symbolValueChangedcxx . . $ SymbolTable#symbolValueChanged(e1770879d1475328).(Symbolcxx . . $ Symbol#* symbol);
120
121 [[nodiscard]] int symbolFilesSizecxx . . $ SymbolTable#symbolFilesSize(455f465bc33b4cdf).() const;
122 [[nodiscard]] const QStringcxx . . $ QString#& symbolFilecxx . . $ SymbolTable#symbolFile(16cc9d170214b96a).(int index) const;
123 [[nodiscard]] const QDateTimecxx . . $ QDateTime#& symbolFileRefreshcxx . . $ SymbolTable#symbolFileRefresh(8d59ec49d27552dc).(int index) const;
124
125 bool readFilecxx . . $ SymbolTable#readFile(a6376190b25aca40).(const QStringcxx . . $ QString#& filename, FileTypecxx . . $ SymbolTable#FileType# type = DETECT_FILEcxx . . $ SymbolTable#DETECT_FILE.);
126 void reloadFilescxx . . $ SymbolTable#reloadFiles(49f6e7a06ebc5aa8).();
127 void unloadFilecxx . . $ SymbolTable#unloadFile(37c160c81b6367f7).(const QStringcxx . . $ QString#& file, bool keepSymbols = false);
128
129 signalscxx . . $ `<external>/1208926524888476972/qobjectdefs.h:89:14`!:
130 void symbolFileChangedcxx . . $ SymbolTable#symbolFileChanged(49f6e7a06ebc5aa8).();
131
132 private:
133 void appendFilecxx . . $ SymbolTable#appendFile(99acc5e4b40ab5b2).(const QStringcxx . . $ QString#& file, FileTypecxx . . $ SymbolTable#FileType# type);
134 bool readSymbolFilecxx . . $ SymbolTable#readSymbolFile(c18f5917bd38f78a).(
135 const QStringcxx . . $ QString#& filename, FileTypecxx . . $ SymbolTable#FileType# type, const QStringcxx . . $ QString#& equ);
136 bool readOMDSFilecxx . . $ SymbolTable#readOMDSFile(e1defb592416720d).(const QStringcxx . . $ QString#& filename);
137 bool readTNIASM0Filecxx . . $ SymbolTable#readTNIASM0File(e1defb592416720d).(const QStringcxx . . $ QString#& filename);
138 bool readTNIASM1Filecxx . . $ SymbolTable#readTNIASM1File(e1defb592416720d).(const QStringcxx . . $ QString#& filename);
139 bool readASMSXFilecxx . . $ SymbolTable#readASMSXFile(e1defb592416720d).(const QStringcxx . . $ QString#& filename);
140 bool readSJASMFilecxx . . $ SymbolTable#readSJASMFile(e1defb592416720d).(const QStringcxx . . $ QString#& filename);
141 bool readHTCFilecxx . . $ SymbolTable#readHTCFile(e1defb592416720d).(const QStringcxx . . $ QString#& filename);
142 bool readNoICEFilecxx . . $ SymbolTable#readNoICEFile(e1defb592416720d).(const QStringcxx . . $ QString#& filename);
143 bool readLinkMapFilecxx . . $ SymbolTable#readLinkMapFile(e1defb592416720d).(const QStringcxx . . $ QString#& filename);
144 bool readPASMOFilecxx . . $ SymbolTable#readPASMOFile(e1defb592416720d).(const QStringcxx . . $ QString#& filename);
145 bool readVASMFilecxx . . $ SymbolTable#readVASMFile(e1defb592416720d).(const QStringcxx . . $ QString#& filename);
146
147 void mapSymbolcxx . . $ SymbolTable#mapSymbol(e1770879d1475328).(Symbolcxx . . $ Symbol#* symbol);
148 void unmapSymbolcxx . . $ SymbolTable#unmapSymbol(e1770879d1475328).(Symbolcxx . . $ Symbol#* symbol);
149
150 void fileChangedcxx . . $ SymbolTable#fileChanged(3520e46b33348bf6).(const QStringcxx . . $ QString# & path);
151
152 private:
153 stdcxx . . $ std/::vectorcxx . . $ std/vector#<stdcxx . . $ std/::unique_ptrcxx . . $ std/unique_ptr#<Symbolcxx . . $ Symbol#>> symbolscxx . . $ SymbolTable#symbols.;
154 QMultiMapcxx . . $ QMultiMap#<int, Symbolcxx . . $ Symbol#*> addressSymbolscxx . . $ SymbolTable#addressSymbols.;
155 QMultiHashcxx . . $ QMultiHash#<int, Symbolcxx . . $ Symbol#*> valueSymbolscxx . . $ SymbolTable#valueSymbols.;
156 QMultiMapcxx . . $ QMultiMap#<int, Symbol*>::iteratorcxx . . $ QMap#iterator# currentAddresscxx . . $ SymbolTable#currentAddress.;
157
158 struct SymbolFileRecordcxx . . $ SymbolTable#SymbolFileRecord# {
159 QStringcxx . . $ QString# fileNamecxx . . $ SymbolTable#SymbolFileRecord#fileName.;
160 QDateTimecxx . . $ QDateTime# refreshTimecxx . . $ SymbolTable#SymbolFileRecord#refreshTime.;
161 FileTypecxx . . $ SymbolTable#FileType# fileTypecxx . . $ SymbolTable#SymbolFileRecord#fileType.;
162 };
163 QListcxx . . $ QList#<SymbolFileRecordcxx . . $ SymbolTable#SymbolFileRecord#> symbolFilescxx . . $ SymbolTable#symbolFiles.;
164 QFileSystemWatchercxx . . $ QFileSystemWatcher# fileWatchercxx . . $ SymbolTable#fileWatcher.;
165 };
166
167 #endif // SYMBOLTABLE_H