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

Pedro Alves
2016-10-04T18:06:25Z

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