public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Johannes Swoboda <johannes.swoboda@student.tuwien.ac.at>
To: Gary Lin <glin@suse.com>
Cc: Rebecca Cran <rebecca@bluestop.org>,
	thomas.palmer@hpe.com, lersek@redhat.com,
	Michael Kinney <michael.d.kinney@intel.com>,
	edk2-devel@lists.01.org, clemens.hlauschek@inso.tuwien.ac.at
Subject: Re: gdb reload-uefi missing EFI_SYSTEM_TABLE_POINTER [was: Source code debugging of OVMF]
Date: Thu, 24 May 2018 14:52:02 +0200	[thread overview]
Message-ID: <b86c0567-652c-16e5-213d-ded8a97e1681@student.tuwien.ac.at> (raw)
In-Reply-To: <20180424021328.ff2igddlce3xpghp@GaryWorkstation>

Hello,

I asked you for help for source level debugging of ovmf some time ago.
Things got in the way after that, but now I was able to follow your
advice and achieved my goal.

In particular,

1. I added the debug-lines below to GdbSyms.c
2. I started debugging later in the BDS phase (as suggested by several
of you)
3. I got rid of the qemu flag -enable-kvm (it screwed up the stepping in
gdb)

Thank you very much!

Kind regards,
Johannes


On 2018-04-24 04:13, Gary Lin wrote:
> On Fri, Apr 20, 2018 at 04:54:06PM +0200, Johannes Swoboda wrote:
>> gdb complained:
>>> Python Exception <class 'gdb.error'> No type named
>>> EFI_SYSTEM_TABLE_POINTER.:
>>> [...]
> I encountered the issue before and it seems caused by the linker option,
> "--whole-archive", which drops the symbols not used.
> 
> As a workaround, I add the following lines to Initialize():
> 
>   DEBUG ((DEBUG_VERBOSE, "%a: %llx\n", __FUNCTION__, &ESTP));
>   DEBUG ((DEBUG_VERBOSE, "%a: %llx\n", __FUNCTION__, &EDIITH));
>   DEBUG ((DEBUG_VERBOSE, "%a: %llx\n", __FUNCTION__, &EIDH));
>   DEBUG ((DEBUG_VERBOSE, "%a: %llx\n", __FUNCTION__, &EIOHU));
>   DEBUG ((DEBUG_VERBOSE, "%a: %llx\n", __FUNCTION__, &EIDDE));
>   DEBUG ((DEBUG_VERBOSE, "%a: %llx\n", __FUNCTION__, &EIDCNE));
>   DEBUG ((DEBUG_VERBOSE, "%a: %llx\n", __FUNCTION__, &EIDCRE));
>   DEBUG ((DEBUG_VERBOSE, "%a: %llx\n", __FUNCTION__, &EIDCME));
> 
> It at least makes the linker believe the symbols are important.
> Maybe you can try it.
> 
> Cheers,
> 
> Gary Lin


      reply	other threads:[~2018-05-24 12:52 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-16 11:09 Source code debugging of OVMF Johannes Swoboda
2018-04-16 15:26 ` Richardson, Brian
2018-04-16 16:03   ` Blibbet
2018-04-20 13:32   ` Johannes Swoboda
2018-04-16 16:13 ` Laszlo Ersek
2018-04-16 16:53   ` Palmer, Thomas
2018-04-16 18:25   ` Rebecca Cran
2018-04-16 19:57     ` Laszlo Ersek
2018-04-19  2:46     ` Rebecca Cran
2018-04-19  8:41       ` Laszlo Ersek
2018-04-20 14:54       ` gdb reload-uefi missing EFI_SYSTEM_TABLE_POINTER [was: Source code debugging of OVMF] Johannes Swoboda
2018-04-20 15:20         ` Laszlo Ersek
2018-04-20 15:58           ` Palmer, Thomas
2018-04-20 16:38             ` Johannes Swoboda
2018-04-20 16:45               ` Palmer, Thomas
2018-04-20 16:49               ` Rebecca Cran
2018-04-24  2:13         ` Gary Lin
2018-05-24 12:52           ` Johannes Swoboda [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b86c0567-652c-16e5-213d-ded8a97e1681@student.tuwien.ac.at \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox