Discussion:
RangeCheckError from RuntimeError
Jay Michael
2012-09-03 04:10:50 UTC
Permalink
My program was terminating with no runtime error message. When run in gdb, gdb told me it terminated with exit code 52 (I think octal).

I had a Range Check Error. In gdb, I see that _p_RangeCheckError calls _p_RuntimeError. Then, _p_RuntimeError has code that might call _p_RangeCheckError. I didn't trace further -- gdb suddenly becomes unable to single-step, says "Unable to set breakpoint number -37". (The specific number changes if I keep trying to single-step. It's always negative.)

I don't know how much better it would have been, but shouldn't _p_RuntimeError have been compiled with range checking suppressed?

(I've found source for RangeCheckError and RuntimeError. I can't find source for CString2String -- is it an intrinsic function? It seems to have been inline coded in RuntimeError.)
Peter
2012-09-03 11:02:28 UTC
Permalink
Post by Jay Michael
My program was terminating with no runtime error message. When run in gdb, gdb told me it terminated with exit code 52 (I think octal).
I had a Range Check Error. In gdb, I see that _p_RangeCheckError calls _p_RuntimeError. Then, _p_RuntimeError has code that might call _p_RangeCheckError. I didn't trace further -- gdb suddenly becomes unable to single-step, says "Unable to set breakpoint number -37". (The specific number changes if I keep trying to single-step. It's always negative.)
I don't know how much better it would have been, but shouldn't _p_RuntimeError have been compiled with range checking suppressed?
(I've found source for RangeCheckError and RuntimeError. I can't find source for CString2String -- is it an intrinsic function? It seems to have been inline coded in RuntimeError.)
_______________________________________________
Gpc mailing list
Gpc at gnu.de
https://www.g-n-u.de/mailman/listinfo/gpc
Mine is in gpc-bp.pas

function CString2String (Str: CString): TString;
begin
CString2String := StrPas (Str)
end;


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.g-n-u.de/pipermail/gpc/attachments/20120903/8f54b99d/attachment.htm>
Maurice Lombardi
2012-09-03 15:35:56 UTC
Permalink
Post by Peter
Post by Jay Michael
My program was terminating with no runtime error message. When run in gdb, gdb told me it terminated with exit code 52 (I think octal).
I had a Range Check Error. In gdb, I see that _p_RangeCheckError calls _p_RuntimeError. Then, _p_RuntimeError has code that might call _p_RangeCheckError. I didn't trace further -- gdb suddenly becomes unable to single-step, says "Unable to set breakpoint number -37". (The specific number changes if I keep trying to single-step. It's always negative.)
I don't know how much better it would have been, but shouldn't _p_RuntimeError have been compiled with range checking suppressed?
(I've found source for RangeCheckError and RuntimeError. I can't find source for CString2String -- is it an intrinsic function? It seems to have been inline coded in RuntimeError.)
_______________________________________________
Gpc mailing list
Gpc at gnu.de
https://www.g-n-u.de/mailman/listinfo/gpc
Mine is in gpc-bp.pas
function CString2String (Str: CString): TString;
begin
CString2String := StrPas (Str)
end;
No, Cstring2String is an intrinsic function in gpc.
See e.g. the test file fjf1001.pas: CString2String is understood without
any unit used.

gpc-bp.pas is an help unit to facilitate the gradual conversion of an
old BP program to a new gpc program. See the comment at the beginning of
the unit.

Maurice
--
Maurice Lombardi
Laboratoire Interdisciplinaire de Physique,
(ex Spectrometrie Physique)
Universite Joseph Fourier de Grenoble, BP87
38402 Saint Martin d'Heres Cedex FRANCE
Tel: 33 (0)4 76 51 47 51
Fax: 33 (0)4 76 63 54 95
mailto:Maurice.Lombardi at ujf-grenoble.fr
Loading...