View Issue Details

IDProjectCategoryView StatusLast Update
0014543LazarusDebuggerpublic2009-09-08 23:17
ReporterDaniel GasparyAssigned ToMarc Weustink 
PrioritynormalSeveritymajorReproducibilityalways
Status assignedResolutionopen 
Product Version0.9.29 (SVN)Product Build 
Target VersionFixed in Version 
Summary0014543: Debug tooltips and Evaluate Menu item show incorrect values of string variables containing Null Character(#0)
DescriptionExample attached
TagsNo tags attached.
Fixed in Revision
LazTarget
WidgetsetGTK 2
Attached Files
  • debug-test.pp (515 bytes)
    var
      s: ansistring;
      i: longint;
    begin
        s:='abcd' + #10;
        //Debug tooltip shows s='abcd'#10 (correct)
        s:=s+#0;
        //Debug tooltip still shows s='abcd'#10 (incorrect)
        s:=s+'1234'; 
        //Debug tooltip still shows s='abcd'#10 (incorrect)
        writeln('length=', length(s)); 
        // Length = 10 (correct)
        writeln('"',s,'"'); 
        //"abcd<New Line>1234" (correct)
        for i:=1 to length(s) do
          write('//',ord(s[i]));
        writeln; 
        // //97//98//99//100//10//0//49//50//51//52 (correct)
    end.
    
    debug-test.pp (515 bytes)

Relationships

has duplicate 0021843 closedMarc Weustink String variables that contain the #0 is not properly inspected 

Activities

2009-09-08 23:17

 

debug-test.pp (515 bytes)
var
  s: ansistring;
  i: longint;
begin
    s:='abcd' + #10;
    //Debug tooltip shows s='abcd'#10 (correct)
    s:=s+#0;
    //Debug tooltip still shows s='abcd'#10 (incorrect)
    s:=s+'1234'; 
    //Debug tooltip still shows s='abcd'#10 (incorrect)
    writeln('length=', length(s)); 
    // Length = 10 (correct)
    writeln('"',s,'"'); 
    //"abcd<New Line>1234" (correct)
    for i:=1 to length(s) do
      write('//',ord(s[i]));
    writeln; 
    // //97//98//99//100//10//0//49//50//51//52 (correct)
end.
debug-test.pp (515 bytes)

Issue History

Date Modified Username Field Change
2009-09-08 23:17 Daniel Gaspary New Issue
2009-09-08 23:17 Daniel Gaspary Status new => assigned
2009-09-08 23:17 Daniel Gaspary Assigned To => Marc Weustink
2009-09-08 23:17 Daniel Gaspary File Added: debug-test.pp
2009-09-08 23:17 Daniel Gaspary Widgetset => GTK 2
2012-04-23 12:33 Martin Friebe Relationship added has duplicate 0021843