From owner-freebsd-hackers@freebsd.org Tue Apr 19 17:53:23 2016 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 55153B1526D; Tue, 19 Apr 2016 17:53:23 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-ob0-f194.google.com (mail-ob0-f194.google.com [209.85.214.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1EEA016C1; Tue, 19 Apr 2016 17:53:22 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-ob0-f194.google.com with SMTP id tz8so2445479obc.1; Tue, 19 Apr 2016 10:53:22 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :date:message-id:subject:from:to:cc; bh=lvw/CNlij/shp17eZKlavW7U8LHOhZ+aqpfX6rVg4fs=; b=ZmH1w1ije49MJRJ4xd37UsUIGu6jq8VCf08qBAP7nCBuWolhhm5Wk0bRadVVPyxwvb nRPBakwm4VZt+W1Mpz70VXRliFIm88KCiXDEniJ8Kysg263gBRqPl/LkjAtlqBrodXmI ABFmboGa1j6H73AKtGd9pFxxwJnn6xU7893FZlNcRr0L3itz+KvYj0uKYqwsX5wGxx7p BGd36rVa0jFayFZDMcBlaMVA4h01EtC3YS0WwjWXeKeIb24RFtfiaFirA6bjDtUeF4ar fQSEnzPcEBXIhy9EpNfy3ZSNZOSOQS2wfkb5uZCsxMxcMcFJSnCPskFyH4npdVf7nueY hWHA== X-Gm-Message-State: AOPr4FW2MmkJ35rb2Sfh5CSYOsqiId4Whvh/kG9xwtFqb2UAB6T03mONFGlwF2F7p9BpBA== X-Received: by 10.60.230.104 with SMTP id sx8mr1596880oec.61.1461080310154; Tue, 19 Apr 2016 08:38:30 -0700 (PDT) Received: from mail-oi0-f45.google.com (mail-oi0-f45.google.com. [209.85.218.45]) by smtp.gmail.com with ESMTPSA id dn8sm14101868oeb.15.2016.04.19.08.38.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 19 Apr 2016 08:38:29 -0700 (PDT) Received: by mail-oi0-f45.google.com with SMTP id r78so12840346oie.0; Tue, 19 Apr 2016 08:38:29 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.202.203.14 with SMTP id b14mr1525482oig.56.1461080309400; Tue, 19 Apr 2016 08:38:29 -0700 (PDT) Reply-To: cem@FreeBSD.org Received: by 10.157.22.215 with HTTP; Tue, 19 Apr 2016 08:38:29 -0700 (PDT) In-Reply-To: References: Date: Tue, 19 Apr 2016 08:38:29 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: Toggling between remote KGDB and local DDB within a debugging session From: Conrad Meyer To: Aijaz Baig Cc: FreeBSD Hackers , freebsd-stable@freebsd.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Apr 2016 17:53:23 -0000 On Tue, Apr 19, 2016 at 5:49 AM, Aijaz Baig wrote: > I would like to know if there is indeed a way to toggle between gdb > and ddb while debugging a remote kernel. I am already at the gdb (or > rather kgdb) prompt. From here how do I switch to local ddb on the > debugged machine?? Ctrl-c on the serial console. > When remote remote KGDB is listening and I force a > panic using 'sysctl debug.kdb.enter=1', it drops into remote KGDB. > However, when it is NOT listening on the serial port, the local system > just freezes Are you sure ddb just doesn't run on the serial port? > What I want, is to enter ddb on the local machine. Do some debugging > using it; drop to remote KGDB for things that are best done using > KGDB, then switch back to local DDB when I'm done. Yes. I regularly do this with ctrl-c (gdb->ddb) / "gdb" (ddb->gdb). Best, Conrad