On 26/04/2012 12:32, Antonio Fortuny wrote:
Hi folks.

Here I come again with an old IDE error.
When entering the debugger ont break point and I hit F98 to step one line, nothing happens.
Hitting again F8 this window is displayed:

project has been rebuilt with -B
Lazarus 1.1 win32 from last snapshot today
All my packages rebuilt and installed OK
This behaviour is not common to all my projects. Most of them support the source walk step by step.
BTW, the same behaviour occurs and the same window is displayed when the project is an FPCunit test application: there is no way to walk thru the code but all break points work. This true for all FPCunit test application projects. In heavy test period this is really annoying.

Lets start with what the error means:

GDB (used by lazarus) reports breakpoint "-20". The minus indicates, it is a breakpoint internally handled by gdb (as opposed to a breakpoint set by the IDE, at a location given by the IDE).
GDB uses such breakpoints for single stepping.  A "pascal instructions" spans over several asm instr. If the ide sends "-step-over" (single step) the debugger finds all possible end locations and set breakpoints (e.g. an if has 2 locations)

So unfortunately the IDE has no influence on this breakpoint. It also means it can neither be fixed, nor worked-around in the IDE. It might be FPC or GDB.

The only work around, is to open the asm window and use single assembler step (you can also assign that do a key combo).
Another work around is "run to cursor" (usually F4)

If you upgraded, please ensure that the config point to the latest gdb (7.3 should be installed / but you can load 7.4 from mingw)

----
You specify "Lazarus 1.1 win32" So I assume you do run it on a 32 bit cpu? Or do you (perfectly ok) run 32bit code on a 64 bit cpu?

Reason I ask is the address 0x726447b8.
On 32 bit cpu, and unless you did anything special, your app would be expected to be at addresses like 0x040####### or 0x041#######.

So on 32 bit cpu this looks like it points to some loaded dll, or the kernel itself.

----
The first step is to make sure it is not a configuration issue. For your project, and for any package that has debug info (any switch containing -g...) ensure.
- There is no optimization (except -O1)
   If you specify options in the build lazarus dialog, then use  -O-1
- There is no smart linking (only needs to be checked in the project)

----
   Question time ( I can not promise that this will lead to anything)

Does the issue happen when stepping in a unit of your project? Or a unit of a package?

Is it just on one or 2 lines, a block of lines, all lines of the unit, several units?
If only some lines. Are those lines enclosed by try-except/finally blocks (nested try blocks)?

Do you compile with "stabs" (automatic) or " dwarf" (dwarf2 or dwarf+sets / NEVER dwarf3) (see linking tab of project/package option)?

What happens if you change this (project + package that contains the unit in question)?

Can you attach the source of the procedure in question (or at least some lines of it) AND the assembler (from asm debug win) for the line in question and at least the 2 surrounding lines?

If you open the assembler win, it has an edit/input on top. Enter the address. Does it show any info (that is any function name)?



--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to