From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2422 invoked by alias); 18 Oct 2018 09:50:46 -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 2408 invoked by uid 89); 18 Oct 2018 09:50:45 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-11.9 required=5.0 tests=BAYES_00,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 spammy=(unknown), spu-tdep.c, sk:call_fu, UD:spu-tdep.c X-HELO: EUR04-VI1-obe.outbound.protection.outlook.com Received: from mail-eopbgr80049.outbound.protection.outlook.com (HELO EUR04-VI1-obe.outbound.protection.outlook.com) (40.107.8.49) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 18 Oct 2018 09:50:43 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector1-arm-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=zkaPMEnFQ18r8bXUEjg17+20ZLxQU0MkUfKu4mcZSgg=; b=fZFQneOXF6cKK0JRSJvwgBoHlePJYj/wbI99Vah/NZZTM/DcKvsTzyUGQWppeLy8IDMhjaYmbwhqHb+hJXtQDg8LPfJ4sZu8kotOt3gt++M/wB2aQAVGHVXR29c5aePfaJWfz8BXgEhgdjm+FsquQBlYdhkcGaSg7+37a6PYI+o= Received: from DB6PR0802MB2133.eurprd08.prod.outlook.com (10.172.226.148) by DB6PR0802MB2566.eurprd08.prod.outlook.com (10.172.252.7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1228.25; Thu, 18 Oct 2018 09:50:41 +0000 Received: from DB6PR0802MB2133.eurprd08.prod.outlook.com ([fe80::748a:5f72:2321:bc11]) by DB6PR0802MB2133.eurprd08.prod.outlook.com ([fe80::748a:5f72:2321:bc11%6]) with mapi id 15.20.1228.033; Thu, 18 Oct 2018 09:50:41 +0000 From: Alan Hayward To: GDB Patches CC: nd Subject: [PING][PATCH v3 0/3] Aarch64: Fix segfault when casting dummy calls Date: Thu, 18 Oct 2018 09:50:00 -0000 Message-ID: References: <20181011144905.66908-1-alan.hayward@arm.com> In-Reply-To: <20181011144905.66908-1-alan.hayward@arm.com> received-spf: None (protection.outlook.com: arm.com does not designate permitted sender hosts) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alan.Hayward@arm.com; Content-Type: text/plain; charset="us-ascii" Content-ID: <35605C8607446941B88345460126E6DB@eurprd08.prod.outlook.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-IsSubscribed: yes X-SW-Source: 2018-10/txt/msg00391.txt.bz2 Ping. > On 11 Oct 2018, at 15:49, Alan Hayward wrote: >=20 > Aarch64: Fix segfault when casting dummy calls >=20 > Following Pedro's review I've squashed the new int param into a new enum > and rewritten the test. >=20 > Prevent the int cast in the following causing a segfault on aarch64: > (gdb) b foo if (int)strcmp(name,"abc") =3D=3D 0 > (gdb) run >=20 > The fix is to remove a bunch of code from aarch64_push_dummy_call, > instead passing down the information from the caller. >=20 > Patch 1 removes two ints from call_function_by_hand_dummy, replacing > them with an enum. > Patch 2 passes that enum down to _push_dummy_call. > Patch 3 makes use of the enum in aarch64_push_dummy_call and adds a > test case. >=20 > Tested with make check on aarch64 and build with all targets on x86. > Patch 2 needs a careful scan to make sure it doesn't break any other > targets. >=20 >=20 > Alan Hayward (3): > Use enum for return method for dummy calls > Pass return_method to _push_dummy_call > Aarch64: Fix segfault when casting dummy calls >=20 > gdb/aarch64-tdep.c | 35 +---- > gdb/alpha-tdep.c | 7 +- > gdb/amd64-tdep.c | 13 +- > gdb/amd64-windows-tdep.c | 12 +- > gdb/arc-tdep.c | 5 +- > gdb/arm-tdep.c | 5 +- > gdb/avr-tdep.c | 5 +- > gdb/bfin-tdep.c | 4 +- > gdb/cris-tdep.c | 9 +- > gdb/csky-tdep.c | 5 +- > gdb/frv-tdep.c | 5 +- > gdb/gdbarch.c | 4 +- > gdb/gdbarch.h | 21 ++- > gdb/gdbarch.sh | 19 ++- > gdb/h8300-tdep.c | 5 +- > gdb/hppa-tdep.c | 10 +- > gdb/i386-darwin-tdep.c | 5 +- > gdb/i386-tdep.c | 5 +- > gdb/ia64-tdep.c | 11 +- > gdb/infcall.c | 28 ++-- > gdb/iq2000-tdep.c | 8 +- > gdb/lm32-tdep.c | 5 +- > gdb/m32c-tdep.c | 5 +- > gdb/m32r-tdep.c | 5 +- > gdb/m68hc11-tdep.c | 9 +- > gdb/m68k-tdep.c | 5 +- > gdb/mep-tdep.c | 4 +- > gdb/mips-tdep.c | 19 +-- > gdb/mn10300-tdep.c | 6 +- > gdb/msp430-tdep.c | 5 +- > gdb/nds32-tdep.c | 5 +- > gdb/nios2-tdep.c | 5 +- > gdb/or1k-tdep.c | 5 +- > gdb/ppc-sysv-tdep.c | 10 +- > gdb/ppc-tdep.h | 25 ++-- > gdb/riscv-tdep.c | 8 +- > gdb/rl78-tdep.c | 5 +- > gdb/rs6000-aix-tdep.c | 5 +- > gdb/rs6000-lynx178-tdep.c | 5 +- > gdb/rx-tdep.c | 8 +- > gdb/s390-tdep.c | 7 +- > gdb/score-tdep.c | 5 +- > gdb/sh-tdep.c | 9 +- > gdb/sparc-tdep.c | 15 +- > gdb/sparc64-tdep.c | 14 +- > gdb/spu-tdep.c | 5 +- > gdb/testsuite/gdb.base/condbreak-solib-lib.cc | 22 +++ > .../gdb.base/condbreak-solib-main.cc | 39 +++++ > gdb/testsuite/gdb.base/condbreak-solib.exp | 136 ++++++++++++++++++ > gdb/tic6x-tdep.c | 5 +- > gdb/tilegx-tdep.c | 4 +- > gdb/v850-tdep.c | 4 +- > gdb/vax-tdep.c | 5 +- > gdb/xstormy16-tdep.c | 5 +- > gdb/xtensa-tdep.c | 10 +- > 55 files changed, 444 insertions(+), 206 deletions(-) > create mode 100644 gdb/testsuite/gdb.base/condbreak-solib-lib.cc > create mode 100644 gdb/testsuite/gdb.base/condbreak-solib-main.cc > create mode 100644 gdb/testsuite/gdb.base/condbreak-solib.exp >=20 > --=20 > 2.17.1 (Apple Git-112) >=20