Forum > Debugger

Possible bug in FpDebug

(1/2) > >>

440bx:
Hello,

Consider the following code:
--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---{$APPTYPE CONSOLE} program _absolute; type  TTABLE   = record    count     : DWORD;    item      : array[0..9] of dword;  end; type  TRECORD  = record    Field1     : TTABLE;    Field2     : TTABLE;  end;  procedure TheProc(InoutParameter : TRECORD);var  count1    : DWORD absolute InoutParameter.field1.count;  count2    : DWORD absolute InoutParameter.field2.count;   Parameter : TRECORD absolute InoutParameter;            var  OtherVar : DWORD; begin  writeln('count1: ', count1);  writeln('count2: ', count2);    OtherVar := count1;   count2   := count1 * 3;end; var  TheVariable : TRECORD; begin  TheVariable.Field1.count := 100;  TheVariable.Field2.count := 200;   TheProc(TheVariable);   readln;end.    
Set to watch the variables "count1", "count2" and "Parameter" in the procedure TheProc, FpDebug cannot display "count1" nor "count2" but displays 'Parameter". Please see attachment.

Either FPC is not emitting symbols for "count1" and  "count2" or FpDebug is not interpreting the symbols for those 2 variables correctly.

Comments welcome.

FPC v3.2.2 & Lazarus v3.99 (2024-10-23)

bytebites:
FPC trunk compiled code shows count1 and count2 correctly.

440bx:

--- Quote from: bytebites on November 13, 2024, 08:45:01 am ---FPC trunk compiled code shows count1 and count2 correctly.

--- End quote ---
FPC v3.2.2 outputs the values of count1 and count2 correctly too.  It is FpDebug's watch window that does not show the values.   Did you mean to say that FpDebug shows the values if the code is compiled with FPC trunk ?

bytebites:
Yes, in watches and local variables windows.

440bx:

--- Quote from: bytebites on November 13, 2024, 09:07:35 am ---Yes, in watches and local variables windows.

--- End quote ---
Then it sounds like it's a bug in the current version of FPC. 

Just curious, what version of Lazarus did you test with ?

Thanks

Navigation

[0] Message Index

[#] Next page

Go to full version