It sounds like a bug. But....
A few tests needed.
You use different fpc versions for each of the IDE. So it could be either:
- the debugger has a regression
- the newer fpc compiles something that causes the problem (even when debugged inside the 2.2.0 debugger
Step 1
on an M1 machine
And your IDE is compiled as
- native M1 ?
- Intel (running as emulation) ?
And the project you debug is compiled as
- native M1 ?
- Intel (running as emulation) ?
1) Are those answers/settings the
same for both installations?
2) There was code added, to support debugging native M1 apps.
If either of the 2 answers is "Intel" => then maybe the issue is that the debugger wrongly things it's M1.
In that case it would try to find M1 registers => and if the app is intel, then that would be an issue.
** Check the
"register window" if the registers match the project.
** Run your IDE from a console (see the link for creating a log below). And specify
--debug-enable=DBG_ERROR,DBG_VERBOSE
When starting the debugger look for a line like:
Target 64 bit:...
Target ARM/M1:...
Does it match your project settings?
Step 2
Ensure you
compile the project (which you want to debug) with
-
-O- (no optimization, not even O1)- the same dwarf setting. (dwarf-2-with-sets or dwarf-3)
- Try
with and without external debug info.
Please also add A and B as watches in the watches-window, and
check the results in the watches window.
Depending on the results, if those works you can then find out which changes will break it.
Note: There have been other cases in the past, with different compiler versions, where using -O1 caused some watches in some context to return wrong values.
Step 3
Using the 2.3 IDE (build with FPC 3.3.1):
- change the compiler to fpc 3.2.2
- compile the project with 3.2.2 and debug
Optional, in the 2.2.0 IDE compile the project with fpc 3.3.1
Step 4
Which settings did you use to build your IDE?
Did you build the IDE with -O- or -O1 or -O2 or above?
Did you
build both IDE with the same settings?Did you have an earlier Lazarus 2.3? If yes, did the earlier 2.3 work better? Do you remember the revision, or date?
Depending on the outcome, there may be more questions later.....
You can create a log:
https://forum.lazarus.freepascal.org/index.php/topic,42869.0.htmlThere is currently some work on the debugger in progress. Given the error: "unable to read mem" it is unlikely to be the related.