From nobody Wed Sep 13 15:35:09 2023 X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Rm4Js3lG0z4sxND; Wed, 13 Sep 2023 15:35:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Rm4Js3L0kz3Q4y; Wed, 13 Sep 2023 15:35:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1694619309; 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; bh=3MFTqL/cL3a1NYPxuHbatGwQLB6WB1yFXNMCvL9yztM=; b=kNz+sYuzGxwSXZrqMicuEf79BTJ0lZ6zwR6FstBbO4dhFIyobwmi8HxlmITvMuBOJoRROK +WVYyInSbGNqT7WymXDRZ+ee2I0Nx8uxDIlUGJu/FQNs/KxP30s2GpGj5pzSQuILQHr/sl usmimjbbJxU8PnDkz74c7lac3ZTmRg2Ea0CccA5lM43nqBLfcnemb6xzBy2gXq/vu9mgxG fQxwrcAlEl82TbFpvqacJLZYvRa0oUIkQWGSSqleyl68AkG5ARGZnjFM52GuyhMouBylBo TE6g17J7W3HwuCIQpvmA24wljDHBXqDiC1QSKTMreBxaC5JO/iNLGq9qY2QujA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1694619309; a=rsa-sha256; cv=none; b=E75G74DjQHCOYJfwqDl1ezzIpfwMzr0LljqVPeZCUWVq8ClDCVfQepmJKDbS8tdEFrFo3f rFx8hu3MSADcjze22jb2eAXTYVfW1/n/cC2w1QEXRQ+U5EQttjmKuD6GNnhmg43zrXb22p Q/UdLhtZW0esGolGTdUG9W9TNTrf4klUv0nyCNVwaQsSv8KR6yO8fkQW7z6kr7qzaPVfeA n+ij1+hpIYCwTYwIaZEgOk/WjWe/IV8KKtEGShvE9TSgv3PdX76iXrJm6JKFNABP8qVmE6 dzXiAWvMhygePK6UfCUsDj7fRVkS1vgUA8cO9w2ghxbzaNFjhCiJtF2EFlaBqg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1694619309; 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; bh=3MFTqL/cL3a1NYPxuHbatGwQLB6WB1yFXNMCvL9yztM=; b=ypa8nhJY3X1tNc5diEKGAuCpQKiKNAFO3aHXiKe4KCkbgKKqNMLgk2aJwRto2KE1K1X3mX KTsf/bcdmgSAGIndNSdWyy5zA3oIh2nksRznEbpZ9dyEXQ1er80Mv3npE/jtrfHXeE706x D6A3sbYNLYGEdoQokoqn9BbLmMOVITBUsABlsEwl+yI1eDCN4LyRcanKl04cvRkd5DUwWG ORbe0Csb4kK9KKvsDYVARyRR8xLfMOWsyTmsR8tuwK8yAK+5/GY52fmIvfoRAoa3+6QUtS /AooxEzsbDwA0KaPCrmcUtPa2UNcIIoqTDR8PO0Vi4p0fy6nWxIyI1wiR8GUJw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rm4Js2RVbz56m; Wed, 13 Sep 2023 15:35:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38DFZ9wJ048187; Wed, 13 Sep 2023 15:35:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38DFZ9T2048184; Wed, 13 Sep 2023 15:35:09 GMT (envelope-from git) Date: Wed, 13 Sep 2023 15:35:09 GMT Message-Id: <202309131535.38DFZ9T2048184@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Kyle Evans Subject: git: a22f1db084fb - main - devel/gdb: kgdb: fix aarch64 trapframe handling List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a22f1db084fb50880a0df90f9a0f031a7fc34921 Auto-Submitted: auto-generated The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/ports/commit/?id=a22f1db084fb50880a0df90f9a0f031a7fc34921 commit a22f1db084fb50880a0df90f9a0f031a7fc34921 Author: Kyle Evans AuthorDate: 2023-09-13 15:34:07 +0000 Commit: Kyle Evans CommitDate: 2023-09-13 15:34:26 +0000 devel/gdb: kgdb: fix aarch64 trapframe handling regcache_map_entry_size() doesn't do the magic to convert size == 0 to register_size, so we must supply sizes for all registers if we're going to use it. This fixes handling of the trapframe so that we can actually unwind properly, where-as before we would end up with, e.g., #6 0xffff0000004b4860 in kdb_trap (type=60, code=0, tf=) at /usr/src/sys/kern/subr_kdb.c:790 #7 #8 #9 #10 #11 Reported by: Mark Millard Approved by: jhb (implicit, kgdb maintainer) MFH: 2023Q3 --- devel/gdb/Makefile | 2 +- devel/gdb/files/kgdb/aarch64-fbsd-kern.c | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/devel/gdb/Makefile b/devel/gdb/Makefile index 921a14b566de..f72743a1dfa8 100644 --- a/devel/gdb/Makefile +++ b/devel/gdb/Makefile @@ -1,6 +1,6 @@ PORTNAME= gdb DISTVERSION= 13.1 -PORTREVISION= 4 +PORTREVISION= 5 CATEGORIES= devel MASTER_SITES= GNU diff --git a/devel/gdb/files/kgdb/aarch64-fbsd-kern.c b/devel/gdb/files/kgdb/aarch64-fbsd-kern.c index 4d813c786b52..68b12130fa83 100644 --- a/devel/gdb/files/kgdb/aarch64-fbsd-kern.c +++ b/devel/gdb/files/kgdb/aarch64-fbsd-kern.c @@ -126,13 +126,13 @@ aarch64_fbsd_supply_pcb(struct regcache *regcache, CORE_ADDR pcb_addr) static const struct regcache_map_entry aarch64_fbsd_trapframe_map[] = { - { 1, AARCH64_SP_REGNUM, 0 }, - { 1, AARCH64_LR_REGNUM, 0 }, - { 1, AARCH64_PC_REGNUM, 0 }, - { 1, AARCH64_CPSR_REGNUM, 0 }, + { 1, AARCH64_SP_REGNUM, 8 }, + { 1, AARCH64_LR_REGNUM, 8 }, + { 1, AARCH64_PC_REGNUM, 8 }, + { 1, AARCH64_CPSR_REGNUM, 8 }, { 1, REGCACHE_MAP_SKIP, 8 }, /* esr */ { 1, REGCACHE_MAP_SKIP, 8 }, /* far */ - { 30, AARCH64_X0_REGNUM, 0 }, /* x0 ... x29 */ + { 30, AARCH64_X0_REGNUM, 8 }, /* x0 ... x29 */ { 0 }, }; @@ -141,12 +141,12 @@ static const struct regcache_map_entry aarch64_fbsd_trapframe_map[] = static const struct regcache_map_entry aarch64_fbsd13_trapframe_map[] = { - { 1, AARCH64_SP_REGNUM, 0 }, - { 1, AARCH64_LR_REGNUM, 0 }, - { 1, AARCH64_PC_REGNUM, 0 }, + { 1, AARCH64_SP_REGNUM, 8 }, + { 1, AARCH64_LR_REGNUM, 8 }, + { 1, AARCH64_PC_REGNUM, 8 }, { 1, AARCH64_CPSR_REGNUM, 4 }, { 1, REGCACHE_MAP_SKIP, 4 }, /* esr */ - { 30, AARCH64_X0_REGNUM, 0 }, /* x0 ... x29 */ + { 30, AARCH64_X0_REGNUM, 8 }, /* x0 ... x29 */ { 0 }, };