This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC/RFA] Add support for the --readnever command-line option (DWARF only)


On 07/06/2016 09:54 PM, Joel Brobecker wrote:

>  #include <fcntl.h>
>  #include <sys/types.h>
> @@ -2062,6 +2063,9 @@ int
>  dwarf2_has_info (struct objfile *objfile,
>                   const struct dwarf2_debug_sections *names)
>  {
> +  if (readnever_symbol_files)
> +    return 0;

Guess that means '--readnever --readnow' is the same as
--readnever in practice?


> +if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
> +    untested "Couldn't compile ${srcfile}"
> +    return -1
> +}

Maybe use build_executable.

> +set saved_gdbflags $GDBFLAGS
> +set GDBFLAGS "$GDBFLAGS --readnever"
> +clean_restart ${binfile}
> +set GDBFLAGS $saved_gdbflags

Nowadays we have save_vars:

save_vars { GDBFLAGS } {
  append GDBFLAGS " --readnever"
  clean_restart ${binfile}
}

Thanks,
Pedro Alves


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]