From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2a00:1450:4864:20::441; helo=mail-wr1-x441.google.com; envelope-from=leif.lindholm@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-wr1-x441.google.com (mail-wr1-x441.google.com [IPv6:2a00:1450:4864:20::441]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id DDA7B210D7F24 for ; Thu, 2 Aug 2018 04:22:41 -0700 (PDT) Received: by mail-wr1-x441.google.com with SMTP id f12-v6so1704233wrv.12 for ; Thu, 02 Aug 2018 04:22:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=/C6bxMsWOG4kV5jPwr82DxliMhVTDjboydJmV6oSrtc=; b=N6rt4siU1Alh9lqdnTJ8DeOK94Ex6yOteaLfyiOV7f7CNkqPMTMgAOZo1jRNJGL3TT WkcyelRzkPMt9fI4K4g/1VLCE9TKonVqGSwC2IO1KzMoz8RWFiomj4mBSP94j2zSWp7C kFFcPrc1VZQOV9OJ8leqiVToWwUci2h2SZEF8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=/C6bxMsWOG4kV5jPwr82DxliMhVTDjboydJmV6oSrtc=; b=Y2V4QdFaeJ+WhxnmDqSE+wRBoz5pMBLJpZRP1qyPETM3YjjLjnn30TCXkAeTNCj38a emiReCVsOFoK5ORlS9yAHpIGl89epo7po0o9YdDsheISns2MDkgGhqBKplrzBXtGcvB9 uPTbgUEx/C6FnyQY8zE52bvspkXUcCcTThFRekmDPU1lRRLc0MA6hHVRJYrLlZaTke+Y dBNxn6r0f6R84nlChTadMs1LFcGOsTCvpeV0HYVmbzg1tBAI9otwmzQay+CXBwtR8JnB gptjL4dPOP4c/N3RxR02Yg6MlXEjZF/dauJUr9++98O18N5NRwgk8GlNws9PoGpdPj2J p/iw== X-Gm-Message-State: AOUpUlH49ZWH5+5IZ+JrxbC+RcYTfu+2O2xLP6i+dJ0IJ2atcxF8zPCc IhlKRR7mlAsIg5+jG8cReDFZ6Fa71/A= X-Google-Smtp-Source: AAOMgpd3TkEUXtY5leOJtG9Bp/dIQiSMaRv9ykdfWs57hKoBzLanMXQvYGcNz8uBY9DcQ8VEs1I4DQ== X-Received: by 2002:a5d:5385:: with SMTP id d5-v6mr1601270wrv.151.1533208960066; Thu, 02 Aug 2018 04:22:40 -0700 (PDT) Received: from bivouac.eciton.net (bivouac.eciton.net. [2a00:1098:0:86:1000:23:0:2]) by smtp.gmail.com with ESMTPSA id l15-v6sm1072429wrt.67.2018.08.02.04.22.38 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 02 Aug 2018 04:22:38 -0700 (PDT) Date: Thu, 2 Aug 2018 12:22:37 +0100 From: Leif Lindholm To: Chris Co Cc: Ard Biesheuvel , "edk2-devel@lists.01.org" , Michael D Kinney Message-ID: <20180802112237.jjhx5emkyt4fhzjb@bivouac.eciton.net> References: <20180717020529.19496-1-christopher.co@microsoft.com> <20180717020529.19496-4-christopher.co@microsoft.com> <20180731205637.wxvzwq2xnbiaieju@bivouac.eciton.net> <20180801093927.6hja7qgkiwpyvt3m@bivouac.eciton.net> MIME-Version: 1.0 In-Reply-To: User-Agent: NeoMutt/20170113 (1.7.2) Subject: Re: [PATCH edk2-platforms 3/3] Platform/Microsoft: Add Lauterbach debug library X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Aug 2018 11:22:42 -0000 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Aug 02, 2018 at 01:27:16AM +0000, Chris Co wrote: > > > The 'data.load.elf' statement in > > > PeCoffLoaderRelocateImageExtraAction() is particular to Lauterbach > > > > Oh, right. > > > > That (original) code badly needs reformatting. > > > > Still, if that's the only difference - and in a debug printout, why fork the > > module? > > > > If there is a way to identify which debugger is being used, use that. > > If not, dump all the possible strings. > > Currently I didn't find a way to identify the debugger being used. Well, it was worth a shot. > Default behavior of the original code assumes ARM platforms use DS5 > debugger. I could introduce a PCD or compile flag so the developer > can indicate DS5 vs Lauterbach debugger and key the debug print off > of that. That would certainly be preferable over keeping a separate copy. If we find a way to determine dynamically, that would be better. Maybe it could even be worth to have a dynamic pcd and a menu setting, defaulting to just printing module names and addresses/sizes if no specific debugger has been selected? (Where the default could be platform-specific.) I have some theory about adding information to qemu fw_cfg to let EDK2 know it's being debugged, but clearly that won't help real platforms. > Regarding dumping all possible strings, I am not sure exactly how > the DS5 output string is being used. i.e. does the DS5 software > receive the serial info directly? If so, does it expect to see a > specific format? Is the software resilient enough that it can > handle the Lauterbach spew on the same channel? So, this predates my involvement with edk2 - but I think it was just added so you could copy/paste the command line needed to get symbols in your debugger for a specific file. (I will note here that the DS5 syntax is also suspiciously like GDB syntax.) / Leif