From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ot1-f50.google.com (mail-ot1-f50.google.com [209.85.210.50]) by mx.groups.io with SMTP id smtpd.web12.9905.1576173078816145011 for ; Thu, 12 Dec 2019 09:51:19 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@broadcom.com header.s=google header.b=SnBva8gx; spf=pass (domain: broadcom.com, ip: 209.85.210.50, mailfrom: vladimir.olovyannikov@broadcom.com) Received: by mail-ot1-f50.google.com with SMTP id x3so2822865oto.11 for ; Thu, 12 Dec 2019 09:51:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=from:references:in-reply-to:mime-version:thread-index:date :message-id:subject:to:cc:content-transfer-encoding; bh=w+IUeK9Wl724o3wGfndZsiP/j8ogHNa8nzlRy3FWGio=; b=SnBva8gxVkrO5h39AGu4w1GgpOoMyiTn0fMe6huNj8sAKF260JQE6+C8XGfPBTuG8i UDRFzrkhMuomONtAWgI1fDXSc/7D1EQl2j0vf4RuBWZLPEY1M7FVjKW3VwaC51aDJgAn wI+SNBiFnpkdAdxrJqZPXjbBdduEJVXQtlBTI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:references:in-reply-to:mime-version :thread-index:date:message-id:subject:to:cc :content-transfer-encoding; bh=w+IUeK9Wl724o3wGfndZsiP/j8ogHNa8nzlRy3FWGio=; b=IEsUs1pD04ZFDk4Y16lgZ2XxH2Ah5jcI0qzfIGCA5ROnVVTB/yWmwNZReavVj68+KB 97gesnBiPnX5t2sHJkigBzFYbCf7cDW2agmaECQXJZ2YmFz/IWBwQ6EAytJDEtnuqCnz q3JhFLRAXiCANjc9ZfkBTAEkDttoJ+LVEJ++hpRjLenF9Tf9hQOkND7K/uMQKlcXIyuw yzWghilya1Y0RAnPzwl4mbYlunufsnPWZt1kXmI6j6eiRp1sk+XtYr8XEBRYlp4LIkU0 AsnggwoLDfREJZaJsmmAlwpTxod4fEWhCsSwORUxESOohLLfRUqi0o/Rfr0Fowzspu1Y Se1A== X-Gm-Message-State: APjAAAXLVYDPeNf74nUPXCBAFu69PhG4n5N4c5ID+LqDiK4FaWW+jK9f yuWsNYhOoV3s8pCC29Tq+vfeABZSuYNrSTiVs3rpmw== X-Google-Smtp-Source: APXvYqzWRqyoEVmD6ThkHvImigehA+a+92ajDniQ/27DlVvtge3Oh8aMQVdaasoonrzQ9R71ZksrZJSP6bdmfuU+Ftk= X-Received: by 2002:a9d:6e8a:: with SMTP id a10mr9171988otr.181.1576173077919; Thu, 12 Dec 2019 09:51:17 -0800 (PST) From: "Vladimir Olovyannikov" References: <102e9863f7b0a90cbf854d059d9bcf25@mail.gmail.com> <04a4b0a07c2c090141430d7427e1a405@mail.gmail.com> In-Reply-To: MIME-Version: 1.0 X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQHNMhFW+D8eqrEobP/0gFQWkMCeUQIWX4WqAsgeWUMB1/AwggEqQkPIp4i+A1A= Date: Thu, 12 Dec 2019 09:51:13 -0800 Message-ID: Subject: Re: Debugging aarch64 edk2 built with gcc-8.x 64-bit arm compiler To: Sami Mujawar , Ard Biesheuvel Cc: devel@edk2.groups.io, nd Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable > -----Original Message----- > From: Sami Mujawar > Sent: Thursday, December 12, 2019 8:07 AM > To: Ard Biesheuvel ; Vladimir Olovyannikov > > Cc: edk2-devel-groups-io ; nd > Subject: RE: Debugging aarch64 edk2 built with gcc-8.x 64-bit arm compile= r > > Hi Vladimir, > > I have built the edk2 firmware using the following toolchains and find > that > the symbols are loaded correctly using DS5. > - gcc-arm-8.3-2019.03-x86_64-aarch64-elf.tar.xz > - gcc-arm-8.3-2019.03-x86_64-aarch64-linux-gnu.tar.xz > The above toolchains are available at https://developer.arm.com/tools-and= - > software/open-source-software/developer-tools/gnu-toolchain/gnu- > a/downloads > > So, it looks like the problem you mention may have something to do with > the > toolchain shipped with Yocto. Hi Sami, Thank you for reply. I tried with the same 8.x compilers and still have issues with symbols. Building with gcc-6.3 - symbols and stacks are OK. Maybe, you have some doc= s on how you load symbols, and I do it wrong? Maybe you can point me to different DS5 python scripts? The present ones limit the path length to be 255 chars, and it provides wrong add-symbol-line (truncates filenames) if the path length exceeds 255. Thank you, Vladimir > > Regards, > > Sami Mujawar > > -----Original Message----- > From: Ard Biesheuvel > Sent: 11 December 2019 02:51 PM > To: Vladimir Olovyannikov > Cc: Sami Mujawar ; edk2-devel-groups-io > > Subject: Re: Debugging aarch64 edk2 built with gcc-8.x 64-bit arm compile= r > > On Tue, 10 Dec 2019 at 18:25, Vladimir Olovyannikov > wrote: > > > > > -----Original Message----- > > > From: Ard Biesheuvel > > > Sent: Tuesday, December 10, 2019 9:13 AM > > > To: Vladimir Olovyannikov ; > Sami > > > Mujawar > > > Cc: edk2-devel-groups-io > > > Subject: Re: Debugging aarch64 edk2 built with gcc-8.x 64-bit arm > > > compiler > > > > > > On Sat, 7 Dec 2019 at 00:50, Vladimir Olovyannikov > > > wrote: > > > > > > > > Hi Ard, > > > > > > > > > > > > > > > > We are about to switch to the latest Yocto. It is shipped with > > > > gcc-8.3 > > > aarch64-linux-gnu compiler. > > > > > > > > We use DS5 for bare metal debugging. > > > > > > > > When I build edk2 with gcc-7-x/gcc-8.x, DS5 complains on DWARF > format. > > > > I tried to explicitly set it to DWARF2, but still cannot even get > > > > the stack or local variables (even though DS5 does not complain), > > > > even for > > > > edk2 > > > NOOPT build. > > > > > > > > > > > > > > > > Using gcc-6.3 from Linaro, I don=E2=80=99t see any issue with DS5 d= ebugging. > > > > > > > > Am I missing any steps? > > > > > > > > Build is done with GCC5_AARCH64_PREFIX=3Daarch64-linux-gnu > > > > > > > > > > > > > > > > Another question: it seems that the DS5 scripts limit the path > > > > size with > > > > 255 > > > chars. With a source built by Yocto, it can easily be more than that. > > > > > > > > Attempt to add symbols for such modules ends up with error message > > > > in > > > the DS5 command window that it could not add those symbols. > > > > > > > > Is there a procedure to increase the path length limit? > > > > > > > > > > I have never in my life used a DS-5 to debug EDK2 running on bare > > > metal, so unfortunately, I won't be able to help you. > > > > > How do you normally debug edk2 with DS5? Or, are you using a different > > mechanism? > > Debugging with DS5 was/is very convenient. > > > > I do my prototyping mainly in QEMU, using GDB for debug. Ard, should I do similar for a real specific v8 board?