The GDB process is no longer running.I assume that is the error you originally got?

So not the "info address main"?

But when you changed settings you got "-break-insert main" ?

-----------Or maybe you get different errors at different times?

-----------Anyway lets have a look.

Since "InternalStartBreak" did not help, set it back to "Default"

If DisableLoadSymbolsForLibraries does not cause the "confirm off", then you may keep this on.

You may also add "DisableForcedBreakpoint" to true. (Unlikely that it is related, but it want hurt / you can later try to set it off again)

-------

Each error happens at a different internal stage.

"-gdb-set confirm off" happens right at the start. When gdb was just launched.

So that would meant your gdb was killed before the IDE could even do anything.

But there is another possibility:You get that error only, on your 2nd attempt to debug your exe.The IDE keeps using the same instance of GDB. So if it gave some error the first round, then it may give this error on the 2nd round.

To make sure this is not the case:* Open the Tools > Options, go to debugger, and check "Reset debugger after each run"* Restart the IDE

-------------------If you then get the error containing the word "main"

There are 2 reasons I can think of.

1) Normally fpc includes that for every program (I am assuming you are not trying to debug a library, or something alike?) But maybe for some reason (settings) this get removed

2) GDB has issues reading the debug info. Maybe it is some other structure in your program that adds something to debug info, and gdb fails reading the entire thing.

Either case is probably a question of settings.

Open Menu Project > Project Options

Make sure:(And if you use buildmodes, make sure to use the right one)

- smart linking is off / both checkboxes. (Page: Compilation and Linking)- Optimization is 0 (off) / Optimization 1 should be ok too for this, but 0 is recommended.- "Use external gdb debug symbols" is off (Page: Debugging). Also make sure your project folder (where the exe is, may be in the lib folder) does not have any *.dbg files or *.sym or similar)- "Generate debug info" is on. and it is on "Dwarf with sets (...)" or "Dwarf 2"

Actually you may try "Dwarf with sets (...)" or "Stabs" ("default" will probably create stabs).

But Stabs may cause issues with gdb. And may be the source of the problem.

Also when you set "Generate debug info", this only affects your source files, but there is also debug info for the packages (like LCL)

So at the same time go to "Additions and Overrides"- Select "Stored is lps"- Add "new target", unless "Target *" already exists. ("Target *" will be created by this)- Select "Target *"- Add custom option

Into custom option type either of the following-If you selected Dwarf ..., type: -gw-If you selected Stabs ..., type: -gs

Select "Build" from the Run menu. This may take a moment, as packages will be rebuild too.

---------------I dont know if that is the issue, but it is the best guess.

I have seen some versions of gdb, that reported errors (alas different errors than you got), when stabs was used. those errors only show sometimes. Depending on what kind of data structures are used in the project (I dont know the exact ones).That would match with your statement that new projects work, but your one big project does not.

The "additions and overrides" means you do not have to change every package from stabs to dwarf, but you can do it all in one place.

Sorry for that confusion, I was editing my post when you saw that note. Yes, I still got the info address main. The set confirm off was from me trying all things in your post which was not necessary.

I have just tried your other settings and still get the "info address main".

I had tried build modes before, but am not using them now and setting to debug or default build mode makes no difference.

I know that having a launching application causes problems and I had turned it off and on many times, now after playing with the settings you recommended and putting them all back to what I had before, I do not get that "info address main" when the launching application is turned off.

So it seems that my problem is solved, but I cannot replicate the crash except for doing this:Run - > Run Parameters - Use launching application = On