[PATCH v3 3/5] Code cleanup: dwarf2_initialize_objfile return value

Yao Qi qiyaoltc@gmail.com
Mon Dec 11 13:04:00 GMT 2017


On Fri, Dec 8, 2017 at 11:52 PM, Pedro Alves <palves@redhat.com> wrote:
> diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
> index a9daf1f..798af72 100644
> --- a/gdb/dwarf2read.c
> +++ b/gdb/dwarf2read.c
> @@ -5291,7 +5291,7 @@ const struct quick_symbol_functions dwarf2_gdb_index_functions =
>  /* Initialize for reading DWARF for this objfile.  Return 0 if this
>     file will use psymtabs, or 1 if using the GNU index.  */
>
> -int
> +const sym_fns &
>  dwarf2_initialize_objfile (struct objfile *objfile)
>  {
>    /* If we're about to read full symbols, don't bother with the
> @@ -5320,13 +5320,13 @@ dwarf2_initialize_objfile (struct objfile *objfile)
>        /* Return 1 so that gdb sees the "quick" functions.  However,
>          these functions will be no-ops because we will have expanded
>          all symtabs.  */
> -      return 1;
> +      return elf_sym_fns_gdb_index;
>      }
>
>    if (dwarf2_read_index (objfile))
> -    return 1;
> +    return elf_sym_fns_gdb_index;
>
> -  return 0;
> +  return elf_sym_fns_lazy_psyms;
>  }
>

This breaks the arm-wince-pe build,

dwarf2read.o: In function `dwarf2_initialize_objfile(objfile*)':
/home/yao.qi/SourceCode/gnu/binutils-gdb/gdb/dwarf2read.c:6486:
undefined reference to `elf_sym_fns_gdb_index'
/home/yao.qi/SourceCode/gnu/binutils-gdb/gdb/dwarf2read.c:6490:
undefined reference to `elf_sym_fns_debug_names'
/home/yao.qi/SourceCode/gnu/binutils-gdb/gdb/dwarf2read.c:6495:
undefined reference to `elf_sym_fns_lazy_psyms'
collect2: error: ld returned 1 exit status
Makefile:1920: recipe for target 'gdb' failed

https://ci.linaro.org/job/tcwg-binutils/4395/

-- 
Yao (齐尧)



More information about the Gdb-patches mailing list