On Mon, 14 May 2007 01:38:30 +0200
Marc Weustink <[EMAIL PROTECTED]> wrote:
> Mattias Gaertner wrote:
> > On Mon, 14 May 2007 00:39:47 +0200
> > Marc Weustink <[EMAIL PROTECTED]> wrote:
> >
> >> Mattias Gaertner wrote:
> >>> On Sat, 12 May 2007 15:47:25 +0200
> >>> Marc Weustink <[EMAIL PROTECTED]> wrote:
> >>>
> >>>> Mattias Gaertner wrote:
> >>>>> On Sat, 12 May 2007 11:57:37 +0200
> >>>>> Marc Weustink <[EMAIL PROTECTED]> wrote:
> >>>>>
> >>>>>> Tobias Giesen wrote:
> >>>>>>> Hello,
> >>>>>>>
> >>>>>>> I am using one very simple form which I converted from a .dfm
> >>>>>>> file using lazres. It shows fine, but when I click on a button
> >>>>>>> whose ModalResult should close the form, I get a Range Check
> >>>>>>> Error.
> >>>>>>>
> >>>>>>> How can I debug this? The Range Check Error dialog only asks
> >>>>>>> me if I want to risk continuing the program, but it does not
> >>>>>>> indicate where to look for the error.
> >>>>>>>
> >>>>>>> The debugger does not catch the exception either. The checkbox
> >>>>>>> "Stop on Lazarus Exceptions" does not stick, it is deselected
> >>>>>>> each time I go into the Debugger Options window.
> >>>>>> The debugger always stops on a exception, the checkbox is not
> >>>>>> implemented. From your problem I guess that you are running an
> >>>>>> intel mac. On intel macs there is a problem that the debugger
> >>>>>> doesn't stop. I tried to work on that, but without an intel mac
> >>>>>> it is hard to reproduce for me (i've only a ppc mac)
> >>>>>>
> >>>>>>> I am currently using the 20070509 snapshots for Mac OS X,
> >>>>>>> because the latest ones crash a lot. Still I think the
> >>>>>>> debugger does not work, I cannot make breakpoints work or
> >>>>>>> anything.
> >>>>>>>
> >>>>>>> Any help would be greatly appreciated!
> >>>>>> What you can do is halping resolv this problem :)
> >>>>>>
> >>>>>> Run lazarus in gdb, set a breakpoint at
> >>>>>> TGDBMIDebugger.ProcessStopped (gdbmidebugger.pp line 1825) and
> >>>>>> try to figure out why the "breakpoint-hit" reason isn't handled
> >>>>>> in general. The FExceptionBreakID is the breakpoint set for
> >>>>>> catching software exceptions
> >>>>> I tested:
> >>>>> 'break FPC_RAISEEXCEPTION' works on a normal lcl project.
> >>>>> But doing it on the IDE sets a nonsense address. (here:
> >>>>> baseideintf.pas line 44 - a Var declaration).
> >>>>> Maybe the debugging info and gdb do not like each other under
> >>>>> MacOSX intel?
> >>>> That is something I don't understand. The debugger itself sets
> >>>> also FPC_RAISEEXCEPTION, but only through the mi interface. This
> >>>> should not affect the debuginfo nor the address of a breakpoint
> >>>> is placed. What if you set the FPC_RAISEEXCEPTION throug mi ?
> >>>> (start gdb with -i mi and look for the syntax on how to set a bp
> >>>> in the debug output window)
> >>> I tried:
> >>> gdb -i mi lazarus
> >>> -break-insert FPC_RAISEEXCEPTION
> >>>
> >>> Same effect. Works under i386/linux, but not under MacOSX/intel.
> >>> Using 'nm lazarus' I find only one 'FPC_RAISEEXCEPTION' with the
> >>> correct address.
> >> OK, then it is a bug in gdb on intel/mac
> >>
> >> if (on intel mac) break FPC_RAISEEXCEPTION works, and in mi
> >> -break-insert FPC_RAISEEXCEPTION fails, then there is nothing I can
> >> do.
> >
> > Maybe I confused you.
>
> and you confused me more :(
darn :(
> > It does not matter if I use mi or the default syntax.
> > In a simple project the break FPC_RAISEEXECPTION works, but on the
> > IDE it does not. For me this sounds like a gdb bug, or a bug in the
>
> what I wanted to know is when running gdb:
> 1) does break FPC_RAISEEXECPTION work ?
Yes for a simple project, no for the 'lazarus' binary.
> 2) (in mi mode) does -break-insert FPC_RAISEEXCEPTION work ?
Yes for a simple project, no for the 'lazarus' binary.
> 3) (in mi mode) does FPC_RAISEEXECPTION work ?
If you mean as command: No, it gives: 'FPC' command not found.
If you mean, if gdb stops there: Yes, it pauses the program.
> Just, simple plain gdb, I'm not interested in lazarus here. Only gdb.
Yes. I tried only gdb, not the IDE debugger.
> > debuginfo. Because nm shows the correct value, my guess is: it is a
> > gdb bug.
> > Another bug is: the IDE debugger does not seems to stop the
> > application, even if the exception was spotted by the IDE. But
> > since I didn't check this carefully, maybe I misinterpreted
> > something. I have to check this.
>
> If the exeption dialog is shown. the debugger is paused. What can
> happen is that doing a single step or a stepover results in a
> continue (wouthout step)
I tried once more: When an exception occurs, the IDE debugger stops the
program and shows the dialog. Pressing OK, the application continues,
while under linux it opens the sourceeditor at the error line.
I will send you the IDE output.
Mattias
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives