All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 00/15] GDB script fixes and improvements
@ 2022-12-15  7:07 Glenn Washburn
  2022-12-15  7:07 ` [PATCH v3 01/15] gdb: Fix redirection issue in dump_module_sections Glenn Washburn
                   ` (14 more replies)
  0 siblings, 15 replies; 16+ messages in thread
From: Glenn Washburn @ 2022-12-15  7:07 UTC (permalink / raw)
  To: grub-devel, Daniel Kiper; +Cc: Glenn Washburn

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



^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2022-12-15  7:10 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-15  7:07 [PATCH v3 00/15] GDB script fixes and improvements Glenn Washburn
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

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.