From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-il1-f198.google.com (mail-il1-f198.google.com [209.85.166.198]) by mx.groups.io with SMTP id smtpd.web10.16340.1628730309171153196 for ; Wed, 11 Aug 2021 18:05:09 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: nuviainc.com, ip: 209.85.166.198, mailfrom: rebecca@nuviainc.com) Received: by mail-il1-f198.google.com with SMTP id d9-20020a056e021c49b02902095727d18dso2237110ilg.17 for ; Wed, 11 Aug 2021 18:05:09 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=l16Aws48JNCvYzTHBl9DXE/rGgmCQiqjOtz48gLMOUI=; b=JFEXPG1tLYBYn+ZZl0rz9MT0HIZsgLBrjnJ9JTwVblTHhJ9ADnj1oM+z1ngvvgLnno e0ICw5NB7nUcQQ06zMyV/IY4M9iIg8JfDwPLjztbbWMoVUrjlo/zIP/LiQJKc6MYtRyN Qlytm8LF8PNDaDjZCcUWvJSNGkCcX2aY5fWhcdCtp340k3EUhyv/8W6hWtSRzBJd2h+f IF65+jN1Z5cs/LQdyJNj5PuG9NrM1pAW/TmDkhc8ACNLprwPHAqG11DxKl9k+anSmzmn R1sbYm9glVWfjA61zWj5/mh3btgACmNDNVoqp+Y0/suaSf5UYpVlhhQorrTeQ9w+0uTA 99Rg== X-Gm-Message-State: AOAM531A54NrRbqGUXtDlfNebbytEgxWvJtg5D8n2QsxtBtT83H9S6OF f+52XmJ0g5WhI1OhtAWlQ/p612yqVrXQhqsePEHs4BrG+pP8InutGdiAwUVxOgD0LhQKF4wRxIm Lko9QPWWQ3hp3RDApHBYBwMvoLU+TlRcAf1k= X-Google-Smtp-Source: ABdhPJzAEfhf4zfsBZMNpm2gL3NRi24HhqzhuprPMZQvAc0c5tpn5fJTUKIO9/Mily1622hj5N/n2tAn3slICztu2CIPRZ0SdI+T9A== X-Received: by 2002:a92:6a03:: with SMTP id f3mr860723ilc.43.1628730308608; Wed, 11 Aug 2021 18:05:08 -0700 (PDT) Return-Path: Received: from linbox.int.bluestop.org (c-174-52-16-57.hsd1.ut.comcast.net. [174.52.16.57]) by smtp.gmail.com with ESMTPSA id h2sm755594pfr.158.2021.08.11.17.30.05 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 11 Aug 2021 17:30:06 -0700 (PDT) Subject: Re: [edk2-devel] [PATCH 0/3] Add support for gdb and lldb To: Andrew Fish Cc: devel@edk2.groups.io References: <776e36f8-df13-8b9d-7c22-948f64af65d7@nuviainc.com> <3710C965-2995-44D4-AF85-CA554C25915A@apple.com> From: "Rebecca Cran" Message-ID: Date: Wed, 11 Aug 2021 18:30:04 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.12.0 MIME-Version: 1.0 In-Reply-To: <3710C965-2995-44D4-AF85-CA554C25915A@apple.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US I should note my comments are against https://github.com/ajfish/edk2/tree/BZ3500-gdb, not the patches you sent out. AARCH64 is working great! The only thing I noticed that doesn't look quite right is the following message on startup when running gdb -ex "target remote localhost:1234" -ex "source efi_gdb.py" -ex "efi": Traceback (most recent call last):   File "efi_gdb.py", line 804, in invoke     self.restore_user_state()   File "efi_gdb.py", line 690, in restore_user_state     self.user_selected_frame.select() gdb.error: Frame is invalid. Traceback (most recent call last):   File "efi_gdb.py", line 822, in invoke     gdb.execute('efi symbols --extended') gdb.error: Error occurred in Python: Frame is invalid. Error occurred in Python: Error occurred in Python: Frame is invalid. Running `bt` shows the full set of frames except for the last one which as expected is shown as ??. -- Rebecca Cran On 8/11/21 5:22 PM, Andrew Fish wrote: > >> On Aug 11, 2021, at 3:11 PM, Rebecca Cran wrote: >> >> I realized the Arm gcc 10.3 aarch64 download from https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-a/downloads uses Python 2.7.18 and not Python 3, so the f-Strings and likely more cause problems. I suspect at this point there's little point putting effort into supporting Python 2. >> > I’ve not tested on ARM yet, so please let me know if it works. I’d like to avoid Python 2.7 support is possible given it is passed its best by date. > >> I noticed a couple of issues though: in efi_debugging.py the Attributes text is partially underlined with the non-ASCII characters '——————' instead of '----------'. >> > Thanks did not notice that. > >> Attributes >> ——————---- >> _dict_ : dictionay >> >> >> There are also a couple of typos of 'dictionary': >> >> >> _dict_ : dictionay >> > Shoot though I fixed those > > Thanks, > > Andrew Fish > >> -- >> Rebecca Cran >> >> >> On 8/8/21 3:46 PM, Andrew Fish via groups.io wrote: >>> This patch set adds debugging support for gdb and lldb. >>> It also adds generic debugging classes that use a file like object to >>> make it easy to import into any debugger that supports Python. >>> >>> Since these debugging scripts don't depend on any EFI code I was thinking >>> we could place them in the root of the repo to be easy to discover. >>> >>> I've tested gdb on Ubuntu and lldb on macOS for IA32 and X64. >>> >>> Andrew Fish (3): >>> efi_debugging.py: - Add debugger agnostic debugging Python Classes >>> efi_gdb.py: - Add gdb EFI commands and pretty Print >>> efi_lldb.py: - Add lldb EFI commands and pretty Print >>> >>> efi_debugging.py | 2187 ++++++++++++++++++++++++++++++++++++++++++++++ >>> efi_gdb.py | 918 +++++++++++++++++++ >>> efi_lldb.py | 1044 ++++++++++++++++++++++ >>> 3 files changed, 4149 insertions(+) >>> create mode 100755 efi_debugging.py >>> create mode 100755 efi_gdb.py >>> create mode 100755 efi_lldb.py >>>