From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-x335.google.com (mail-wm1-x335.google.com [IPv6:2a00:1450:4864:20::335]) by sourceware.org (Postfix) with ESMTPS id 71D4E3857C6A for ; Tue, 14 Jul 2020 23:02:44 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 71D4E3857C6A Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=embecosm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=andrew.burgess@embecosm.com Received: by mail-wm1-x335.google.com with SMTP id f18so1552480wml.3 for ; Tue, 14 Jul 2020 16:02:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embecosm.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=p1C4jXeVeQKCbsgVqDNBnuyhbNMvxrJQO11DEOqu2v4=; b=dIn5zDGbcEbO2FkPgW6P8lcV23tpHtqSl54HVAoFLIrj5ZP/SDVgs1A1diARzh3wWs MbloZKnH0FofqHi9eQSQlxnYx0Hgbrb66Rxvh3i9wqDx4f63huNKgRlBpQf+6KZXD/IL w5E02DRZeXQnLYHLudF0T3Y8v54BSqXSBkIwAgwAhI+s/mRkW8LT05t25o9W2mNmov0w Pzzcp5o0FUdCMZtvOYxpWhpg8WutmiIjKr5LapgzD+fk0cGleH4qBpnkEhNQGEXeSc/T L1GtLg41u1Q79RSMyWYl56DftoluURGjJ3+/NeQ2wHzxgsX+hDrorVvO2cqo7t2bwkhr QrBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=p1C4jXeVeQKCbsgVqDNBnuyhbNMvxrJQO11DEOqu2v4=; b=F5hY2aSj2D/yI7nv81FpsWIvixpMROIACYXqWj/ntiP17MHXJiolb8TBT0DUxX/gfy C023WSrMr9/7Dh9zlC+HIKzhlE94hzq0aqVXC3aICRD6nLBoawF3ncpkcKczTFD0SewA vZlLmq6cHNHHQA/ksjAvR/NlFO5hZCXLR/vy3UC6hvOJyrUzFhEv0yRm0SLod4lSh9Q+ WsswuDf2L0m6iRtmGvys82jCgqxFEWqJ4zm1P3BZGbPdV9FNcqK+tWnUHwRPCtUuzbw5 oamnW6ko2ofWJXMFZzhz2PgZabxwt6iWV489B7Eck+sYcyNv65EVqxON2g67338Fy7Ae hCpg== X-Gm-Message-State: AOAM532jgzFT7WXUPG6ZUhb11qCDn2thvT+4kDnrrSYby8RrfvDIFcfG GdRWM/VoSJEQzFZ+DL6EkwjdLlOIug4= X-Google-Smtp-Source: ABdhPJzfeXVqYy0A7RmCugLwFb35IdpZ1rmAgcj5EYOmOCs/Qamc/m4VBii78g4OOL/Ql5V+L7rsrw== X-Received: by 2002:a1c:2e57:: with SMTP id u84mr5571626wmu.52.1594753132547; Tue, 14 Jul 2020 11:58:52 -0700 (PDT) Received: from localhost (host86-128-12-23.range86-128.btcentralplus.com. [86.128.12.23]) by smtp.gmail.com with ESMTPSA id k4sm8738139wrp.86.2020.07.14.11.58.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Jul 2020 11:58:51 -0700 (PDT) Date: Tue, 14 Jul 2020 19:58:50 +0100 From: Andrew Burgess To: Hafiz Abid Qadeer Cc: gdb@sourceware.org Subject: Re: MI and SIGINT Message-ID: <20200714185850.GI3463@embecosm.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Operating-System: Linux/5.6.15-200.fc31.x86_64 (x86_64) X-Uptime: 19:56:28 up 36 days, 9:03, X-Editor: GNU Emacs [ http://www.gnu.org/software/emacs ] X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jul 2020 23:02:46 -0000 * Hafiz Abid Qadeer [2020-07-14 12:03:11 +0100]: > Hi All, > We have observed that a SIGINT send by an IDE can cause GDB to not print > MI stopped messages. Although this is very difficult to reproduce by > hand but the sequence look something like this. > > 1. You do continue and GDB hits a breakpoint and starts calling the > observers. > 2. One of the observer will call into python sniffers. > 3. If during that time, a SIGINT has arrived, it will cause python to > throw exception which will cause GDB to abandon printing the stopped > message. I don't have time to test this right now, but if your diagnosis is correct then this should be easy to test. Write a sniffer that sends itself a SIGINT and check you see the problem. This should make it possible to create a reliable test case. Thanks, Andrew > > It is not a big problem in cli mode but can leave IDE in bit of limbo. I > was wondering if this is intended behavior with the SIGINT and MI. > > The call stack of the exception looks like this: > > #3 0x0000555555857ff1 in throw_quit > #4 0x00005555559b9bdb in gdbpy_print_stack_or_quit > #5 0x00005555559aa57f in pyuw_sniffer > #6 0x0000555555838a23 in frame_unwind_try_unwinder > #7 0x0000555555838b90 in frame_unwind_find_by_frame > #8 0x000055555583e7ad in get_frame_type > #9 0x0000555555a445e7 in print_frame_info > #10 0x0000555555a42a9f in print_stack_frame > #11 0x00005555558b4ebe in print_stop_location > #12 0x00005555558b4f4b in print_stop_event > #13 0x000055555591ab17 in mi_on_normal_stop_1 > #14 0x000055555591ad34 in mi_on_normal_stop > #15 0x0000555555618517 in std::_Function_handler void (*)(bpstats*, int)>::_M_invoke(std::_Any_data const&, bpstats*&&, > int&&) > #16 0x00005555558b9d82 in std::function int)>::operator()(bpstats*, int) const > #17 0x00005555558b93db in gdb::observers::observable::notify > #18 0x00005555558b5832 in normal_stop > > Regards, > -- > Hafiz Abid Qadeer > Mentor Embedded/CodeSourcery