Skip to content

Commit cfd3ba0

Browse files
committed
Fix debugging programs with multiline comments in NASM
1 parent 01e58e4 commit cfd3ba0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

nasm.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ void NASM::parseLstFile(QFile &lst, QVector<Assembler::LineNum> &lines, quint64
122122
continue;
123123
}
124124
if (inTextSection) {
125-
QRegExp lineRegExp("^\\s+[0-9]+\\s+([0-9a-fA-F]+)\\s+\\S+\\s+(.*)");
125+
QRegExp lineRegExp("^\\s+[0-9]+\\s+([0-9a-fA-F]+)\\s+\\S+\\s+([^;]*)");
126126
lineRegExp.setMinimal(false);
127127
if (lineRegExp.indexIn(line) == 0) {
128128
quint64 address = lineRegExp.cap(1).toULongLong(0, 16);
@@ -144,7 +144,7 @@ void NASM::parseLstFile(QFile &lst, QVector<Assembler::LineNum> &lines, quint64
144144
}
145145
QString line = programStream.readLine();
146146
numInCode++;
147-
line = line.trimmed();
147+
line = line.split(";")[0].trimmed();
148148
if (line == instrList[i].second) {
149149
LineNum l;
150150
l.numInCode = numInCode;

0 commit comments

Comments
 (0)