All of lore.kernel.org
 help / color / mirror / Atom feed
From: Glenn Washburn <development@efficientek.com>
To: grub-devel@gnu.org, Daniel Kiper <dkiper@net-space.pl>
Cc: Glenn Washburn <development@efficientek.com>
Subject: [PATCH v3 00/15] GDB script fixes and improvements
Date: Thu, 15 Dec 2022 01:07:35 -0600	[thread overview]
Message-ID: <20221215070750.102591-1-development@efficientek.com> (raw)

v3 changes:
  Use correct automake macro for target cpu

There's been a lot of changes since v1. There are more fixes and more
features. The majority of the shell code has been moved to an external
file named gdb_helper.sh, instead of being inline in the GDB script. The
one (direct) PERL dependency in GRUB has been removed and converted to
shell script. Also a section on debugging is added to the developer docs.

Glenn

Glenn Washburn (15):
  gdb: Fix redirection issue in dump_module_sections
  gdb: Prevent wrapping when writing to .segments.tmp
  gdb: If no modules have been loaded, do not try to load module symbols
  gdb: Move runtime module loading into runtime_load_module
  gdb: Get correct mod variable value
  gdb: Do not run load_module if module has already been loaded
  gdb: Add functions to make loading from dynamically positioned targets
    easier
  gdb: Remove Perl dependency for GRUB GDB script
  gdb: If enabled, print line used to load EFI kernel symbols when using
    gdb_grub script
  gdb: Conditionally run GDB script logic for dynamically or statically
    positioned GRUB
  gdb: Only connect to remote target once when first sourced
  gdb: Allow user defined "onload_<modname>" command to be run when
    module is loaded
  gdb: Allow running user-defined commands at GRUB start
  gdb: Add ability to turn on shell tracing for gdb helper script
  docs: Add debugging chapter to development documentation

 config.h.in                 |   3 +
 docs/grub-dev.texi          | 191 ++++++++++++++++++++++++++++++++++
 grub-core/Makefile.core.def |   4 +-
 grub-core/gdb_grub.in       | 198 ++++++++++++++++++++++++++++++++----
 grub-core/gdb_helper.sh.in  | 108 ++++++++++++++++++++
 grub-core/gmodule.pl.in     |  30 ------
 grub-core/kern/efi/efi.c    |   4 +-
 grub-core/kern/efi/init.c   |  19 +++-
 include/grub/efi/efi.h      |   2 +-
 9 files changed, 501 insertions(+), 58 deletions(-)
 create mode 100644 grub-core/gdb_helper.sh.in
 delete mode 100644 grub-core/gmodule.pl.in

Range-diff against v2:
 1:  1cc0b2564f =  1:  ec2b71c403 gdb: Fix redirection issue in dump_module_sections
 2:  061d29407a =  2:  f350ddf3c9 gdb: Prevent wrapping when writing to .segments.tmp
 3:  65d35d5c4d =  3:  75949e0d8e gdb: If no modules have been loaded, do not try to load module symbols
 4:  98f623bc32 =  4:  ed5599b842 gdb: Move runtime module loading into runtime_load_module
 5:  901cce11e8 =  5:  e00aa463bb gdb: Get correct mod variable value
 6:  6ad80d3538 =  6:  c1e0439012 gdb: Do not run load_module if module has already been loaded
 7:  11b687f39f =  7:  dc8ce82e27 gdb: Add functions to make loading from dynamically positioned targets easier
 8:  5afdb8b08e =  8:  dc7338f00a gdb: Remove Perl dependency for GRUB GDB script
 9:  5043a2afae !  9:  0ee5cb7cc1 gdb: If enabled, print line used to load EFI kernel symbols when using gdb_grub script
    @@ grub-core/kern/efi/efi.c: grub_efi_get_variable (const char *var, const grub_efi
     +grub_efi_section_addr (const char *section_name)
      {
        grub_efi_loaded_image_t *image;
    -   struct grub_pe32_header *header;
    +   struct grub_msdos_image_header *header;
     @@ grub-core/kern/efi/efi.c: grub_efi_modules_addr (void)
             i < coff_header->num_sections;
             i++, section++)
10:  9fb80f98b4 = 10:  7ec11bff7e gdb: Conditionally run GDB script logic for dynamically or statically positioned GRUB
11:  9645210fe5 = 11:  e62defbaa7 gdb: Only connect to remote target once when first sourced
12:  effc51d9f1 = 12:  0101c41233 gdb: Allow user defined "onload_<modname>" command to be run when module is loaded
13:  64797129bb ! 13:  94f4707b14 gdb: Allow running user-defined commands at GRUB start
    @@ grub-core/gdb_grub.in: set confirm off
      # fail.
      
      set $platform_efi = $_streq("@platform@", "efi")
    -+set $target = "@target-cpu@-@platform@"
    ++set $target = "@target_cpu@-@platform@"
      
      if ! $runonce
      	if $platform_efi
14:  b07b037728 = 14:  5fbef49d07 gdb: Add ability to turn on shell tracing for gdb helper script
15:  270d7722e6 = 15:  b1f6f5861b docs: Add debugging chapter to development documentation
-- 
2.34.1



             reply	other threads:[~2022-12-15  7:09 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-15  7:07 Glenn Washburn [this message]
2022-12-15  7:07 ` [PATCH v3 01/15] gdb: Fix redirection issue in dump_module_sections Glenn Washburn
2022-12-15  7:07 ` [PATCH v3 02/15] gdb: Prevent wrapping when writing to .segments.tmp Glenn Washburn
2022-12-15  7:07 ` [PATCH v3 03/15] gdb: If no modules have been loaded, do not try to load module symbols Glenn Washburn
2022-12-15  7:07 ` [PATCH v3 04/15] gdb: Move runtime module loading into runtime_load_module Glenn Washburn
2022-12-15  7:07 ` [PATCH v3 05/15] gdb: Get correct mod variable value Glenn Washburn
2022-12-15  7:07 ` [PATCH v3 06/15] gdb: Do not run load_module if module has already been loaded Glenn Washburn
2022-12-15  7:07 ` [PATCH v3 07/15] gdb: Add functions to make loading from dynamically positioned targets easier Glenn Washburn
2022-12-15  7:07 ` [PATCH v3 08/15] gdb: Remove Perl dependency for GRUB GDB script Glenn Washburn
2022-12-15  7:07 ` [PATCH v3 09/15] gdb: If enabled, print line used to load EFI kernel symbols when using gdb_grub script Glenn Washburn
2022-12-15  7:07 ` [PATCH v3 10/15] gdb: Conditionally run GDB script logic for dynamically or statically positioned GRUB Glenn Washburn
2022-12-15  7:07 ` [PATCH v3 11/15] gdb: Only connect to remote target once when first sourced Glenn Washburn
2022-12-15  7:07 ` [PATCH v3 12/15] gdb: Allow user defined "onload_<modname>" command to be run when module is loaded Glenn Washburn
2022-12-15  7:07 ` [PATCH v3 13/15] gdb: Allow running user-defined commands at GRUB start Glenn Washburn
2022-12-15  7:07 ` [PATCH v3 14/15] gdb: Add ability to turn on shell tracing for gdb helper script Glenn Washburn
2022-12-15  7:07 ` [PATCH v3 15/15] docs: Add debugging chapter to development documentation Glenn Washburn

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-all 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=20221215070750.102591-1-development@efficientek.com \
    --to=development@efficientek.com \
    --cc=dkiper@net-space.pl \
    --cc=grub-devel@gnu.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.