[M3devel] I don't know what changed, or when, but thanks!

Rodney M. Bates rodney_bates at lcwb.coop
Mon Jul 8 20:20:05 CEST 2013



On 07/08/2013 11:30 AM, Hendrik Boom wrote:
> On Mon, Jul 08, 2013 at 10:36:29AM -0500, Rodney M. Bates wrote:
>> If you get m3gdb to realize this is modula-3 code, there will be a lot
>> more useful info in the backtrace, like parameter values.  Probably just
>> doing a 'frame 17', or any M3 frame will do it, or 'set lang Modula-3'.
>
> Yes, that would probably help.
>>
>> If you are using the head compiler and debugger, you will need very
>> recent ones (perhaps in the last month?), as changes in the code
>> generator created some regressions.  All that I have seen are now
>> fixed in the current head.
>
> Time to upgrade, then.
>
> Please understand, I was being genuinely happy, not complaining in a
> sarcastic way.

Yes, I read it that way, but I can sometimes get confused about that.

BTW, you can also catch exception that is later handled,  at the point
where it is raised, by setting (in advance) a breakpoint in a place like
Raise in the RTS.   You could get lots of false hits this way though,
if raise-handle of other exceptions is something that is happening routinely.

>
> Knowing just where I called into deep space was a huge time-saver.
>
> -- hendrik
>
>>
>> On 07/08/2013 08:45 AM, Hendrik Boom wrote:
>>> Years ago, when a Modula 3 program failed because I called an absent
>>> method, it was difficult findig where the error was.
>>>
>>> But yesterday, I just ran the program in m3gdb and got a backtrace
>>> after failure.
>>>
>>> Of course the backtrace was full of apparent gibberish, but right in
>>> the middle is said:
>>>
>>>      at ../src/runtime/common/RTException.m3:25
>>> #14 0xb6e3631c in Raise (act=Invalid C/C++ type code 30 in symbol
>>> table.
>>> ) at ../src/runtime/ex_frame/RTExFrame.m3:29
>>> #15 0xb6e30d1d in Fail (rte=Invalid C/C++ type code 23 in symbol table.
>>> ) at ../src/runtime/common/RTType.m3:850
>>> #16 0xb6e30c4e in UndefinedMethod (self=Invalid C/C++ type code 46 in
>>> symbol table.
>>> )
>>>      at ../src/runtime/common/RTType.m3:834
>>> #17 0x08063d45 in shift (new=Invalid C/C++ type code 26 in symbol
>>> table.
>>> ) at ../src/Parse.m3:115
>>> ---Type <return> to continue, or q <return> to quit---
>>> #18 0x08062fc4 in parse (input=Invalid C/C++ type code 26 in symbol
>>> table.
>>> ) at ../src/Parse.m3:354
>>> #19 0x08065be3 in Main (mode=Invalid C/C++ type code 39 in symbol
>>> table.
>>> ) at ../src/Main.m3:202
>>>
>>>
>>> So it was quite clear I had to look at ../src/Parse.m3:115, and it was
>>> obvious where I had left our a shift := shift line in an OVERRIDES
>>> list.
>>>
>>> -- hendrik
>>>
>>>
>>
>




More information about the M3devel mailing list