From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?utf-8?Q?Gerd_M=C3=B6llmann?= Newsgroups: gmane.emacs.devel Subject: Re: Native compilation on MPS branch Date: Thu, 25 Apr 2024 06:33:04 +0200 Message-ID: References: <86wmor6owq.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23921"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Eli Zaretskii , emacs-devel@gnu.org To: Andrea Corallo Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Apr 25 06:34:06 2024 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rzqoA-00063w-9y for ged-emacs-devel@m.gmane-mx.org; Thu, 25 Apr 2024 06:34:06 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rzqnI-0002In-4c; Thu, 25 Apr 2024 00:33:12 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rzqnF-0002If-O4 for emacs-devel@gnu.org; Thu, 25 Apr 2024 00:33:09 -0400 Original-Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rzqnE-0001bq-6D; Thu, 25 Apr 2024 00:33:09 -0400 Original-Received: by mail-wr1-x430.google.com with SMTP id ffacd0b85a97d-34b66f0500aso479234f8f.3; Wed, 24 Apr 2024 21:33:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1714019585; x=1714624385; darn=gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=l9U6mOfRaF7xILd8/pfivJN27VH/fG45kwqSKmjqNPw=; b=nRUvMMpJ4TGHN3QWUmC10mVkn2I9ZZiXDQCyw5N2J+G5YmtLdfyrzpZ3or3yW4d4ms 3W46KXowppX/GSFnKpMkgx1U2FzPR7e2h9033y6B+N0rGgXIxVLwvmmAERDEYzd/uqWg 5Dpx39tDdjk3NHpNbfmkBJN/JIQ2qrD5YtyHPPnH/3ZBER80oi5WTtbhMs22epJWHn/o +q/QEE5kcptmMcnrXxMIhDamsN2KE7xGCfZePInS8K8YCZbOORayqMV7kCOB+RAayazG qAvc9w/PSMh7tlwuEdsA0infay/wM9idaarIckdPpj5zyEnm/W8xMudmMR4ZYSYDu6Mp /G1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714019585; x=1714624385; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=l9U6mOfRaF7xILd8/pfivJN27VH/fG45kwqSKmjqNPw=; b=f3C4oKpYIl5cXwAtSK7x1HNZq0wR7SL2aMod7Uyle2uO9XQUcHJlYVh7ihVxLhamBf lSjz58Yh6J+AdpNRr1i2oP9Mu0+iXKTRj8YhWTXan3F6D6LS2DkBgAPrafcYzjFHYFXV UKh0ICRemaMsQHqJ1A96fiy1v9BGPqWY4nryO5rNbJsk2HnmY4adUxy3revL5Y1s1ucy 94mfXTv3R0oZzSHPxLI9QCzkY9+cAizb6zkCARPbNxbVVdhZzgmbQX0b5caO8mIFl2WB CzGl4Qgk4NGTsECr5NpURfn/meaEpdtn/m90qWtBPbE5X36PorqmPETUg1LbnNuGuVfG d7Fw== X-Forwarded-Encrypted: i=1; AJvYcCXAEdMtysDh1Hd+uYC6Q6eozwzpRZJvHbxutYcZ+/d6XjybT8btfncp5rOuHpe5U7VkmfSTQZg9JfVtHkRWqSiUMjCa X-Gm-Message-State: AOJu0Yw36TY+sQOWIhH8AwHXYymXF42ixzbvn0IZRloBQ/sXpn/8/CX/ bSmEvZTiVzAG9Xe4x2c7fxaQmG+FTZSKrEeTZPTKXaaGh/ZdEjJPVyzNlQ== X-Google-Smtp-Source: AGHT+IF+4VLaT+k+io86wil4X+MiD0uUIZTJg9fXf8vUMSN30SNP/BHzHiQVghfuxiWP5aAkVZxXOQ== X-Received: by 2002:a5d:4990:0:b0:343:70bc:4578 with SMTP id r16-20020a5d4990000000b0034370bc4578mr3267749wrq.70.1714019585373; Wed, 24 Apr 2024 21:33:05 -0700 (PDT) Original-Received: from pro2.fritz.box (p4fe3a1c7.dip0.t-ipconnect.de. [79.227.161.199]) by smtp.gmail.com with ESMTPSA id am19-20020a170906569300b00a55bce09954sm4088268ejc.34.2024.04.24.21.33.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Apr 2024 21:33:04 -0700 (PDT) In-Reply-To: (Andrea Corallo's message of "Wed, 24 Apr 2024 16:54:30 -0400") Received-SPF: pass client-ip=2a00:1450:4864:20::430; envelope-from=gerd.moellmann@gmail.com; helo=mail-wr1-x430.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:318052 Archived-At: Andrea Corallo writes: > Gerd M=C3=B6llmann writes: > >> Andrea Corallo 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.=20=20 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!