From nobody Thu May 25 20:27:26 2023 X-Original-To: freebsd-hackers@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 4QS03R1JQkz4Wg8J for ; Thu, 25 May 2023 20:27:31 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-qt1-x831.google.com (mail-qt1-x831.google.com [IPv6:2607:f8b0:4864:20::831]) (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-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QS03Q5dvvz4LRL for ; Thu, 25 May 2023 20:27:30 +0000 (UTC) (envelope-from markjdb@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-qt1-x831.google.com with SMTP id d75a77b69052e-3f6c6020cfbso8095501cf.2 for ; Thu, 25 May 2023 13:27:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1685046449; x=1687638449; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:from:to:cc:subject:date:message-id :reply-to; bh=oT2IArNMLzo9RrAqGpVRyDNaUY37FC3c/vnWvJHuUCI=; b=e7rY5JaWur4Ro6hqRpj1h1moLQfZav/jphIQG39Tm4PV8sURO511CoHuDNSgGnFwSG ATUrp1cgcytXMaNG4KM+a6Q/E82WnLiXCdXg7xza96yAjxORB942uv1VCB2S1c2hBYpL zoqcoJCgA0cUejMWlwMWQu1Knb/CapIiWX9SXE5WqXctJ9ueFqQ4BjrfwFBTXP6Wb0O1 MH/4nt4ve2to4Z0rJ7PagVIhK9eqod6FmVEAxqDNE3sM/bQM/HyUvptdK2E7s1vRbJRw QJwx3oI0IY45/1xcWRMR4r3bJeXquCIwYwXyvZ6LWTWxaP+DUbdnhhOBcewhU46Q8SkX CtHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685046449; x=1687638449; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=oT2IArNMLzo9RrAqGpVRyDNaUY37FC3c/vnWvJHuUCI=; b=LVj1gl/x+ADRGlUK5qiSdDblqn0BboJSL8xj49AEm2ptRgcpLwY5UqBQqhOJ6gwgwM rFZAGxFyrZpRJgM/2/q9oAQ1A+0D+JHEIbixL/RlVgR382lM4IJhpEmLzlEg7r9fD+wx S2dMDmJ1bsPM56ESvLdkmU5JD/9UXEQmJZwn2D0hcC74IBti4u0KuZHyJfPEoIXJfDIm T/bp4TtP5Lygn/3lHoVnNCku4YYrUJXQXCxGY25lFqHF4DQjag6CSU4oVq+FOBjfsVrJ nShou8Fc4FoGp6LjjtE3HEwDwMmLUuegIcD17KazCKJ3M98Wj8XPBwgy9YgjxeS919em c5NQ== X-Gm-Message-State: AC+VfDypMXZMTYj62DGFFQpjMSLlJw0TvguiuthgcJjv2LPEC/4dZ4Oo J4dcZBVWPE+Vek5TreytPQ8gFl1pwv0= X-Google-Smtp-Source: ACHHUZ7/LDnWCvFnk64RUMk1ZOLGIplWA43hfNwo7L6pgln55Bmx5gmWXb6yKNc20cbNJ12X8O02Jg== X-Received: by 2002:ac8:7d82:0:b0:3f2:421:4de5 with SMTP id c2-20020ac87d82000000b003f204214de5mr1075027qtd.26.1685046449051; Thu, 25 May 2023 13:27:29 -0700 (PDT) Received: from nuc (192-0-220-237.cpe.teksavvy.com. [192.0.220.237]) by smtp.gmail.com with ESMTPSA id e13-20020ac8490d000000b003f7369c7302sm679323qtq.89.2023.05.25.13.27.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 May 2023 13:27:28 -0700 (PDT) Date: Thu, 25 May 2023 16:27:26 -0400 From: Mark Johnston To: Naman Sood Cc: freebsd-hackers@freebsd.org Subject: Re: APIC interrupting me while stepping through a kernel with kgdb Message-ID: References: List-Id: Technical discussions relating to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-hackers List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Queue-Id: 4QS03Q5dvvz4LRL X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On Thu, May 25, 2023 at 03:34:56PM -0400, Naman Sood wrote: > Hello! > > I've been following this guide[1] to get kgdb to debug a FreeBSD guest > on bhyve - I have a WIP patch for pfsync that I want to debug. I'm at > the point where I can set breakpoints in if_pfsync.c and get them to > break when I hit them. However, when I step/next from there, control > always goes to the lapic_handle_timer(), which does its APIC timer > things, returns control to the line where I set the breakpoint... and > then immediately goes to the timer again, since presumably a timer > tick has happened between me pressing Return repeatedly. > > Is there a way to get around this? Either turn off the timer (doesn't > sound like a good idea?) or get kgdb to ignore it so I can debug the > rest of the kernel? Running skip at the timer code didn't seem to > help. Which revision of FreeBSD are you running? I believe this recent commit will address the problem you're describing, but you won't have it unless you're running the main branch: https://cgit.freebsd.org/src/commit/?id=fefac543590d