Array value popup display not quite right lazarus / 12-Debugger ---------------------------------------------------------------------- 440bx · 2020-01-28 18:50 Hello, I was fiddling with bit arrays and was getting some values from GDB, I couldn't make sense of.  I wrote the following little test program to see what GDB would say:Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i program TestBitArray; type  T1BIT = 0..1; var  BitArray  : bitpacked array[0..8191] of T1BIT;  ByteArray : packed array[0..1023] of byte absolute BitArray;   i   : integer;   sum : qword;  begin  sum := 0;  for i := low(BitArray) to high(BitArray) do  begin    inc(sum, BitArray[i]);  end;  writeln(Sum);   sum := 0;  for i := low(ByteArray) to high(ByteArray) do  begin    inc(Sum, ByteArray[i]);  end;  writeln(Sum);end.When hovering the mouse over the BitArray variable, GDB shows that some of the elements in the array are not zero (they should be - and are - zero.)  The Sum variables confirm that all elements are zero even though GDB shows some of them as not zero. What the popup display shows is attached to this post. I figured I'd post this as an FYI.  Also, the GDB version I'm using is 7.2, type of Debug Info is "dwarf with sets". ---------------------------------------------------------------------- julkas · 2020-01-29 10:14 Confirm. Same output. If remove bitpacked or change to packed then GDB shows only zeroes.