From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id AE8903858D37 for ; Mon, 10 Oct 2022 07:54:06 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org AE8903858D37 Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-3-a6BiOyJeNLefl-n6_6RBDQ-1; Mon, 10 Oct 2022 03:54:04 -0400 X-MC-Unique: a6BiOyJeNLefl-n6_6RBDQ-1 Received: by mail-wm1-f70.google.com with SMTP id fc12-20020a05600c524c00b003b5054c70d3so6640244wmb.5 for ; Mon, 10 Oct 2022 00:54:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=68ahR0XvU3Ou/VrDzlntVG94+e9zedPcVVxqmIhr1ik=; b=bojaaov4wdwuBGWIVcFBEkXuUeWgwAu7UWCvWaquzmmqFD67PGpnz7+hElwQlPFXDR 3ywTigFP0NmDUtPoMaRra2scSnZNMjhuulFgpCndhXKKKsLcBt5wlxR2ScqhxfX7GVuL c/TCMJvz1vMDcqTIt7om+jDZ98ArnKQZkN0K7fZwoLLk40dby5krrPWKRQtjPZ/EmczK /2lErW9qrqXdrKuZ5maUeVXIcHbQPR5iSO2cmXSktkIMON+9oTf4n4pa8KiObNm8ngjP D0knJC5gNKHBg+uzZA0zkojyFAHvbhwyh7JrVrdeL8JQxiS6GNM8dxX+zv8K9Y0FhdSS BBqg== X-Gm-Message-State: ACrzQf1qiZBvaGhrGcxIbkb7dEQzGptY1bjjLuqM65hc4mogZ8OOOBFC okWEmE44oL1IA4h5Pq1uBJDFb/J/pgBLIuS/AVvwRinsVRGODIPkEnHJOv08FsK7rrx5+BYAham RRK9od+AEsgvtCVRYYNtXAA== X-Received: by 2002:adf:e889:0:b0:22e:fb16:cc61 with SMTP id d9-20020adfe889000000b0022efb16cc61mr8496053wrm.53.1665388443537; Mon, 10 Oct 2022 00:54:03 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5wqO4SoAiNaK0UDZbWvxF7nLQxiohKep5udj9FXTlU0pKQNQLHwQlWJxXP/+D8ByvPxw2l6g== X-Received: by 2002:adf:e889:0:b0:22e:fb16:cc61 with SMTP id d9-20020adfe889000000b0022efb16cc61mr8496046wrm.53.1665388443304; Mon, 10 Oct 2022 00:54:03 -0700 (PDT) Received: from [10.43.2.105] (nat-pool-brq-t.redhat.com. [213.175.37.10]) by smtp.gmail.com with ESMTPSA id l19-20020a05600c089300b003c5571c27a1sm5919102wmp.32.2022.10.10.00.54.02 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 10 Oct 2022 00:54:02 -0700 (PDT) Message-ID: <8844735c-672c-fa3a-49fc-ea0a4f803107@redhat.com> Date: Mon, 10 Oct 2022 09:54:02 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.3.1 Subject: Re: [PATCH v4 5/5] gdb/frame: Add reinflation method for frame_info_ptr To: Tom Tromey , Bruno Larsen via Gdb-patches References: <20220830100837.926692-1-blarsen@redhat.com> <20220830100837.926692-6-blarsen@redhat.com> <87wn9bsa0y.fsf@tromey.com> From: Bruno Larsen In-Reply-To: <87wn9bsa0y.fsf@tromey.com> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-13.5 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Oct 2022 07:54:08 -0000 On 07/10/2022 21:34, Tom Tromey wrote: >>>>>> "Bruno" == Bruno Larsen via Gdb-patches writes: > ... > > Bruno> diff --git a/gdb/infcmd.c b/gdb/infcmd.c > Bruno> index d292a0e55bf..bc171d8818a 100644 > Bruno> --- a/gdb/infcmd.c > Bruno> +++ b/gdb/infcmd.c > Bruno> @@ -1814,6 +1814,7 @@ finish_command (const char *arg, int from_tty) > Bruno> frame = get_prev_frame (get_selected_frame (_("No selected frame."))); > Bruno> if (frame == 0) > Bruno> error (_("\"finish\" not meaningful in the outermost frame.")); > Bruno> + frame.prepare_reinflate (); > > Bruno> clear_proceed_status (0); > > Bruno> @@ -1872,6 +1873,7 @@ finish_command (const char *arg, int from_tty) > > Bruno> print_stack_frame (get_selected_frame (NULL), 1, LOCATION, 0); > Bruno> } > Bruno> + frame.reinflate (); > > I'm curious about this change. Did you add this to avoid a crash? > I.e., it's a latent bug of some kind? This is one of the triggers for bug python/28856 (https://sourceware.org/bugzilla/show_bug.cgi?id=28856), but a quick recap: If one of the arguments of the function has a pretty printer that calls a function from the inferior, frame becomes stale and finish breaks. That bug was the original reason I started this series, lol. Cheers, Bruno > > Bruno> if (execution_direction == EXEC_REVERSE) > Bruno> finish_backward (sm); > Bruno> diff --git a/gdb/mi/mi-cmd-stack.c b/gdb/mi/mi-cmd-stack.c > Bruno> index f23559f886c..2c5bd2db96d 100644 > Bruno> --- a/gdb/mi/mi-cmd-stack.c > Bruno> +++ b/gdb/mi/mi-cmd-stack.c > Bruno> @@ -39,6 +39,7 @@ > Bruno> #include "inferior.h" > Bruno> #include "observable.h" > > Bruno> + > Bruno> enum what_to_list { locals, arguments, all }; > > Spurious change. > > Tom >