Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Index: rtl/inc/lineinfo.pp
- ===================================================================
- --- rtl/inc/lineinfo.pp (revision 20463)
- +++ rtl/inc/lineinfo.pp (working copy)
- @@ -59,7 +59,6 @@
- {$WARNING This code is not thread-safe, and needs improvement }
- var
- e : TExeFile;
- - staberr : boolean;
- stabcnt, { amount of stabs }
- stablen,
- stabofs, { absolute stab section offset in executable }
- @@ -80,8 +79,6 @@
- baseaddr : pointer;
- begin
- OpenStabs:=false;
- - if staberr then
- - exit;
- GetModuleByAddr(addr,baseaddr,filename);
- {$ifdef DEBUG_LINEINFO}
- @@ -111,7 +108,7 @@
- end
- else
- begin
- - staberr:=true;
- + CloseExeFile(e);
- exit;
- end;
- end;
- @@ -138,8 +135,6 @@
- fillchar(func,high(func)+1,0);
- fillchar(source,high(source)+1,0);
- line:=0;
- - if staberr then
- - exit;
- if not e.isopen then
- begin
- if not OpenStabs(pointer(addr)) then
- @@ -265,16 +260,14 @@
- hs : string[32];
- line : longint;
- Store : TBackTraceStrFunc;
- - Success : boolean;
- begin
- {$ifdef DEBUG_LINEINFO}
- writeln(stderr,'StabBackTraceStr called');
- {$endif DEBUG_LINEINFO}
- { reset to prevent infinite recursion if problems inside the code PM }
- - Success:=false;
- Store:=BackTraceStrFunc;
- BackTraceStrFunc:=@SysBackTraceStr;
- - Success:=GetLineInfo(ptruint(addr),func,source,line);
- + GetLineInfo(ptruint(addr),func,source,line);
- { create string }
- {$ifdef netware}
- { we need addr relative to code start on netware }
- @@ -296,8 +289,7 @@
- end;
- StabBackTraceStr:=StabBackTraceStr+' of '+source;
- end;
- - if Success then
- - BackTraceStrFunc:=Store;
- + BackTraceStrFunc:=Store;
- end;
- Index: rtl/inc/lnfodwrf.pp
- ===================================================================
- --- rtl/inc/lnfodwrf.pp (revision 20463)
- +++ rtl/inc/lnfodwrf.pp (working copy)
- @@ -61,7 +61,6 @@
- e : TExeFile;
- EBuf: Array [0..EBUF_SIZE-1] of Byte;
- EBufCnt, EBufPos: Integer;
- - DwarfErr : boolean;
- { the offset and size of the DWARF debug_line section in the file }
- DwarfOffset : longint;
- DwarfSize : longint;
- @@ -141,8 +140,6 @@
- function Opendwarf(addr : pointer) : boolean;
- begin
- Opendwarf:=false;
- - if dwarferr then
- - exit;
- GetModuleByAddr(addr,baseaddr,filename);
- {$ifdef DEBUG_LINEINFO}
- @@ -164,7 +161,7 @@
- Opendwarf:=true
- else
- begin
- - dwarferr:=true;
- + CloseExeFile(e);
- exit;
- end;
- end;
- @@ -727,8 +724,6 @@
- source := '';
- found := false;
- GetLineInfo:=false;
- - if DwarfErr then
- - exit;
- if not e.isopen then
- begin
- if not OpenDwarf(pointer(addr)) then
- @@ -758,13 +753,11 @@
- hs : string[32];
- line : longint;
- Store : TBackTraceStrFunc;
- - Success : boolean;
- begin
- { reset to prevent infinite recursion if problems inside the code }
- - Success:=false;
- Store := BackTraceStrFunc;
- BackTraceStrFunc := @SysBackTraceStr;
- - Success:=GetLineInfo(ptruint(addr), func, source, line);
- + GetLineInfo(ptruint(addr), func, source, line);
- { create string }
- DwarfBackTraceStr :=' $' + HexStr(ptruint(addr), sizeof(ptruint) * 2);
- if func<>'' then
- @@ -779,8 +772,7 @@
- end;
- DwarfBackTraceStr := DwarfBackTraceStr + ' of ' + source;
- end;
- - if Success then
- - BackTraceStrFunc := Store;
- + BackTraceStrFunc := Store;
- end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement