Message ID | 20241018102156.350310-1-klaus.gerlicher@intel.com |
---|---|
Headers |
Return-Path: <gdb-patches-bounces~patchwork=sourceware.org@sourceware.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 6AEDE3858C48 for <patchwork@sourceware.org>; Fri, 18 Oct 2024 10:23:06 +0000 (GMT) X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.13]) by sourceware.org (Postfix) with ESMTPS id A201E3858D20 for <gdb-patches@sourceware.org>; Fri, 18 Oct 2024 10:22:24 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A201E3858D20 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=intel.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org A201E3858D20 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=198.175.65.13 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1729246955; cv=none; b=sIkNi2A/kN5mKzJ+UD6XPfB6U96EjEw3tqZxP4JEW6A5mximJJir72+m3FD2qYtXbI4nOFFhQh2iy03T1JpjhAh0ABYZgrNJ6JDDuPN+jdNg6f2czecl323wZNGh2gcRJdYehQR/Fjoe43tHttXVKm7/AafvRfgPsN6RJAiGqQw= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1729246955; c=relaxed/simple; bh=zx7YC5GA2UPfpx+ISPysJGSyOyQngYlPAip5ykXNlI0=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=FFUjpwUe8Xs3/Php+dnCr38wkK0iCmrFQFilXs5kEXi8Nx2oh8X9WA83XRF/o2Iwa5HOcZiZRKblA2Md0cS883fVNNIMXj+fjz3ajQJj5bSFuj/zG2uEN9RX7PMcfrZpF92xaakj1aciE4fdC5SNwl+ivmNaIkwW0/ePdLLC6Lo= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1729246945; x=1760782945; h=from:to:subject:date:message-id:mime-version: content-transfer-encoding; bh=zx7YC5GA2UPfpx+ISPysJGSyOyQngYlPAip5ykXNlI0=; b=QqER863WHWh4PZYKoTHkmr0ZChYIkyYPge3+4FvIzG1NI3FR5Uj+tGho NpXnobSgMEdvZQx+AVAwgToP3ymt8ZI+EmknFjI8RoYsivePCNiTmLkzo 4pLQ3SyPrgzANxKnbZGObHWYkZw3Jpsk3p3I6KtJRu0+6DA52BptH76MW QVpIVT/yYgS/7RpSRkCrAst3pX5Jgl/x9e2Tj8245BUTjZl7vyie4FONm rlwhIECf+q5l+XCo2pbZIi6PELOe0VLvLU75ZVLFx7ww3EeI2Gg9wib+K I/MBIetmxRx0HhkeHekLvpmlgBh+mDhPauHPBUvLomSgo35IHjmtYZ2C6 g==; X-CSE-ConnectionGUID: vdy+9fXWRUud1C1lo6ypOQ== X-CSE-MsgGUID: sXJMjGT6R7KVCSt7n3jijQ== X-IronPort-AV: E=McAfee;i="6700,10204,11222"; a="39901515" X-IronPort-AV: E=Sophos;i="6.11,199,1725346800"; d="scan'208";a="39901515" Received: from fmviesa009.fm.intel.com ([10.60.135.149]) by orvoesa105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Oct 2024 03:22:24 -0700 X-CSE-ConnectionGUID: 4omriktZThiAqd6WsGxC5Q== X-CSE-MsgGUID: QR9MxZpfQfKr1jo4HM/AlA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.11,213,1725346800"; d="scan'208";a="78843285" Received: from dut1016pvc.igk.intel.com (HELO localhost) ([10.211.177.46]) by fmviesa009-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Oct 2024 03:22:22 -0700 From: Klaus Gerlicher <klaus.gerlicher@intel.com> To: gdb-patches@sourceware.org Subject: [PATCH 0/2] some amendments to rejecting inserting breakpoints between functions Date: Fri, 18 Oct 2024 10:21:54 +0000 Message-Id: <20241018102156.350310-1-klaus.gerlicher@intel.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, 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.30 Precedence: list List-Id: Gdb-patches mailing list <gdb-patches.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/gdb-patches>, <mailto:gdb-patches-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/gdb-patches/> List-Post: <mailto:gdb-patches@sourceware.org> List-Help: <mailto:gdb-patches-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/gdb-patches>, <mailto:gdb-patches-request@sourceware.org?subject=subscribe> Errors-To: gdb-patches-bounces~patchwork=sourceware.org@sourceware.org |
Series |
some amendments to rejecting inserting breakpoints between functions
|
|
Message
Klaus Gerlicher
Oct. 18, 2024, 10:21 a.m. UTC
From: "Gerlicher, Klaus" <klaus.gerlicher@intel.com>
Hi Simon, Andrew, all,
a while back Andrew and Simon added a very useful patch to restrict how
breakpoints are propagated.
Author: Andrew Burgess <aburgess@redhat.com>
Date: Wed May 1 10:47:47 2024 +0100
gdb: reject inserting breakpoints between functions
I'd like to add some additional patches on top of this I had previously proposed
to Simon. He asked me to supply them again after above patch has landed. So
I'll gladly follow this suggestion.
Patch 1 avoids setting multiple locations for the same PC. This can happen under
some circumstances described in the patch commit msg. It is only somewhat
related to patch 2 but patch 2 testcase builds on it, so it would make sense
to keep them together.
Patch 2 is what Simon had asked me to supply again. It's a bit of an esoteric
case and it is only encountered when source is laid out in a certain way but
source formatted to be very compact might hit this issue. Please refer to
the description in the commit msg as well as the comments in linespec.c.
Thanks
Klaus
Gerlicher, Klaus (2):
gdb, linespec: avoid multiple locations with same PC
gdb, linespec: reject inserting breakpoints for both entry and
prologue end PC
gdb/linespec.c | 47 +++++++++++++++++++--
gdb/testsuite/gdb.linespec/bad-slide.c | 41 ++++++++++++++++++
gdb/testsuite/gdb.linespec/bad-slide.exp | 54 ++++++++++++++++++++++++
gdb/testsuite/gdb.linespec/linespec.exp | 6 +++
gdb/testsuite/gdb.linespec/lspec.cc | 2 +
5 files changed, 147 insertions(+), 3 deletions(-)
create mode 100644 gdb/testsuite/gdb.linespec/bad-slide.c
create mode 100644 gdb/testsuite/gdb.linespec/bad-slide.exp