DBG: dis-assembler, fix back to short filename

git-svn-id: trunk@32813 -
This commit is contained in:
martin 2011-10-11 00:48:47 +00:00
parent f4530db335
commit 55247419c8

View File

@ -25,10 +25,11 @@ type
TAsmDlgLineEntry = record TAsmDlgLineEntry = record
State: TAsmDlgLineMapState; State: TAsmDlgLineMapState;
Addr: TDbgPtr; Addr: TDbgPtr;
Offset: Integer;
Dump: String; Dump: String;
Statement: String; Statement: String;
PasCode: String; PasCode: String;
FileName: String; FileName, FullFileName: String;
SourceLine: Integer; SourceLine: Integer;
ImageIndex: Integer; ImageIndex: Integer;
end; end;
@ -178,6 +179,7 @@ begin
FLineMap[n].Dump := ''; FLineMap[n].Dump := '';
FLineMap[n].Statement := ''; FLineMap[n].Statement := '';
FLineMap[n].ImageIndex := -1; FLineMap[n].ImageIndex := -1;
FLineMap[n].Offset := 0;
if AState = lmsUnknown if AState = lmsUnknown
then FLineMap[n].Addr := 0; then FLineMap[n].Addr := 0;
end; end;
@ -426,7 +428,7 @@ begin
Result := nil; Result := nil;
case AnAsmDlgLineEntry.State of case AnAsmDlgLineEntry.State of
lmsStatement: Result := BreakPoints.Find(AnAsmDlgLineEntry.Addr); lmsStatement: Result := BreakPoints.Find(AnAsmDlgLineEntry.Addr);
lmsSource: Result := BreakPoints.Find(AnAsmDlgLineEntry.FileName, AnAsmDlgLineEntry.SourceLine); lmsSource: Result := BreakPoints.Find(AnAsmDlgLineEntry.FullFileName, AnAsmDlgLineEntry.SourceLine);
end; end;
end; end;
@ -549,7 +551,7 @@ begin
try try
if (FLineMap[Line].State = lmsStatement) if (FLineMap[Line].State = lmsStatement)
then DebugBoss.DoCreateBreakPoint(FLineMap[Line].Addr, True, b) then DebugBoss.DoCreateBreakPoint(FLineMap[Line].Addr, True, b)
else DebugBoss.DoCreateBreakPoint(FLineMap[Line].FileName, FLineMap[Line].SourceLine, True, b); else DebugBoss.DoCreateBreakPoint(FLineMap[Line].FullFileName, FLineMap[Line].SourceLine, True, b);
if Ctrl and (b <> nil) if Ctrl and (b <> nil)
then b.Enabled := False; then b.Enabled := False;
finally finally
@ -1119,6 +1121,7 @@ begin
Itm := NextItm; Itm := NextItm;
NextItm := GetItem(Idx+1); NextItm := GetItem(Idx+1);
ALineMap[Line].ImageIndex := -1; ALineMap[Line].ImageIndex := -1;
ALineMap[Line].Offset := 0;
if Itm = nil if Itm = nil
then begin then begin
@ -1141,7 +1144,8 @@ begin
then s := Itm^.SrcFileName; then s := Itm^.SrcFileName;
ALineMap[Line].State := lmsSource; ALineMap[Line].State := lmsSource;
ALineMap[Line].SourceLine := Itm^.SrcFileLine; ALineMap[Line].SourceLine := Itm^.SrcFileLine;
ALineMap[Line].FileName := s; ALineMap[Line].FileName := Itm^.SrcFileName;
ALineMap[Line].FullFileName := s;
ALineMap[Line].PasCode := GetSourceCodeLine(Itm^.SrcFileName, Itm^.SrcFileLine); ALineMap[Line].PasCode := GetSourceCodeLine(Itm^.SrcFileName, Itm^.SrcFileLine);
end end
else begin else begin
@ -1166,7 +1170,8 @@ begin
then s := Itm^.SrcFileName; then s := Itm^.SrcFileName;
ALineMap[Line].State := lmsSource; ALineMap[Line].State := lmsSource;
ALineMap[Line].SourceLine := Itm^.SrcFileLine; ALineMap[Line].SourceLine := Itm^.SrcFileLine;
ALineMap[Line].FileName := s; ALineMap[Line].FileName := Itm^.SrcFileName;
ALineMap[Line].FullFileName := s;
if NextItm <> nil if NextItm <> nil
then ALineMap[Line].Statement := Format('(%d of %d)', [NextItm^.SrcStatementIndex, NextItm^.SrcStatementCount]) then ALineMap[Line].Statement := Format('(%d of %d)', [NextItm^.SrcStatementIndex, NextItm^.SrcStatementCount])
else ALineMap[Line].Statement := Format('(??? of %d)', [Itm^.SrcStatementCount]); else ALineMap[Line].Statement := Format('(??? of %d)', [Itm^.SrcStatementCount]);
@ -1193,6 +1198,7 @@ begin
then break; then break;
ALineMap[Line].Addr := Itm^.Addr; ALineMap[Line].Addr := Itm^.Addr;
ALineMap[Line].Offset := Itm^.Offset;
ALineMap[Line].State := lmsStatement; ALineMap[Line].State := lmsStatement;
ALineMap[Line].Dump := Itm^.Dump; ALineMap[Line].Dump := Itm^.Dump;
ALineMap[Line].Statement := Itm^.Statement; ALineMap[Line].Statement := Itm^.Statement;