From patchwork Fri Jan 4 21:37:58 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrey Utkin X-Patchwork-Id: 30963 Received: (qmail 69022 invoked by alias); 4 Jan 2019 21:38:25 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 69003 invoked by uid 89); 4 Jan 2019 21:38:24 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy=UD:kind, recording, H*Ad:D*io, H*MI:3477 X-HELO: mail-wr1-f67.google.com Received: from mail-wr1-f67.google.com (HELO mail-wr1-f67.google.com) (209.85.221.67) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 04 Jan 2019 21:38:23 +0000 Received: by mail-wr1-f67.google.com with SMTP id p4so37753381wrt.7 for ; Fri, 04 Jan 2019 13:38:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=undo-io.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=nGW6aVOjoJ9dBIiCnnXHGhkKcr1/X1zLKf2rbqxoJU0=; b=MrXZM86ACauVY5+KBvb2cIY4Ky/WaTjEkHv8fpQgSc5L+K1mtDf5gT6HhMT+L+PWQK NN0ZU7IYgJdOZ7R6TMWtN4wUxdawb0iRNtaJwqi+p/I4huozql2jr1e0hlM5BxM5pK3k WlO2oUPjEyQPhu1Czodw2bxQorIqMiQg/Iy/wQCo6PMT2SIbqTBsSfRdCXEPU2SxwsiF cFFlGq+Ujj06AvuC/T15h7inP/MiH8EhK24nojg/1bRLw7kcdRjWu6q8dsnpiH3RdDjO lQr0aX1NlzmGq0NKBJvHw4nxnboRIhneaeB+9f7dr1g6i7mfb7IEeRgDnoB4G3ID2Pbk lqHw== Return-Path: Received: from undo-autkin.undoers.io ([109.159.206.110]) by smtp.gmail.com with ESMTPSA id w2sm12748773wrm.69.2019.01.04.13.38.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 04 Jan 2019 13:38:20 -0800 (PST) From: Andrey Utkin To: gdb-patches@sourceware.org Cc: Andrey Utkin Subject: [PATCH] Handle hitting a recording extent boundary as a normal trap-caused stop Date: Fri, 4 Jan 2019 21:37:58 +0000 Message-Id: <20190104213758.3477-1-autkin@undo.io> X-IsSubscribed: yes Because that's what it is. This enables reporting of a breakpoint hitting on the first replayable instruction when reverse-stepping to the beginning of recorded history. --- gdb/infrun.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/gdb/infrun.c b/gdb/infrun.c index 150288264f..a72f06129b 100644 --- a/gdb/infrun.c +++ b/gdb/infrun.c @@ -5212,11 +5212,12 @@ Cannot fill $_exitsignal with the correct signal number.\n")); ecs->event_thread->suspend.stop_pc = regcache_read_pc (get_thread_regcache (inferior_thread ())); - if (handle_stop_requested (ecs)) - return; - gdb::observers::no_history.notify (); - stop_waiting (ecs); + + // The end of history is always a stop after a stepping/running op + ecs->ws.kind = TARGET_WAITKIND_STOPPED; + ecs->ws.value.sig = GDB_SIGNAL_TRAP; + handle_signal_stop (ecs); return; } }