Re: [fpc-pascal]RE: Debugging FPC

2003-08-22 Thread James Mills
On Thu, Aug 21, 2003 at 09:44:30PM -0700, Jeff Pohlmeyer wrote:
> > With compile modes: -gg -gl
> > Aren't line info and tracebacks suppose to be shown,
> > the above example does not show these.
> 
> 
> I think the problem comes with using exceptions. Normally, if a 
> run-time error occurs, the default exit proc will print the line
> number info to stdout. But if an exception traps the error before
> the program exits, then that information is absorbed by the 
> exception handler, and never makes it to the exit proc.

I do not have any exception handlers in my program though...
So how does it not show the line number info ?

cheers
James

> 
> 
> 
> __
> Do you Yahoo!?
> Yahoo! SiteBuilder - Free, easy-to-use web site design software
> http://sitebuilder.yahoo.com
> 
> ___
> fpc-pascal maillist  -  [EMAIL PROTECTED]
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal

-- 
-
-Zero Defect Software Engineers Group - ZDSEG
-
-You need only two tools. WD-40 and duct tape.
-If it doesn't move and it should, use WD-40.
-If it moves and shouldn't, use the tape.

___
fpc-pascal maillist  -  [EMAIL PROTECTED]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal]Debugging FPC

2003-08-22 Thread James Mills
On Fri, Aug 22, 2003 at 11:08:14AM +1000, James Mills wrote:
> I think perhaps I need to repost my question as I saw the mailing list
> server go down yesterday...
> 
> Hi,
> 
> 1) Is there anyway of finding out the cooresponding source line when a
> program crashes and only outputs the following:
> 
> An unhandled exception occurred at 0x080A33B1 :
> List index exceeds bounds (-1)
>   0x080A33B1

Also anyone out there, I'd really like to know if the above is possible
... I have to find the source of this particular defect in 19,000 LOC.
All it tells me is an index out of bounds, which could mean a number of
things.

Thanks in advance

James

> 
> 2) With compile modes: -gg -gl
>Aren't line info and tracebacks suppose to be shown, the above
> example does not show these.
> 
> cheers
> James
> 
> -- 
> -
> -Zero Defect Software Engineers Group - ZDSEG
> -
> -You need only two tools. WD-40 and duct tape.
> -If it doesn't move and it should, use WD-40.
> -If it moves and shouldn't, use the tape.
> 
> ___
> fpc-pascal maillist  -  [EMAIL PROTECTED]
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal

-- 
-
-Zero Defect Software Engineers Group - ZDSEG
-
-You need only two tools. WD-40 and duct tape.
-If it doesn't move and it should, use WD-40.
-If it moves and shouldn't, use the tape.

___
fpc-pascal maillist  -  [EMAIL PROTECTED]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal]Debugging FPC

2003-08-22 Thread jonas


On Fri, 22 Aug 2003, James Mills wrote:

> > An unhandled exception occurred at 0x080A33B1 :
> > List index exceeds bounds (-1)
> >   0x080A33B1
>
> Also anyone out there, I'd really like to know if the above is possible
> ... I have to find the source of this particular defect in 19,000 LOC.
> All it tells me is an index out of bounds, which could mean a number of
> things.

Load the program in gdbpas. Put a breakpoint on HandleErrorFrame (with the
command "b HANDLEERRORFRAME", caps are important). You can set command
line parameters using "set args para1 para2 ...". If not all of the
sources are in one directory, you can add directories that gdbpas has to
search sources in using "directory dir1;dir2;dir3;...".

Next, type "run". When the breakpoint is hit, type "bt" (backtrace).


Jonas


___
fpc-pascal maillist  -  [EMAIL PROTECTED]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal]Debugging FPC

