[Crash-utility] [PATCH v3 0/2] Update gdb to 10.1

Alexey Makhalov amakhalov at vmware.com
Tue Dec 29 10:06:07 UTC 2020


Thanks, Kazu, for review. Really good catches! I addressed all of them
and one extra. Here is updated patchset v3 (intermediate).

v3 Changes:
 - Merged patch #3 (copyright message) into patch #1, edited to align
   with others.
 - "'bt' command often emits reduced output" - fixed. The issue was in
   provided by new gdb "call" mnemonic instead of expected "callq".
   Unwinder just didn't find the caller because of it.
 - "lack of information about struct members" and "unionprint" - fixed.
   The issue was in changed user_print_options members datatypes.
   Previously 4-bytes bool types now are 1-byte. Changed type of
   gdb_prettyprint_* from (int *) to (unsigned char *). Now, write
   access to such members do not clobber following members.
 - Commented back WARNING_OPTIONS in Makefile
 - Found and fixed one more issue: not working "p schedule" or
   "p &schedule". It was printing wrong address of the symbols.
   The address was relocated twice by kaslr_offset. It was fixed by
   disabling gdb symbols patching. I commented its invocation by
   "#if 0" and believe entire patching code can be safely removed.
   Benefits: less code to maintain, less hooks (such as bait_and_switch),
   faster load time. Let me know if it is safe to remove it, and I can
   integrate it with patch #1, gdb-10.1.patch will be even smaller.


v2 Changes:
 Patch #1:
  - added crash_target with memory accessors.
  - instead of adding relocation offset in x86_64 initialization
    code, added symbol file rebasing. So GDB will understand real
    load addresses.
 Patch #2: New patch. Support gdb backtrace with input and local
           variables, frames walking.
 Patch #3. New patch. Adds VMware credits to the version banner.


Alexey Makhalov (2):
  Update gdb to 10.1
  crash_taget: fetch_registers support

 Makefile                                           |   11 +-
 configure.c                                        |   20 +-
 crash_target.c                                     |  135 ++
 defs.h                                             |   88 +-
 dropped-gdb-7.6-to-10.1.patch                      |  303 +++
 ...support.patch => gdb-10.1-ppc64le-support.patch |    0
 gdb-10.1.patch                                     | 1577 ++++++++++++
 gdb-7.6-proc_service.h.patch                       |   67 -
 gdb-7.6.patch                                      | 2503 --------------------
 gdb_interface.c                                    |  101 +-
 help.c                                             |    1 +
 kernel.c                                           |    2 +-
 main.c                                             |    1 -
 symbols.c                                          |  125 +-
 vmware_vmss.c                                      |   51 +-
 x86_64.c                                           |   30 +-
 16 files changed, 2303 insertions(+), 2712 deletions(-)
 create mode 100644 crash_target.c
 create mode 100644 dropped-gdb-7.6-to-10.1.patch
 rename gdb-7.6-ppc64le-support.patch => gdb-10.1-ppc64le-support.patch (100%)
 create mode 100644 gdb-10.1.patch
 delete mode 100644 gdb-7.6-proc_service.h.patch
 delete mode 100644 gdb-7.6.patch

-- 
2.11.0




More information about the Crash-utility mailing list