From owner-svn-src-head@freebsd.org Fri Nov 1 19:26:41 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 790E017F5C6; Fri, 1 Nov 2019 19:26:41 +0000 (UTC) (envelope-from luporl@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 474XHj2c1fz4f7W; Fri, 1 Nov 2019 19:26:41 +0000 (UTC) (envelope-from luporl@freebsd.org) Received: from mail-io1-f52.google.com (mail-io1-f52.google.com [209.85.166.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) (Authenticated sender: luporl/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 2B941578; Fri, 1 Nov 2019 19:26:41 +0000 (UTC) (envelope-from luporl@freebsd.org) Received: by mail-io1-f52.google.com with SMTP id h9so12097370ioh.2; Fri, 01 Nov 2019 12:26:41 -0700 (PDT) X-Gm-Message-State: APjAAAUHqizQAgVjWYu9/Qj1XgVXj1C/IxY4j9LPybtPLq+iiVsmdwEn ZYCiFSQPhtEQn1Lthkce1owOmemqcnG8n8dOkPU= X-Google-Smtp-Source: APXvYqzUX6uuudz29RZn6FfALkQ0AJ7dzOlrRI4iZS61bxrIs6/kjwwgBRpjBHltwr2O6ZrTWy2egn5IWk4v7KRo2Nw= X-Received: by 2002:a6b:908a:: with SMTP id s132mr12226883iod.118.1572636400421; Fri, 01 Nov 2019 12:26:40 -0700 (PDT) MIME-Version: 1.0 References: <201911011128.xA1BShOC057227@repo.freebsd.org> In-Reply-To: From: luporl Date: Fri, 1 Nov 2019 16:26:29 -0300 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r354239 - head/contrib/gdb/gdb To: John Baldwin Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Nov 2019 19:26:41 -0000 Well, after evaluating remote kernel debugging through serial port, on amd64, I've run into several issues while using latest ports gdb/kgdb. I don't remember all of them, but were things like step/next not always working, connection being lost, and similar things. OTOH, /usr/libexec/kgdb worked fine and reliably, although older and more limited. This is probably due to some incompatibility in GDB Remote Serial Protocol, between the kernel backend and newer GDB from ports. So, that's why I chose to use /usr/libexec/kgdb while fixing/enabling remote debugging on PPC64, because it works reasonably well, and I could focus on testing/fixing other parts first. With only this change on gdb, it is now possible to use it to test some basic functionality, like remote debugger attach, backtrace and data inspection. My goal is not to fix every issue in /usr/libexec/kgdb, but just to get the basics working, to then move on and switch to ports' GDB. - Leandro On Fri, Nov 1, 2019 at 1:06 PM John Baldwin wrote: > On 11/1/19 4:28 AM, Leandro Lupori wrote: > > Author: luporl > > Date: Fri Nov 1 11:28:43 2019 > > New Revision: 354239 > > URL: https://svnweb.freebsd.org/changeset/base/354239 > > > > Log: > > [PPC64] Fix GDB sigtramp detection > > > > Current implementation of ppcfbsd_pc_in_sigtramp() seems to take only > 32-bit > > PowerPC in account, as on 64-bit PowerPC most kernel instruction > addresses will > > be wrongly reported as in sigtramp. > > > > This change adds proper sigtramp detection for PPC64. > > It's probably not worth fixing this in /usr/bin/gdb? At this point gdb is > only > installed for the kgdb in /usr/libexec on all platforms but sparc64 to > serve as > a fall-back for the crashinfo script in case the ports gdb isn't > installed. The > ports gdb should handle signal trampolines fine on ppc. It uses > instruction > matching patterns to detect trampolines on all supported platforms instead > of > static sigtramp locations. > > -- > John Baldwin >