[Crash-utility] [PATCH v3 1/2] Update gdb to 10.1
lijiang
lijiang at redhat.com
Fri Jan 15 09:35:32 UTC 2021
Hi, Alexey
Sorry for the late reply. And also thank you for the update.
At present, I'm looking at this patchset, but I have to say that this is a big one,
I will take some time to understand these changes and think more about this.
And I will provide feedback ASAP.
Thanks.
Lianbo
在 2020年12月29日 18:06, crash-utility-request at redhat.com 写道:
> Date: Tue, 29 Dec 2020 02:06:08 -0800
> From: Alexey Makhalov <amakhalov at vmware.com>
> To: <crash-utility at redhat.com>, <k-hagio-ab at nec.com>
> Subject: [Crash-utility] [PATCH v3 1/2] Update gdb to 10.1
> Message-ID: <20201229100609.83147-2-amakhalov at vmware.com>
> Content-Type: text/plain
>
> Fully redone gdb-7.6.patch to gdb-10.1.patch to keep all
> functionality. Changes which were dropped are saved in
> dropped-gdb-7.6-to-10.1.patch
>
> Main difference between gdb-7.6 and gdb-10.1 is the last
> one was rewritten in C++.
> I continue to keep crash code in C. Mark transition
> functions as extern "C" to resolve linking issues.
>
> Eliminated error_hook() and SJLJ while running in C++ code
> (after gdb_command_funnel()) use try-catch mechanism instead.
>
> request_types() was redone to do not call
> GNU_GET_NEXT_DATATYPE multiple times but single usage of
> GNU_ITERATE_DATATYPES with proper callback instead.
> Complete iteration happens on C++ side now.
> Removed "struct global_iterator" from request structure,
> but added several fields (including callback pointer) to
> be able to perform iteration on C++ side.
>
> Type of "linux_banner" symbol is reported as 'D' by new
> gdb as its section ".rodata" marked as writable in vmlinux.
>
> BFD API has changed.
>
> deprecated_command_loop_hook got deprecated. So, call crash
> main_loop() directly from gdb captured_main().
>
> Added symbol file (vmlinux) rebase in gdb by kaslr_offset.
> by using new function: objfile_rebase().
> As result, we do not need kernel symbol patching as well as
> bait_and_switch hook anymore.
>
> Added crash_target for gdb to provide target operations
> such as xfer_partial to read and write crash dump memory.
> Removed previously used hooks for that in target.c.
> Keep crash_target.c as a file in crash folder instead of
> in gdb-10.1.patch for easier development and history
> tracking.
> crash_target can be enhanced in future to provide access
> to CPU registers, so backtrace and frame related commands
> from gdb can be used.
>
> Removed gdb-7.6-proc_service.h.patch is not required as
> gdb-10.1 already has this change.
>
> Extra: add VMware copyright to the version info.
>
> TODO:
> 1) gdb-10.1-ppc64le-support.patch has to be updated with
> following commits.
> 2) deprecate #if defined(GDB_X_Y) code as crash really
> supports only the latest gdb (only one patch).
> 3) move gdb_funnel_command() and subfunctions to separate
> file, similar to crash_target.c
> 4) remove legacy kernel patching and bait_and_switch hook.
>
> Signed-off-by: Alexey Makhalov <amakhalov at vmware.com>
> ---
> Makefile | 11 +-
> configure.c | 20 +-
> crash_target.c | 104 +
> defs.h | 35 +-
> 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 | 85 +-
> help.c | 1 +
> kernel.c | 2 +-
> main.c | 1 -
> symbols.c | 125 +-
> x86_64.c | 14 +-
> 15 files changed, 2141 insertions(+), 2707 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
More information about the Crash-utility
mailing list