emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Native compilation on MPS branch


From: Gerd Möllmann
Subject: Re: Native compilation on MPS branch
Date: Thu, 25 Apr 2024 06:33:04 +0200
User-agent: Gnus/5.13 (Gnus v5.13)

Andrea Corallo <acorallo@gnu.org> writes:

> Gerd Möllmann <gerd.moellmann@gmail.com> writes:
>
>> Andrea Corallo <acorallo@gnu.org> writes:
>>
>>> Dumb question: are you usnug rr to debug this?
>>
>> Not dumb at all :-). Last time I looked, which is now 10s ago, Homebrew
>> still didn't offer rr. That's on arm, in case it matters.
>
> IME rr is invaluable for debugging GC bugs, one can do things like
> placing watch-points while doing reverse execution and discover
> immediately where something was modified the last time.  

Yeah, I agree. It's sort of the holy grail of debugging.

(I remember an effort to add reversible debugging to LLDB some years
ago, don't know what became of that. I should probably investigate that
a bit.)

> You did a very good job reaching this point of the development without
> rr.

Thanks. See - nobody really needs this new-fangled stuff that young
people are using. It's like with these tictac videos. No, I'm not
envious.

> Anyway I'll mention a trick I find extremely usefull to discover where
> something was modified last time before a certain event without rr, I
> apologize if you know it already but in case it might help some other
> reader :)
>
> 1 When we crash we set a watch point on the memory we see got
> unexpectedly modified
> 2 We set the ignore number of the watch-point to a very large number
> 3 We restart the execution of the program
> 4 When the program crashes again we can see how many time the watch point
> was actually ignored
> 5 We subtract 1 to this number and we set it again as the ignore number
> of the watch-point
> 6 We restart again and tada!! We are where that piece of memory was
> modified for the last time :)
>
> Hope this helps someone

Nice trick, thanks for sharing!



reply via email to

[Prev in Thread] Current Thread [Next in Thread]