Alexander Todorov wrote:
On 1/31/07, Marc Weustink <[EMAIL PROTECTED]> wrote:
1) the ide tells gdb: step
2) then gdb does its things and stops somewhere.
3) the ide asks gdb: where are you
4) gdb responds: I'm in file abc.xyz at line 123
5) the ide highlights that line.

gdb doesn't know this info by itself, but by the debuginfo present in
the executable generated by fpc.


> example:
>  procedure MyProc;
> 1  begin
> 2     writeln;
> 3  end;
>
> The highlited line moves like this: 1-2-1-3

I don't think this is exacly happening for this piece of code, but it
will when using a string as variable (since that needs
initialization/finalization code).

The example sequence I provided is for reference.


The steps are:
1) initialize local variables
2) execute
1) finalize local variables
3) return


> 1 try
> 2   writeln;
> 3 finally
> 4   writeln;
> 5 end;
>
> In this case it move like this: 2-1-2-4-5.
>

Entering a try finally section you can roughly be seen it as calling a
subroutine. So looking at your try..finally example, the steps are:

2) execute
1) enter the finalisation code of this "subproc" which source location
is generated at the start
2) is return from "subproc",
4,5) continue execution



Marc

Thank you for your answer. That was exactly what I needed to know.

Regards.
Alexander


I'm wondering: is this a feature or a bug ?


Regards
Boguslaw

_________________________________________________________________
    To unsubscribe: mail [EMAIL PROTECTED] with
               "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to