2003-08-22 Thread James Mills
On Fri, Aug 22, 2003 at 09:30:49AM +0200, [EMAIL PROTECTED] wrote:
> 
> 
> On Fri, 22 Aug 2003, James Mills wrote:
> 
> > > An unhandled exception occurred at 0x080A33B1 :
> > > List index exceeds bounds (-1)
> > >   0x080A33B1
> >
> > Also anyone out there, I'd really like to know if the above is possible
> > ... I have to find the source of this particular defect in 19,000 LOC.
> > All it tells me is an index out of bounds, which could mean a number of
> > things.
> 
> Load the program in gdbpas. Put a breakpoint on HandleErrorFrame (with the

what is gdbpas ? I'm using FPC 1.0.6 ...

cheers
James

> command "b HANDLEERRORFRAME", caps are important). You can set command
> line parameters using "set args para1 para2 ...". If not all of the
> sources are in one directory, you can add directories that gdbpas has to
> search sources in using "directory dir1;dir2;dir3;...".
> 
> Next, type "run". When the breakpoint is hit, type "bt" (backtrace).
> 
> 
> Jonas
> 
> 
> ___
> fpc-pascal maillist  -  [EMAIL PROTECTED]
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal

-- 
-
-Zero Defect Software Engineers Group - ZDSEG
-
-You need only two tools. WD-40 and duct tape.
-If it doesn't move and it should, use WD-40.
-If it moves and shouldn't, use the tape.

___
fpc-pascal maillist  -  [EMAIL PROTECTED]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal]Debugging FPC

2003-08-22 Thread jonas


On Fri, 22 Aug 2003, James Mills wrote:

> what is gdbpas ? I'm using FPC 1.0.6 ...

gdbpas is included with fpc (all versions). gdb = GNU DeBugger. The "pas"
stands for "with pascal extensions".


Jonas

PS: please only quote the part of the original mail that's necessary to
understand the context.


___
fpc-pascal maillist  -  [EMAIL PROTECTED]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal]Debugging FPC

2003-08-22 Thread James Mills
On Fri, Aug 22, 2003 at 10:35:15AM +0200, [EMAIL PROTECTED] wrote:
> 
> 
> gdbpas is included with fpc (all versions). gdb = GNU DeBugger. The "pas"
> stands for "with pascal extensions".
I do not seem to have this anywhere on my system. Of course I have gdb.
Can I get it somewhere ? (Perhaps the Debian maintainer didn't include
it in 1.0.6)

> PS: please only quote the part of the original mail that's necessary to
> understand the context.
nps, sorry, putting into practise now :)

-- 
-
-Zero Defect Software Engineers Group - ZDSEG
-
-You need only two tools. WD-40 and duct tape.
-If it doesn't move and it should, use WD-40.
-If it moves and shouldn't, use the tape.

___
fpc-pascal maillist  -  [EMAIL PROTECTED]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal]Debugging FPC

2003-08-22 Thread jonas


On Fri, 22 Aug 2003, James Mills wrote:

> > gdbpas is included with fpc (all versions). gdb = GNU DeBugger. The "pas"
> > stands for "with pascal extensions".
> I do not seem to have this anywhere on my system. Of course I have gdb.
> Can I get it somewhere ? (Perhaps the Debian maintainer didn't include
> it in 1.0.6)

gdb will work fine as well. gdbpas has just a bit more pascal support.


Jonas


___
fpc-pascal maillist  -  [EMAIL PROTECTED]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal]Debugging FPC

2003-08-22 Thread Peter Vreman
>> gdbpas is included with fpc (all versions). gdb = GNU DeBugger. The
>> "pas"
>> stands for "with pascal extensions".
> I do not seem to have this anywhere on my system. Of course I have gdb.
> Can I get it somewhere ? (Perhaps the Debian maintainer didn't include
> it in 1.0.6)

You can use the gdb available in Debian. It has already the pascal support
included.




___
fpc-pascal maillist  -  [EMAIL PROTECTED]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal]Debugging FPC

2003-08-22 Thread James Mills
On Fri, Aug 22, 2003 at 03:14:20PM +0200, Peter Vreman wrote:
> You can use the gdb available in Debian. It has already the pascal support
> included.
(gdb) b HANDLEERRORFRAME
Function "HANDLEERRORFRAME" not defined.

