----- Original Message -----
Hi Dave,
Do you have any plan to update the gdb inside of crash, like updating
to 7.5?
I update gdb only when necessary. Tentatively I'm looking at gdb-7.6
because I'm expecting (hoping) that ARM64 support will have been
implemented in gdb-7.6 by then.
While I try to do it by myself, I met link error as below, any idea?
So the gdb-7.3.1.patch applied relatively cleanly? That's surprising, because
it is usually a fairly painful process. And there's a few other things
that need to be done, primarily the introduction of a new gdb version
to configure.c, and the propagation of the new GDB_X_X flag to the
relevant crash sources that need to differentiate between older/newer
versions. For example, I've already got a placeholder set up for
gdb-7.6 set up for the next crash-6.1.1:
$ grep GDB_[567]_ *.[ch]
alpha.c:#ifndef GDB_5_3
configure.c:#define GDB_5_3 (0)
configure.c:#define GDB_6_0 (1)
configure.c:#define GDB_6_1 (2)
configure.c:#define GDB_7_0 (3)
configure.c:#define GDB_7_3_1 (4)
configure.c:#define GDB_7_6_x (5) /* TBD */
configure.c:#define SUPPORTED_GDB_VERSIONS (GDB_7_6_x + 1)
configure.c:int default_gdb = GDB_7_3_1;
configure.c: "GDB_FLAGS=-DGDB_5_3",
configure.c: "GDB_FLAGS=-DGDB_6_0",
configure.c: "GDB_FLAGS=-DGDB_6_1",
configure.c: "GDB_FLAGS=-DGDB_7_0",
configure.c: "GDB_FLAGS=-DGDB_7_3_1",
configure.c: "GDB_FLAGS=-DGDB_7_6_x",
configure.c: sp = &supported_gdb_versions[GDB_5_3];
configure.c: sp = &supported_gdb_versions[GDB_6_0];
configure.c: sp = &supported_gdb_versions[GDB_6_1];
configure.c: sp = &supported_gdb_versions[GDB_7_0];
configure.c: sp = &supported_gdb_versions[GDB_7_3_1];
defs.h:#ifdef GDB_5_3
defs.h:#if defined(GDB_5_3) || defined(GDB_6_0)
defs.h:#if defined(GDB_5_3) || defined(GDB_6_0) || defined(GDB_6_1) || defined(GDB_7_0)
defs.h:#if defined(GDB_5_3) || defined(GDB_6_0) || defined(GDB_6_1) || defined(GDB_7_0)
|| defined(GDB_7_3_1)
defs.h:#if defined(GDB_7_0) || defined(GDB_7_3_1)
defs.h:#if defined(GDB_5_3) || defined(GDB_6_0) || defined(GDB_6_1)
defs.h:#if defined(GDB_6_0) || defined(GDB_6_1)
defs.h:#if defined(GDB_5_3) || defined(GDB_6_0) || defined(GDB_6_1)
defs.h:#ifdef GDB_5_3
defs.h:#ifdef GDB_5_3
defs.h:#ifdef GDB_5_3
gdb_interface.c:#if defined(GDB_5_3) || defined(GDB_6_0) || defined(GDB_6_1)
gdb_interface.c:#if defined(GDB_6_0) || defined(GDB_6_1)
gdb_interface.c:#if defined(GDB_7_0) || defined(GDB_7_3_1)
gdb_interface.c:#if defined(GDB_5_3) || defined(GDB_6_0) || defined(GDB_6_1)
gdb_interface.c:#if defined(GDB_5_3) || defined(GDB_6_0) || defined(GDB_6_1)
gdb_interface.c:#ifdef GDB_5_3
gdb_interface.c:#if defined(GDB_5_3) || defined(GDB_6_0) || defined(GDB_6_1) ||
defined(GDB_7_0)
help.c:#if defined(GDB_5_3) || defined(GDB_6_0) || defined(GDB_6_1)
help.c:#ifdef GDB_5_3
kernel.c:#ifdef GDB_5_3
symbols.c:#ifdef GDB_5_3
symbols.c:#ifdef GDB_5_3
symbols.c:#ifdef GDB_5_3
symbols.c:#if !defined(GDB_5_3) && !defined(GDB_6_0) &&
!defined(GDB_6_1)
symbols.c:#if defined(GDB_5_3) || defined(GDB_6_0) || defined(GDB_6_1)
task.c:#ifndef GDB_5_3
task.c:#ifdef GDB_5_3
$
While I check the compiled code when the error happen, I find the
gdb_interface.c not be compiled yet, so should it be compiled first
before gdb?
No, something else is the problem. The build order is:
(1) gdb files --> which all get archived into libgdb.a
(2) the top-level crash files --> which get archived into crashlib.a
(3) the crash binary is linked/built with libgdb.a, crashlib.a and all the rest
So there's no requirement to build crashlib.a first.
Dave
symtab.o:symtab.c:function gdb_get_datatype: error: undefined
reference to 'gdb_CRASHDEBUG'
symtab.o:symtab.c:function gdb_get_datatype: error: undefined reference to
'console'
symtab.o:symtab.c:function gdb_get_datatype: error: undefined reference to
'gdb_CRASHDEBUG'
symtab.o:symtab.c:function gdb_get_datatype: error: undefined reference to
'console'
symtab.o:symtab.c:function gdb_get_datatype: error: undefined reference to
'gdb_CRASHDEBUG'
symtab.o:symtab.c:function gdb_get_datatype: error: undefined reference to
'console'
symtab.o:symtab.c:function gdb_add_symbol_file: error: undefined reference to
'same_file'
symtab.o:symtab.c:function gdb_delete_symbol_file: error: undefined reference to
'same_file'
symtab.o:symtab.c:function gdb_patch_symbol_values: error: undefined reference to
'patch_kernel_symbol'
symtab.o:symtab.c:function gdb_patch_symbol_values: error: undefined reference to
'patch_kernel_symbol'
symtab.o:symtab.c:function gdb_patch_symbol_values: error: undefined reference to
'patch_kernel_symbol'
psymtab.o:psymtab.c:function find_pc_sect_psymtab: error: undefined reference to
'gdb_line_number_callback'
symfile.o:symfile.c:function find_separate_debug_file: error: undefined reference to
'check_specified_module_tree'
symfile.o:symfile.c:function find_separate_debug_file_by_debuglink: error: undefined
reference to 'check_specified_kernel_debug_file'
main.o:main.c:function captured_main: error: undefined reference to
'update_gdb_hooks'
target.o:target.c:function target_read_memory: error: undefined reference to
'gdb_readmem_callback'
target.o:target.c:function target_read_stack: error: undefined reference to
'gdb_readmem_callback'
target.o:target.c:function target_write_memory: error: undefined reference to
'gdb_readmem_callback'
Thanks,
Lei