From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 38860 invoked by alias); 26 Sep 2019 14:02:19 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 38851 invoked by uid 89); 26 Sep 2019 14:02:19 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham version=3.3.1 spammy=sk:handle_ X-HELO: us-smtp-1.mimecast.com Received: from us-smtp-delivery-1.mimecast.com (HELO us-smtp-1.mimecast.com) (207.211.31.120) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 26 Sep 2019 14:02:14 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1569506532; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=gAGnIJqSJ2GeSAtjqinQeDJMXyp1SVeIjWCatG8no1k=; b=TXxdIeKhPU9ba55bYJ/RyiHBRBt3Hj7dOCG0jWfA1sGt56JMR5G06DzcCebHszZQT8mWfP 7EVeZnnmb+T47ruvDM5cZqIEEHsgYbUq8znPm24b86VTgY6T8ketFmEy6jGNaJzRzO7TSH OKgKFeEDgFsrwWyvq9AQM92u97DUEqg= Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-359-ijEVRctCPeWIhVs2kE-mGg-1; Thu, 26 Sep 2019 10:02:05 -0400 Received: by mail-wr1-f72.google.com with SMTP id 32so981883wrk.15 for ; Thu, 26 Sep 2019 07:02:04 -0700 (PDT) Return-Path: Received: from ?IPv6:2001:8a0:f913:f700:56ee:75ff:fe8d:232b? ([2001:8a0:f913:f700:56ee:75ff:fe8d:232b]) by smtp.gmail.com with ESMTPSA id a6sm2759941wrr.85.2019.09.26.07.02.02 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 26 Sep 2019 07:02:03 -0700 (PDT) Subject: Re: [RFC 02/17] Move gdb-specific code out of start_event_loop To: Tom Tromey , gdb-patches@sourceware.org References: <20190224165153.5062-1-tom@tromey.com> <20190224165153.5062-3-tom@tromey.com> From: Pedro Alves Message-ID: <48b80aa4-6540-8f45-ede0-836b89ecc46f@redhat.com> Date: Thu, 26 Sep 2019 14:02:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: <20190224165153.5062-3-tom@tromey.com> X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-SW-Source: 2019-09/txt/msg00520.txt.bz2 On 2/24/19 4:51 PM, Tom Tromey wrote: > This moves some gdb-specific code out of start_event_loop, into a new > function that must be supplied by the event-loop client. >=20 > gdb/ChangeLog > 2019-02-24 Tom Tromey >=20 > * main.c (handle_event_loop_exception): New function. > * event-loop.c: Don't include event-top.h or observable.h. > (start_event_loop): Remove gdb-specific code. Call > handle_event_loop_exception. > * event-loop.h (handle_event_loop_exception): Declare. I think I'd rather move the whole start_event_loop to gdb. IIUC, gdbserver version wants to let the exception propagate, so it'd end up being a while (1) loop calling gdb_do_one_event. I think the result will be clearer with fewer callsbacks and no need for the shared ability to stop the event loop that is only used by gdbserver. Thanks, Pedro Alves