View Issue Details

IDProjectCategoryView StatusLast Update
0036160LazarusDebuggerpublic2019-10-11 13:54
ReporterCudaText man Assigned ToMartin Friebe  
Status closedResolutionwon't fix 
Product Version2.1 (SVN) 
Summary0036160: Debugger shows bad IDE tooltips for widechar
Descriptionrun this app in IDE. place breakpoint on /if/ line. during the breakpoint stop, place mouse cursor over 'ch' variable.
IDE shows bad tooltip for first WideChars from the example string.
ie negative numbers like:
-3936 #-3936

procedure TForm1.FormCreate(Sender: TObject);
  s: UnicodeString;
  i: integer;
  ch: widechar;
  s:= #$F0a0#$F123'test';
  for i:= 1 to length(s) do
    ch:= s[i];
    if ch=#0 then begin end;
TagsNo tags attached.
Fixed in Revision
Attached Files


Martin Friebe

2019-10-10 13:17

manager   ~0118461

Last edited: 2019-10-10 14:50

View 3 revisions

Version of fpc and gdb?

I get (3.0.4 / 7.7 and 8.2)

  s = 'test'
  (s)^ = 61600 #61600

-- EDIT:
tested wrong var, but same for "ch"

CudaText man

2019-10-10 17:48

reporter   ~0118468

Free Pascal Compiler version 3.3.1-r41371 [2019/02/18] for i386

GNU gdb (GDB) 7.2

Martin Friebe

2019-10-10 20:51

manager   ~0118479

Please verify the below, and reopen the issue if your case does not match the findings. (Otherwise this is a "wont fix")

I tested with the given setup and the issue only occurred if the debug info type was set to "-gs stabs" or "automatic".
STABS is very old, and has many disadvantages. It is generally recommended to use dwarf instead ("dwarf with sets" with gdb). From my tests issues with stabs will further increase when the IDE will move to more modern (8.x) versions of GDB.
For that reason stabs issues will in most cases not be addressed any more.

About debug info "automatic":
This lets FPC decide, and apparently for win32, fpc still defaults to stabs. (If that is an issue please report to fpc).
It is indeed a problem that the default is debug info (on win32) is causing such issues.

And yes it is arguable that the IDE should have its own defaults.
That is a question of man hours available though. (We will probably have fpdebug before such an ide-default. And fpdebug enforces dwarf).
But of course contributions towards a separate ide-default are welcome.

Also if the issue (negative values with stabs) can be fixed with a small or reasonable small patch (such as possible side effects can be judged without too much effort), and such a patch would be provided, then it can of course be accepted.

Further more, but not related to this:
The 32bit IDE for windows currently ships with gdb 7.7.1

Issue History

Date Modified Username Field Change
2019-10-10 11:33 CudaText man New Issue
2019-10-10 11:33 CudaText man Status new => assigned
2019-10-10 11:33 CudaText man Assigned To => Martin Friebe
2019-10-10 13:17 Martin Friebe Status assigned => feedback
2019-10-10 13:17 Martin Friebe LazTarget => -
2019-10-10 13:17 Martin Friebe Note Added: 0118461
2019-10-10 13:19 Martin Friebe Note Edited: 0118461 View Revisions
2019-10-10 14:50 Martin Friebe Note Edited: 0118461 View Revisions
2019-10-10 17:48 CudaText man Note Added: 0118468
2019-10-10 17:48 CudaText man Status feedback => assigned
2019-10-10 20:51 Martin Friebe Status assigned => resolved
2019-10-10 20:51 Martin Friebe Resolution open => won't fix
2019-10-10 20:51 Martin Friebe Note Added: 0118479
2019-10-11 13:54 CudaText man Status resolved => closed