Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp2618890lqt; Mon, 22 Apr 2024 17:01:10 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXz/td/PlEFkYEJW9C90zbCH/eBlXflqT8Dn/AtiGpfQ8aNjFF4iJH8LoDnyHWQdw+1hW0LHgSDLPPepSJ9aHwYlVlE2wLnBcKqpDzwfQ== X-Google-Smtp-Source: AGHT+IH9O8wI4Weg462jHXk7PAHopkp7Zfuy1WlHl7vxBZ6GkBgOlmo1uqGc4mGGvp3FaRjsmL2x X-Received: by 2002:a05:6a20:100c:b0:1a8:58a2:ea41 with SMTP id gs12-20020a056a20100c00b001a858a2ea41mr1266710pzc.9.1713830469688; Mon, 22 Apr 2024 17:01:09 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713830469; cv=pass; d=google.com; s=arc-20160816; b=oisOWfB3P8tMddBvuoeHibUXjhTTg/uBGV8FJ4Axs+CK1ddAm+VNIesQmDC80mRRA6 RZL7Td6jebvcXdNbZR6+C/8YdukTvmsyTRfulekXp3kexWbUvm29fUsOFMgLArShmo6a +WfqgF3wS5HlX+3UUVIPb2WIkNCtvlvYpj/OS0S+bUL/Rh5VdTwEp6wf7HM2IYeu3fVK 3LuAsXtuaTGcbT9B+m5phOf598sRPEqmKNZMlCUdZnIzRfCHaVqkYxjQEqGlI+4takyX 6rZxzkSbOsadsAeFqugsZLbm6yb+7bn+V/mnbMl+R0MbFYVsxAEnvRxFYPwnOTZxf2Li I4eQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=9SOhZEZT4NIqKamiAK6hc1pW5omVtcjx/7H0PT95lRc=; fh=pMvR5yjMLLtKpiznGmQn3ZyDCa9lkX8zAFAh7uB8iUU=; b=LUcRabBtmySteGO+n6+swhaS3Lx69ElGeqm4YaHpWqfZIptdC8oeBp8R82yueZJ8A9 pTZaWMUYKn7KXWMrfEo7JZSrVEDohLbl6v0QBSDIAhvwgKngcVV3O98yrCLNuLLhxdeX lkgUkFf2tXVX4TTu6fbudHHqyqVGucf8FhXA7mKsW75W49G5QNh6z51M8OdKLjLSPqa7 SPMvs4j3alwAMIN4fPplAAVstf7rX/LIl/MYvK7ohAsqsxtHJH2DKFU1onSKIySVHPtV o9Qq6IPELkJyoBEmprbzPFQ9zR+fKuD+R0FtXE8BmQEMoxkCcB2vtbk1MfZxPnrwXEts E6ag==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=aKV8dekb; arc=pass (i=1 spf=pass spfdomain=chromium.org dkim=pass dkdomain=chromium.org dmarc=pass fromdomain=chromium.org); spf=pass (google.com: domain of linux-kernel+bounces-154212-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-154212-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id a11-20020a056a000c8b00b006f0b4f9e5cfsi7154669pfv.124.2024.04.22.17.01.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Apr 2024 17:01:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-154212-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=aKV8dekb; arc=pass (i=1 spf=pass spfdomain=chromium.org dkim=pass dkdomain=chromium.org dmarc=pass fromdomain=chromium.org); spf=pass (google.com: domain of linux-kernel+bounces-154212-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-154212-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id B4A68B24C57 for ; Mon, 22 Apr 2024 23:52:44 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3FEE345BEF; Mon, 22 Apr 2024 23:52:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="aKV8dekb" Received: from mail-qk1-f173.google.com (mail-qk1-f173.google.com [209.85.222.173]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0830B4597A for ; Mon, 22 Apr 2024 23:52:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.173 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713829958; cv=none; b=RHvfSaAe1QBezbumq4T9Ay7us7Pk/T0+FIICqi32xrq0m6NP1nBr+IRIcJH1gGU/XBo3KxmbZq1bkaf5JLgrzKk2eURdEfT/mfhMxZRkJBxQ+QbgMl8dN4FxrN0ug0r60ELjvw5dTy8lKTJyJZFrPsaxY/mXw05KxEMhUfgQbK0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713829958; c=relaxed/simple; bh=7VpFWji0npb8y8WcWu7SHDIm3yHlNEnN9NqpcurZ/+g=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=fhRTyT2ZOOjD0fQ81m+ffub4q9wqIiXvg7tE4YuspIeNuVGlgje+K4dSdpwLOH4L1wmQ4JgERzjBVIr6ZKvInqTmFh1w6mowAtZwsJtgJ81AsWQ0FZ7wQ7bfCj3u6Vpbk9SkVgXpklDj6jMypVu3EjBLvnslIysJ1OmWTxdHwco= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=aKV8dekb; arc=none smtp.client-ip=209.85.222.173 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Received: by mail-qk1-f173.google.com with SMTP id af79cd13be357-78ebc7e1586so598812885a.1 for ; Mon, 22 Apr 2024 16:52:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1713829955; x=1714434755; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=9SOhZEZT4NIqKamiAK6hc1pW5omVtcjx/7H0PT95lRc=; b=aKV8dekbYsNf5jZXVk4zjactEwNfciW/rHbO026ce6ZOZO6+ymVG77/gcbZ29wt7oj Tplaj9jgi9UvaP1eW2uceN2syPNkMM6ZK3coc9NbXLCJhiELjhaeTRZreS+x9+FOY/uY 4hee6KCerbIVPz71nTfz3P6lc6b5UUwexpydE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713829955; x=1714434755; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=9SOhZEZT4NIqKamiAK6hc1pW5omVtcjx/7H0PT95lRc=; b=ANWwiVk1K+NFoE8Fy2YUV5hdQkEodKapEHm7MEUH2g53TQh0wVyeqt/MtuAqmePcWH 8vcwV4kkgvkK9q++e4dEfRDfveaAOueF3pmzGX4E1LOh8KAUoqZEGTE8PV33EPG0NX86 J4GD1aZQEi14FjBkvp1OH9cQI5NVk7XRqSNsOSC0Za7K/Pou8EibYh+oIfF8iLs10TlG j/saifHO2FzrycrQq9aF/OnlhqLOC2i1Zl9Uzrn4lxQYvJHHhfke9naie+D5dckXzmwk +OssuVK3oyD9eVZgC2RdpLilu7QZsAWqbCvC4FndyMEWVsv/3yHNf/2tZQ6+nzDO8035 3cZg== X-Forwarded-Encrypted: i=1; AJvYcCWaLtqUpdaGKFd9QcyEokMziwMVZN/DDpa4wHGPMUREZivrcxXr5iUq4cQ1qoj0k/JT+GhHDtLOePfQ2BcO8soH24EcYbVAcM66M0Pg X-Gm-Message-State: AOJu0Yw9rwyLFCsEBguKPEgQsEnBp20VzprLwyq5LL0QtQnP7qQPNDqb 3Uh4SXUZ/+OhSWZW97WwVZX2/9vQhG4IcEkierCDP59rFO6veFUsJ2LdxFFTk8eVI7DpdFcFRhy hVgcH X-Received: by 2002:a05:620a:2403:b0:790:76ea:b47c with SMTP id d3-20020a05620a240300b0079076eab47cmr2205096qkn.24.1713829954927; Mon, 22 Apr 2024 16:52:34 -0700 (PDT) Received: from mail-qt1-f171.google.com (mail-qt1-f171.google.com. [209.85.160.171]) by smtp.gmail.com with ESMTPSA id u5-20020a05620a022500b0078f13d368f3sm4298706qkm.95.2024.04.22.16.52.28 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 22 Apr 2024 16:52:28 -0700 (PDT) Received: by mail-qt1-f171.google.com with SMTP id d75a77b69052e-436ed871225so71651cf.1 for ; Mon, 22 Apr 2024 16:52:28 -0700 (PDT) X-Forwarded-Encrypted: i=1; AJvYcCV+xw4llaDY3SCiVu4ZJHc/srGjkJzGrdbM7sHngue0thHHMNBjyA3e540kdtBxxfQANQ8ta4aZ1a1VF4+dE3bQz2dfVOAVb51MkLo7 X-Received: by 2002:a05:622a:8030:b0:437:a0fc:8989 with SMTP id jr48-20020a05622a803000b00437a0fc8989mr125978qtb.4.1713829947957; Mon, 22 Apr 2024 16:52:27 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240422-kgdb_read_refactor-v2-0-ed51f7d145fe@linaro.org> <20240422-kgdb_read_refactor-v2-3-ed51f7d145fe@linaro.org> In-Reply-To: <20240422-kgdb_read_refactor-v2-3-ed51f7d145fe@linaro.org> From: Doug Anderson Date: Mon, 22 Apr 2024 16:52:12 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 3/7] kdb: Fix console handling when editing and tab-completing commands To: Daniel Thompson Cc: Jason Wessel , kgdb-bugreport@lists.sourceforge.net, linux-kernel@vger.kernel.org, stable@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi, On Mon, Apr 22, 2024 at 9:37=E2=80=AFAM Daniel Thompson wrote: > > Currently, if the cursor position is not at the end of the command buffer > and the user uses the Tab-complete functions, then the console does not > leave the cursor in the correct position. > > For example consider the following buffer with the cursor positioned > at the ^: > > md kdb_pro 10 > ^ > > Pressing tab should result in: > > md kdb_prompt_str 10 > ^ > > However this does not happen. Instead the cursor is placed at the end > (after then 10) and further cursor movement redraws incorrectly. The > same problem exists when we double-Tab but in a different part of the > code. > > Fix this by sending a carriage return and then redisplaying the text to > the left of the cursor. > > Cc: stable@vger.kernel.org > Signed-off-by: Daniel Thompson > --- > kernel/debug/kdb/kdb_io.c | 5 +++++ > 1 file changed, 5 insertions(+) Reviewed-by: Douglas Anderson