Recent

Author Topic: Enable Dwarf 2 (-gw)  (Read 3724 times)

1HuntnMan

  • Sr. Member
  • ****
  • Posts: 448
  • From Delphi 7 to Lazarus
    • NewFound Photo Art
Enable Dwarf 2 (-gw)
« on: October 26, 2023, 03:43:41 pm »
I all of sudden get this after starting a new project and loading a main form to the project that I created earlier.  This is the question the Laz compiler is asking me:

Enable Dwarf 2 (-gw)?
The project does not write debug info in Dwarf format. The "FpDebug internal Dwarf-debugger" supports only Dwarf.

Choices are: Enable Dwarf 2 with sets, Enable Dwarf 2 (-gw), Enable Dwarf 3 (gw3) or Cancel

I haven't run into this and don't know which to choose... any suggestions? (see the screen shot attached)
Thanks...

Dzandaa

  • Hero Member
  • *****
  • Posts: 531
  • From C# to Lazarus
Re: Enable Dwarf 2 (-gw)
« Reply #1 on: October 26, 2023, 04:21:41 pm »
Hi,

I use dwarf 3

B->
Regards,
Dzandaa

1HuntnMan

  • Sr. Member
  • ****
  • Posts: 448
  • From Delphi 7 to Lazarus
    • NewFound Photo Art
Re: Enable Dwarf 2 (-gw)
« Reply #2 on: October 26, 2023, 04:35:37 pm »
I should have searched this before I posted.  A lot of discussions about these 3 choices.  After reading thru about 6-7 posts, which mostly didn't understand, bottom line I could get out of all the reading, the last response was a detail description and the recommendation was Enable Dwarf 2 with sets so that's what I selected.  If this pops up again, then I'm going to use -gw3.

Thanks and if you can explain in a beginner's language why have these choices? I must of did something different to cause this pop-up. I have been developing this small project for about a month and haven't seen this before.

andresayang

  • Full Member
  • ***
  • Posts: 124
Re: Enable Dwarf 2 (-gw)
« Reply #3 on: October 26, 2023, 07:54:14 pm »
I should have searched this before I posted.  A lot of discussions about these 3 choices.  After reading thru about 6-7 posts, which mostly didn't understand, bottom line I could get out of all the reading, the last response was a detail description and the recommendation was Enable Dwarf 2 with sets so that's what I selected.  If this pops up again, then I'm going to use -gw3.

Thanks and if you can explain in a beginner's language why have these choices? I must of did something different to cause this pop-up. I have been developing this small project for about a month and haven't seen this before.
Hi

Are you executing your code inside IDE without being in "debug" mode for "build mode" ? (I have exactly same question from Lazarus ide when running in "release compilation" inside ide.

Cheers
Linux, Debian 12
Lazarus: always latest release

TRon

  • Hero Member
  • *****
  • Posts: 4377
Re: Enable Dwarf 2 (-gw)
« Reply #4 on: October 26, 2023, 07:59:06 pm »
Recommended read: Debugger setup (don't forget to check the links on that page as well)

(I have exactly same question from Lazarus ide when running in "release compilation" inside ide.
Also when you choose the menu option run (without debugger) ?
« Last Edit: October 26, 2023, 08:39:22 pm by TRon »
Today is tomorrow's yesterday.

andresayang

  • Full Member
  • ***
  • Posts: 124
Re: Enable Dwarf 2 (-gw)
« Reply #5 on: October 26, 2023, 09:32:09 pm »
Recommended read: Debugger setup (don't forget to check the links on that page as well)

(I have exactly same question from Lazarus ide when running in "release compilation" inside ide.
Also when you choose the menu option run (without debugger) ?

No, of course, but sometime I forget to turn back to debut mode before running ... I never said it happen all time.
Linux, Debian 12
Lazarus: always latest release

TRon

  • Hero Member
  • *****
  • Posts: 4377
Re: Enable Dwarf 2 (-gw)
« Reply #6 on: October 27, 2023, 01:52:57 am »
No, of course, but sometime I forget to turn back to debut mode before running ... I never said it happen all time.
I get that. The question then becomes what did you expect that would happen in that case ?

You've build in release mode thus without debug information linked to your executable (at least I assume that you've not opted to include debug information in your release build mode settings). You start your application from within Lazarus using the run debug mode, Lazarus detects that it is missing debug information and prompts you to select the type of debug that should be generated for your executable so that it can run in debug mode.

What would you expect that would happen ? That Lazarus automatically selects a build mode from your list of build modes without consulting the user about it ? E.g. I do not fully understand what the problem is or what it is that made you make that remark/question as to me that described behaviour seems reasonably sane to/for me. But your opinion on the matter might simply be different that mine  :)
« Last Edit: October 27, 2023, 01:55:21 am by TRon »
Today is tomorrow's yesterday.

andresayang

  • Full Member
  • ***
  • Posts: 124
Re: Enable Dwarf 2 (-gw)
« Reply #7 on: October 27, 2023, 04:14:16 am »
Tron

I was answering the question: "I must of did something different to cause this pop-up. I have been developing this small project for about a month and haven't seen this before." from @1HuntnMan telling him that this popup rise also on my system when I try to execute "release" version from inside Ide (I exactly know why the popup window appears and do not expect nothing else that this popup window.

Cheers
Linux, Debian 12
Lazarus: always latest release

MarkMLl

  • Hero Member
  • *****
  • Posts: 8572
Re: Enable Dwarf 2 (-gw)
« Reply #8 on: October 27, 2023, 11:29:55 am »
I didcussed this in an earlier thread with Martin. All it's saying is that the project doesn't have an explicit setting, telling the IDE you want one won't in most cases change anything (other than making the dialog(ue) go away).

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Logitech, TopSpeed & FTL Modula-2 on bare metal (Z80, '286 protected mode).
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

TRon

  • Hero Member
  • *****
  • Posts: 4377
Re: Enable Dwarf 2 (-gw)
« Reply #9 on: October 27, 2023, 12:58:15 pm »
I was answering the question: "I must of did something different to cause this pop-up. I have been developing this small project for about a month and haven't seen this before." from @1HuntnMan telling him that this popup rise also on my system when I try to execute "release" version from inside Ide (I exactly know why the popup window appears and do not expect nothing else that this popup window.
Ah, my bad and thank you for clearing that up.

In that case I completely misunderstood the intention of your post :-[

My apologies.
Today is tomorrow's yesterday.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 12345
  • Debugger - SynEdit - and more
    • wiki
Re: Enable Dwarf 2 (-gw)
« Reply #10 on: October 27, 2023, 07:49:02 pm »
https://wiki.freepascal.org/Debugger_Setup
Gives details at the top, and under "Project Options"

Also https://wiki.freepascal.org/DWARF

 

TinyPortal © 2005-2018