From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NDQka-0007W7-L2 for qemu-devel@nongnu.org; Wed, 25 Nov 2009 17:54:16 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NDQkW-0007U4-Pu for qemu-devel@nongnu.org; Wed, 25 Nov 2009 17:54:16 -0500 Received: from [199.232.76.173] (port=51300 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NDQkW-0007Tg-Au for qemu-devel@nongnu.org; Wed, 25 Nov 2009 17:54:12 -0500 Received: from mx1.redhat.com ([209.132.183.28]:61360) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NDQkV-0003Op-Oy for qemu-devel@nongnu.org; Wed, 25 Nov 2009 17:54:12 -0500 Message-ID: <4B0DB58E.1020203@redhat.com> Date: Wed, 25 Nov 2009 23:54:06 +0100 From: Gerd Hoffmann MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH] debugcon: support for debugging consoles (e.g. Bochs port 0xe9) References: <1258752795-15434-1-git-send-email-hpa@linux.intel.com> <4B0A6973.4010303@redhat.com> <4B0AEC8A.1020905@zytor.com> <4B0C66B0.5090805@zytor.com> <4B0D2713.60001@redhat.com> <4B0D70DC.8020605@linux.intel.com> <4B0DADDE.1080703@redhat.com> <4B0DAF0D.4010105@linux.intel.com> <4B0DB041.4060209@linux.intel.com> In-Reply-To: <4B0DB041.4060209@linux.intel.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "H. Peter Anvin" Cc: qemu-devel@nongnu.org, "H. Peter Anvin" On 11/25/09 23:31, H. Peter Anvin wrote: > On 11/25/2009 02:26 PM, H. Peter Anvin wrote: >> >> As such, I think there is still a place for the simple command line >> options like "-hda", "-serial" and my proposed "-debugcon", in addition >> to the full-featured connect-anything options and configuration files. >> That's all. >> > > I guess one question is if the simplified options could be better > implemented via some kind of builtin macros or translation submodule > rather than being treated as first-class options which they basically > are now. Still, that's a future development task. Wouldn't be that hard I think. Something along the lines of case QEMU_OPTION_debugcon: opts = qemu_chr_parse_compat("debugcon", optarg); if (NULL == opts) { fprintf(stderr, "already have a debugcon chardev\"); exit(1); } opts = qemu_opts_create(&qemu_device_opts, "debugcon", 1); if (NULL == opts) { fprintf(stderr, "already have a debugcon device\"); exit(1); } qemu_opt_set(opts, "driver", isa-debugcon); qemu_opt_set(opts, "chardev", "debugcon"); break; should do the trick. Depends on the chardev fix mentioned in this thread too. Allows to define a single device with the default port via shortcut. I tend to not add new command line switches for every little new device. For this one it might be reasonable nevertheless given the use cases. cheers, Gerd