[fpc-devel] debug info for nested procedures / Solved

Martin fpc at mfriebe.de
Wed Feb 10 20:25:10 CET 2016


Please ignore the below. "i" was a bad choice for testing. There may be 
a global var somewhere.

works fine, when the variable name is not used elsewhere.

On 10/02/2016 17:31, Martin wrote:
>
> procedure TForm1.FormCreate(Sender: TObject);
>   var   i: Integer;
>   procedure foo;
>   begin       i := i + 1;      end;
> begin
>   i := 11;
>   foo;
>   Caption := IntToStr(i);
> end;
>
> it appears that fpc now adds explicit debug info for "i" in the nested 
> procedure (dwarf and stabs)?
> And when using dwarf also drop $parentfp ? (still there for stabs)
>
> However I tested with gdb (win 32 bit 7.7.1 and 7.10) and both 
> displayed a wrong value.
> Is there any gdb that can display this?
>
> http://forum.lazarus.freepascal.org/index.php/topic,31095.msg201654.html#msg201654 
>
>
> _______________________________________________
> fpc-devel maillist  -  fpc-devel at lists.freepascal.org
> http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel




More information about the fpc-devel mailing list