It doesn't define whatever HANDLEERRORFRAME is though, so what Jonas
said won't work...

cheers
James

-- 
-
-Zero Defect Software Engineers Group - ZDSEG
-
-You need only two tools. WD-40 and duct tape.
-If it doesn't move and it should, use WD-40.
-If it moves and shouldn't, use the tape.

___
fpc-pascal maillist  -  [EMAIL PROTECTED]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal]Debugging FPC

2003-08-22 Thread Peter Vreman
> On Fri, Aug 22, 2003 at 03:14:20PM +0200, Peter Vreman wrote:
>> You can use the gdb available in Debian. It has already the pascal
>> support
>> included.
> (gdb) b HANDLEERRORFRAME
> Function "HANDLEERRORFRAME" not defined.
>
> It doesn't define whatever HANDLEERRORFRAME is though, so what Jonas
> said won't work...

Try FPC_BREAK_ERROR. It is a special symbol also used by the IDE.



___
fpc-pascal maillist  -  [EMAIL PROTECTED]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal]Debugging FPC

2003-08-22 Thread jonas


On Sat, 23 Aug 2003, James Mills wrote:

> (gdb) b HANDLEERRORFRAME
> Function "HANDLEERRORFRAME" not defined.
>
> It doesn't define whatever HANDLEERRORFRAME is though, so what Jonas
> said won't work...

Of course, I forgot that the RTL we distribute doesn't contain symbol
information. Go to the rtl/linux sources directory (I don't know offhand
where the sources are installed under Linux), type "make OPT="-g", and
then compile your program with -Fu. Now it
will link to an rtl with full debug information and you will be able to
place breakpoints in the rtl.


Jonas


___
fpc-pascal maillist  -  [EMAIL PROTECTED]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


[fpc-pascal]Unsubscribing

2003-08-22 Thread DigitalVertex
Hi,

I'd like to unsubscribe this list, because I will not be able to check
it for a long time.

Unfortunately, I don't know how.

On this site: http://lists.freepascal.org/mailman/listinfo/fpc-pascal
there's only information about subscribing.

I'd be glad if an admin could remove me or someone could  tell me until
Monday how to unsubscribe.

Thx,

Holger


-- 
COMPUTERBILD 15/03: Premium-e-mail-Dienste im Test
--
1. GMX TopMail - Platz 1 und Testsieger!
2. GMX ProMail - Platz 2 und Preis-Qualitätssieger!
3. Arcor - 4. web.de - 5. T-Online - 6. freenet.de - 7. daybyday - 8. e-Post


___
fpc-pascal maillist  -  [EMAIL PROTECTED]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal]Unsubscribing

2003-08-22 Thread jonas


On Fri, 22 Aug 2003 [EMAIL PROTECTED] wrote:

> On this site: http://lists.freepascal.org/mailman/listinfo/fpc-pascal
> there's only information about subscribing.

You have to go to the bottom of that pagen, enter your email address,
click on "edit options" and then you can unsubscribe. It's
counterintuitive, I know :/


Jonas


___
fpc-pascal maillist  -  [EMAIL PROTECTED]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


[fpc-pascal]Runtime Error Source References

2003-08-22 Thread Mark Emerson
With all this discussion of using GDB (and the associated hassles) to
get runtime error source references, I fondly remember my Turbo Pascal
days, and the AMAZED delight the first time (about 1982) I encountered a
runtime error and there was a choice to press "E" and be taken into the
editor to the place in the source where the error occurred.  And it
WORKED!!  

Are there any plans to implement the capability for an FPC program to
output (via the exception system) not only the runtime error number, but
also the source file name, line number and character number?  Indeed, I
would like to be able to capture this info and write it to a log file
for QA purposes.

I respectfully request that it be considered.  Thanks.

Mark

___
fpc-pascal maillist  -  [EMAIL PROTECTED]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal