View Issue Details

IDProjectCategoryView StatusLast Update
0038602LazarusDebuggerpublic2021-04-14 19:56
Reporterneville@meltonisl.com Assigned ToMartin Friebe  
PrioritynormalSeveritymajorReproducibilityalways
Status resolvedResolutionno change required 
Platformi386OSWindows 
Product Version2.0.12 
Summary0038602: Exception when adding or removing breakpoint during debug
DescriptionIf a breakpoint is added or removed from the program during a debug session, then an exception results meaning it's probably unwise to continue.
Steps To ReproduceDescribed above.
TagsNo tags attached.
Fixed in Revision
LazTarget-
Widgetset
Attached Files

Activities

Martin Friebe

2021-03-08 23:11

manager   ~0129520

Unfortunately I can not reproduce with a fresh install of: lazarus-2.0.12-fpc-3.2.0-win32.exe
From https://sourceforge.net/projects/lazarus/files/Lazarus%20Windows%2032%20bits/Lazarus%202.0.12/
That is from the "Windows 32 bits" download section.

What is the exact text of the exception you get? (including any content revealed by a "more" button, if present)

You specified "i386". Does this apply to
- your IDE (you use the IDE from the above link)
- your compiled projects (you compile your own projects to 32 bits)

Or do you use a 64bit IDE, and cross compile to 32bits?

To verify your install, please open the Windows Task Manager (ctrl-shift-escape on Windows 10)
- Does the Lazarus IDE show as "lazarus.exe" or "lazarus.exe (32bit)" ?
- While debugging, does your project show with or without the " (32 bit)" extension in the Task Manager?
- While debugging, does GDB.exe show with or without the " (32 bit)" extension in the Task Manager?

Do you have a folder
C:\lazarus\mingw\i386-win32\bin
C:\lazarus\mingw\x86_64-win64\bin

When you open the menu Tools > Options and go to debugger, what is the content of the edit under "Debugger type and path"?
There is first a drop-down which will say "GNU debugger (gdb)", and below that an edit (combo-edit) with something like "C:\******\gdb.exe"? What is this path?

-----
If you are cross-compiling (have a 64bit IDE, but compile for 32bit).

Do you have
C:\lazarus\mingw\i386-win32\bin\LazGDeBugControl.exe

neville@meltonisl.com

2021-03-10 19:48

reporter   ~0129559

Running on Win64, Win64IDE, target Win32, CPU i386, Processor Default.
Exception - EXTERNAL SIGSEGV
Lazarus shows up with no (64/32 bit)
Program being debugged shows with (WIN32)
Both the mingw folders you asked do exist
I do have LazGDeBugControl.exe

Martin Friebe

2021-03-10 21:12

manager   ~0129561

Ok, I think I reproduced. Just to confirm.

If you click "Ok" for the exception, then the assembler window will be shown?

----
This is (was / I forgot) actually a known issue. It is fixed for 2.2 when that will be released.
IIRC the fix was to complex to merge to 2.0.x.

Under 2.0.x (and earlier) a 64bit Lazarus IDE using gdb can't debug a 32bit target. (At least not on current Windows 10 / not verified with other/older Win / IIRC it used to work).

There are 2 options:
1) Installing a 32bit Lazarus.

2) Recommended
Using a 64bit IDE (actually 64 or 32 / does not matter) with FpDebug.
Menu: Packages > Install Packages: Select "LazDebuggerFp", install, rebuild.
Menu: Tools > Options > Debugger: Select "FpDebug"

For a feature compare: https://wiki.lazarus.freepascal.org/Debugger_Status
Also if you debug a lot into dll, or into the RTL, then fpdebug may not always get the full stack. In normal operation that should not matter.

----
If the error indeed (as asked above) leads to the asm window, then this issue will be closed as "fixed" (fixed in future release).

Martin Friebe

2021-04-14 19:56

manager   ~0130378

No further feedback received.
Also the issue is believed to be fixed for the next major release.

If you have further info, or if the issue does happen while using svn trunk (or after the next major releaze), then please reopen the issue.

Issue History

Date Modified Username Field Change
2021-03-08 20:49 neville@meltonisl.com New Issue
2021-03-08 20:49 neville@meltonisl.com Status new => assigned
2021-03-08 20:49 neville@meltonisl.com Assigned To => Martin Friebe
2021-03-08 23:11 Martin Friebe Status assigned => feedback
2021-03-08 23:11 Martin Friebe LazTarget => -
2021-03-08 23:11 Martin Friebe Note Added: 0129520
2021-03-10 19:48 neville@meltonisl.com Note Added: 0129559
2021-03-10 19:48 neville@meltonisl.com Status feedback => assigned
2021-03-10 21:12 Martin Friebe Status assigned => feedback
2021-03-10 21:12 Martin Friebe Note Added: 0129561
2021-04-14 19:56 Martin Friebe Status feedback => resolved
2021-04-14 19:56 Martin Friebe Resolution open => no change required
2021-04-14 19:56 Martin Friebe Note Added: 0130378