comp.lang.ada
 help / color / mirror / Atom feed
From: Simon Wright <simon@pushface.org>
Subject: rr (was: Re: Alternative for Gnat Studio)
Date: Tue, 02 Mar 2021 09:13:23 +0000	[thread overview]
Message-ID: <lyzgzlsyto.fsf_-_@pushface.org> (raw)
In-Reply-To: 3808e6ec-1a49-4514-84e7-f444d94cdb2cn@googlegroups.com

Emmanuel Briot <briot.emmanuel@gmail.com> writes:

> Do you know about the "catch exception" command ? gdb will
> automatically break when an exception is raised. There could be a lot
> of these, so you can also try the variant "catch exception unhandled".
> This doesn't always help to investigate what happened just before an
> exception, so we have also started using the "rr" tool, which
> basically executes your program and records everything at every step,
> so that you can replay it. There is a cost in performance of course,
> but not as big as one would expect.

It's a shame (but not surprising!) that this is Linux-only.

It'd probably really help with my current problem, where GCC 11.0.0 and
GNAT CE 2020 arm-eabi throw an ICE when compiling a generalised
iteration with my Cortex GNAT RTS (no problem compiling against an
AdaCore RTS). Building the compiler with debugging, OK-ish (CFLAGS='-g
-O0'). Finding the exact invocation of gcc, OK (gprbuild -v
--keep-temp-files). Calling that invocation and getting GDB to start
with the actual gnat1 call, OK (add -wrapper gdb,--args to the gcc
command). Setting a break on the place where the ICE is raised, OK (b
sem_ch8.adb:5490). But then you've got a lengthy traceback, at some
point in which the compiler was misled by something in my runtime to
construct something wrongly.

There are definitely runtime-related aspects to the analysis: f.e. in
Exp_Ch6.Add_Task_Actuals_To_Build_In_Place_Call, there's a line (:596
here)

      --  Use a dummy _master actual in case of No_Task_Hierarchy

      if Restriction_Active (No_Task_Hierarchy) then
         Actual := New_Occurrence_Of (RTE (RE_Library_Task_Level), Loc);

Someone familiar with the compiler internals, and how to explore them in
the debugger, would no doubt find what's wrong in a flash, but I doubt
that posting on the GCC Bugzilla would get a speedy response!

https://github.com/rr-debugger/rr

  reply	other threads:[~2021-03-02  9:13 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <602e608e$0$27680$e4fe514c@news.kpn.nl>
2021-02-19  3:17 ` Alternative for Gnat Studio Matt Borchers
2021-02-19  8:16   ` Luke A. Guest
2021-02-20 15:48   ` ldries46
2021-02-20 16:12     ` Chris Townley
2021-02-21 12:06       ` ldries46
2021-02-22  7:00         ` Roger Mc
2021-02-22 11:20           ` Simon Wright
2021-02-23  7:52             ` ldries46
2021-02-24  8:11           ` Vadim Godunko
2021-02-24 10:06             ` Roger Mc
2021-02-24 11:42               ` Vadim Godunko
2021-03-05  9:36         ` Jerry
2021-03-05 13:37           ` DrPi
2021-03-06 12:14             ` Jérôme Haguet
2021-03-06 15:22               ` DrPi
2021-02-25 12:43 ` ldries46
2021-02-25 14:48   ` Dennis Lee Bieber
2021-02-25 18:10   ` Simon Wright
2021-02-25 23:51   ` Stephen Leake
2021-02-26  7:56   ` Dmitry A. Kazakov
2021-02-28 22:54     ` Stephen Leake
2021-03-01 18:04       ` Ludovic Brenta
2021-03-02  5:11       ` John Perry
2021-03-02  8:04         ` Simon Wright
2021-03-02  8:08         ` Emmanuel Briot
2021-03-02  9:13           ` Simon Wright [this message]
2021-03-02  9:23             ` rr (was: Re: Alternative for Gnat Studio) Emmanuel Briot
2021-03-04 22:48               ` rr Simon Wright
2021-03-04 22:53             ` rr Simon Wright
2021-03-05  6:53               ` rr Emmanuel Briot
2021-03-03  3:31           ` Alternative for Gnat Studio John Perry
2021-03-05 12:58         ` ldries46
2021-03-05 13:24           ` J-P. Rosen
2021-03-06 19:21 ` Daniel Norte Moraes
2021-03-13 16:17 ` Jaime Tarrasa
2021-03-13 16:26   ` Egil H H
2021-03-13 17:40   ` Stephen Leake
2021-03-13 22:07   ` Simon Wright
2021-03-13 23:35     ` Roger Mc
2021-03-14  6:34       ` Jeffrey R. Carter
2021-03-14  8:47       ` Simon Wright
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox