8

I ran into a Win64 debugging problem where it looks like we are "missing" debug info. So I did some research and re-created all my .dproj files for our flagship product. This helped, as I got my "missing" blue balls back.

But now I run into a new problem: the (top) stack frame displayed in the stack display window appears to be wrong, which results in local variables not being displayed in the local variables pane, and also not when hovering the mouse above some variable. But when I select the stack frame which I think is correct, the local variables window is not empty anymore. Hovering the mouse still shows nothing.

Also check the linked screenshots, which should clarify things a lot more.

Relevant compiler options

  • Debug info: Debug information
  • Local Symbols: True
  • Stack Frames: True
  • Symbol reference info: reference info
  • Use debug dcus: False
  • Use imported data references: True
  • Linker debug info: True
  • Include remote debug symbols: False

Version info:

  • RAD studio Enterprise 10.2.3 tokyo, build 25.0.29899.2631
  • DDevExtension installed, IDEFixPack Installed (Uninstalling makes no difference)
  • JCLDebug installed (uninstalling makes no Difference)

I have played around with many combinations of debug settings, but the problem persists on my system.

My colleagues computer has exactly the same issue in the same code, so at least it is reproducible with confidence. When trying to reproduce this using a small project with runtime bpl's the problem appears not to occur, or I am unable to reproduce it. Hence I have no source to release for this.

And off course here's a (are) question(s):

  • Has anyone else experienced this?
  • found a solution? - please share!
  • Not found a solution? -> please add comment/vote for this issue

I would love to add some pictures to clarify, but unfortunately my reputation isn't high enough yet. So I can only add links to the pictures, sorry for that.

  • Breakpoint in source code view
  • Breakpoint in Full CPU view
  • Select sub-top stackframe
  • Going even one lvl deeper, unexpected stack top
  • The previous instruction caused the stack display to get mangled
Jason Aller
  • 3,541
  • 28
  • 38
  • 38
H.Hasenack
  • 1,094
  • 8
  • 27
  • The obvious and probably most relevant option is "stack frames" under "Delphi Compiler -> Compiling" tab. Did you turn that on? If you can put some breakpoint in a routine way lower in the call stack and then trace through the code until the call stack starts appearing wrong. You can then check if something affected it and might confuse the debuggers stack walking. – Stefan Glienke Jun 12 '18 at 08:00
  • Tried that, no joy unfortunately. – H.Hasenack Jun 12 '18 at 08:04
  • Stack trace is OK just before I enter the TfrmNewAnalyses.Create call. Once the constructor isenterd, the stack frame is broken. – H.Hasenack Jun 12 '18 at 08:06
  • I have added another screenshot. Once the move instruction as 0315D746 is executed, the stack display is messed up. – H.Hasenack Jun 12 '18 at 08:15
  • Typical debugger glitch then caused by some code generated by the compiler in the prologue that it misinterprets. You can try commenting out statements in the method to see what causes it and possibly write them differently once you find that out. But I think it now goes beyond SO capability. – Stefan Glienke Jun 12 '18 at 08:27
  • ah nice tip, stefan. I have added a MessageBox call right before the "inherited" call, but no difference. Next COmmented out all code -except for the "inherited" call. Still no difference. I agree its beyond SO. So please place your votes on my issue and raise my reputation so my life gets easier here on StackOverflow :p – H.Hasenack Jun 12 '18 at 08:39
  • Thx for the upvote! – H.Hasenack Jun 12 '18 at 08:54

1 Answers1

0

As it turns out there is something completely different going on here. The missing local symbols appear to be caused by the debugger not loading ALL debug information. I have created a unit test the loads the runtime BPL's. When I run my form (check screenshots in question) from within the unit test, stackframes and local symbols are displayed correctly When I run the form from within my rather large application, then exactly the same binary bpl does NOT show the local symbols and stack info. Strangely enough other units in the same BPL actually do show correct stack and local variables info, eg the unit that creates the form in the first place is OK upto where the constructor of the form is created.

So I guessed there is something going on with loading the symbol table. And when I change the debug settings to as displayed in the screenshot (Load All SYmbols=off, and onoy load debug info for the main bpl), voila my stack and local variables are displayed correctly. In the same binary. When I turn ON "load symbols for unspecified modules" I get back to the old situation with the missing stack and local symbols.

So I suspect there is a limit to how much debug info the debugger can handle (really? in 64bit mode?), which I seem to remember from long ago Delphi 2..7 debugging.

Off course, when doing so I lack the debug info for all the other units, so while it is an answer, it is NOT a final solution. I will put up another question and issue in the embarcadero site.

enter image description here

H.Hasenack
  • 1,094
  • 8
  • 27
  • I also found this related issue on the embarcadero site, and in there it was mentioned you can also use wildcards for loading the symbols tables. Ant his works like a charm to work around the problem whthout having to specify each and every bpl that I use. https://quality.embarcadero.com/browse/RSP-10080 – H.Hasenack Jun 29 '18 at 13:35