From nobody Thu May 25 19:34:56 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 4QRyv21nxmz4Wc5y for ; Thu, 25 May 2023 19:35:10 +0000 (UTC) (envelope-from naman@freebsdfoundation.org) Received: from mail-yw1-x1134.google.com (mail-yw1-x1134.google.com [IPv6:2607:f8b0:4864:20::1134]) (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 4QRyv10Bshz4BHk for ; Thu, 25 May 2023 19:35:09 +0000 (UTC) (envelope-from naman@freebsdfoundation.org) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=freebsdfoundation.org header.s=gfnp-20170908 header.b=N7OQERrE; spf=pass (mx1.freebsd.org: domain of naman@freebsdfoundation.org designates 2607:f8b0:4864:20::1134 as permitted sender) smtp.mailfrom=naman@freebsdfoundation.org; dmarc=none Received: by mail-yw1-x1134.google.com with SMTP id 00721157ae682-561b7729a12so13942117b3.1 for ; Thu, 25 May 2023 12:35:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsdfoundation.org; s=gfnp-20170908; t=1685043307; x=1687635307; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=+6ooOalcYSynBVHcslWLsZXd/Olw5Ll2Y3Ygf/3WRhs=; b=N7OQERrERxfThrv4YFJerNUFWIv0/hjJpwXnmhlfdIUArAxeTj3pyuVC/BPMCrINS4 IzpssrX8OYaDnVp+xbFIbMHGS9hzR++U5G1dhq4EwAOKBehFfVMbTstSajvvSJPqBp5W oe8GFnJZOpn7eySb22x0xOK3YglEEcDifv0swdUbPir91c8uowGwzfTyx7dwbNGznFew epnhQFYZHlULZE2rDT6qtRHgS63fZsR7zQhdf1Msf/Q4Vt624agA9LQdAobFodOa09bp 0h/3ZJhFyfR8SrKnXOz6dZR66ml/a5RTKhT9go9Yy0RQeX9lNcaUmu3rvM9oFcR0pWhx dPSA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685043307; x=1687635307; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=+6ooOalcYSynBVHcslWLsZXd/Olw5Ll2Y3Ygf/3WRhs=; b=VvNhtaqJX4nDCKuwuOpP9J4w0Gy8czTWCdO8zkbYOTJFMjotFd1gcz0JdrS//nI3Eu B5OJbhnjnzTuYQZBavzUDMdb8T43DEzhhcH8BaJLuzMSc4CO3Aog9XCXBuWCBGKVTFzQ sRslxjZeDZZq1pYw9dUh8Y6HMDiRy4vEjU87KULMdX1HheiGkpOeRtbFJm55smPMHTqd hWtmTmRZU1ImjQoEdOf4UaxjD3HCdxvfO9JVJsWKzAVC4m2o/gGvvVagTm6aSftNto3v cF7TDOONoYFeD0Qnknv0OzVn7904BxhDnTkk4lCkLqtms1tCONBv2fjyYvJAsgf8zucn 87Uw== X-Gm-Message-State: AC+VfDxc8hBmeTGnmSmV096ZD217DycpV8HCDmWaG9+hNkZeZDx0HDpF cPyKnIl8gIickMkds0nEd67la9NnlGXZLnnTo7cKUmZoBH1rPM56CoTw9w== X-Google-Smtp-Source: ACHHUZ6HrXL3FU3Xy01dbKFWnSgqrOJPufcK5nFHocql5HbTxa7tpFhOax6zePsYY57SZ56FWJRv1ZCz8pTT59o+5Qk= X-Received: by 2002:a0d:d508:0:b0:55a:64b3:fc13 with SMTP id x8-20020a0dd508000000b0055a64b3fc13mr476543ywd.1.1685043307585; Thu, 25 May 2023 12:35:07 -0700 (PDT) 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 From: Naman Sood Date: Thu, 25 May 2023 15:34:56 -0400 Message-ID: Subject: APIC interrupting me while stepping through a kernel with kgdb To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Spamd-Result: default: False [-3.42 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.92)[-0.920]; R_DKIM_ALLOW(-0.20)[freebsdfoundation.org:s=gfnp-20170908]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; MIME_GOOD(-0.10)[text/plain]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::1134:from]; MLMMJ_DEST(0.00)[freebsd-hackers@freebsd.org]; ARC_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; DKIM_TRACE(0.00)[freebsdfoundation.org:+]; RCPT_COUNT_ONE(0.00)[1]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; DMARC_NA(0.00)[freebsdfoundation.org]; PREVIOUSLY_DELIVERED(0.00)[freebsd-hackers@freebsd.org]; HAS_WP_URI(0.00)[]; TO_DN_NONE(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-Rspamd-Queue-Id: 4QRyv10Bshz4BHk X-Spamd-Bar: --- X-ThisMailContainsUnwantedMimeParts: N 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. Thanks, Naman. [1]: https://freebsdfoundation.org/wp-content/uploads/2014/07/Using-bhyve-for-FreeBSD-Development.pdf