Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 19 Apr 2016 08:38:29 -0700
From:      Conrad Meyer <cem@FreeBSD.org>
To:        Aijaz Baig <aijazbaig1@gmail.com>
Cc:        FreeBSD Hackers <freebsd-hackers@freebsd.org>, freebsd-stable@freebsd.org
Subject:   Re: Toggling between remote KGDB and local DDB within a debugging session
Message-ID:  <CAG6CVpV_P2eCERSjQ3cwAMvNkuO8d919Td3DxkQJR1SGHSvLag@mail.gmail.com>
In-Reply-To: <CAHB2L%2Bde=Bxn4G2uEDdN%2BSPY=SREN9REGShV=gnRombjqStYzw@mail.gmail.com>
References:  <CAHB2L%2Bde=Bxn4G2uEDdN%2BSPY=SREN9REGShV=gnRombjqStYzw@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Apr 19, 2016 at 5:49 AM, Aijaz Baig <aijazbaig1@gmail.com> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAG6CVpV_P2eCERSjQ3cwAMvNkuO8d919Td3DxkQJR1SGHSvLag>