From nobody Wed Nov 15 15:57:35 2023 X-Original-To: freebsd-current@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 4SVnqj2r6Pz50Rg8; Wed, 15 Nov 2023 15:57:37 +0000 (UTC) (envelope-from jhb@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4SVnqj2JS9z3TNt; Wed, 15 Nov 2023 15:57:37 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700063857; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=9bVWED4ZEd0X14ls1AIhVMMhDtdXCH4+40nJD6M151A=; b=ooh7WGv2hn5UOm5RJp06jPpgS9Yr2R6wti36ehd8vi3skzQd7EMTSQVUXbqfgLo4kj/FrX +8Ar0etjNgFSDrhKLsqVhNUlHjctkkl7zMqzV9VLNryvzfg6PEmZBVH6IBUV+IydJ/lIzg X14YHk27UEb75zePy9XXiL5cMCIP1a0Clpx/k7zmjURD1DUtG2H146S51ozV4E8/2ugrRO GOEnu4RC0fESE7Do17m+nKwKVk19daSj1f1BYpW3JquIA/cfAWQMRmDclZrNaw9zTWBPNj WOt4AoB3XvdUlAiPJXRCh/DFqxAwSuC9T93QKKN7DpQsIc0A/ua/SYFNn1oHtQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700063857; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=9bVWED4ZEd0X14ls1AIhVMMhDtdXCH4+40nJD6M151A=; b=pxNhKW1v6RJmPA2upf+rJjctsRiu4G+MjlsnijltRgrZDQiTRjiQ5Xq/wwgAgpx6akmjiY 0JpAm9ULJ1WWVnEiBWzH80yCBqkBvL/N3jxI2EXZsFDoK9lXaAg/AbHumHOGbGelXH5rcg t19pO1x4h+ndRv5aK4ZpNoLI2TnCD8FyxHW7SHTZmMVNAKXstGXpq7k5EMa+e222pcQ9LX eh9KewREaUaU4MB0KbnH0EbcpBUQVz9U+wDOZmz+HBIsvUNmdyqIy+44kCN/kPoU7efvfx 9jbnFSELkrT2aYOxyVtF32r1lD15FhajzG4IPiNeoMZQJ04pbWy+IWRao2gEOQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700063857; a=rsa-sha256; cv=none; b=CG+gWrLgMwGdowaWjgwdEchQgHZwW2zgFh9wNyKUa+nYNXUZegC5hEc6H+R1654APLA7TG D5pty0/cfaz6QOqLQk+Y7oPxgYerV3dhTnZHsRTxr9SujLSrHqOizzvEbYWsS0WR5UvBhZ OqQmRr5r10nilUOh5uXQLE0y/I8cH170m6dJTPGhWOBRyBCsnGBiEqjv9go0h+eD15nCP0 b+2chUNJaLxu41QE3c8yhQwqVavpMtURVfaELhi1+mBQGhoqxj97M28AHvy2TRwv2lEvGa GkoX+1o63d28e3FQFeiGo3B/DtXQlUMgduN8ETiClDXdcoi3D9VONDljaDcBLQ== Received: from [IPV6:2601:648:8384:fd00:7c48:55a7:81e0:3a0a] (unknown [IPv6:2601:648:8384:fd00:7c48:55a7:81e0:3a0a]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 4SVnqh5snlz37M; Wed, 15 Nov 2023 15:57:36 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: Date: Wed, 15 Nov 2023 07:57:35 -0800 List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: bhyve -G Content-Language: en-US To: Bakul Shah , FreeBSD CURRENT Cc: virtualization@freebsd.org References: From: John Baldwin In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 10/9/23 5:21 PM, Bakul Shah wrote: > Any hints on how to use bhyve's -G option to debug a VM > kernel? I can connect to it from gdb with "target remote :" > & bhyve stops the VM initially but beyond that I am not sure. > Ideally this should work just like an in-circuit-emulator, not > requiring anything special in the VM or kernel itself. step only works on Intel CPUs currently (and is a bit fragile anyway due to interrupts firing while you try to step, but that happens for me in QEMU as well). Breakpoints should work fine. I tend to use 'until' to do stepping (basically stepping via temporary breakpoints) when debugging the kernel this way. -- John Baldwin