This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC/RFA] Add support for the --readnever command-line option (DWARF only)
- From: Pedro Alves <palves at redhat dot com>
- To: Joel Brobecker <brobecker at adacore dot com>, gdb-patches at sourceware dot org
- Date: Tue, 4 Oct 2016 19:06:21 +0100
- Subject: Re: [RFC/RFA] Add support for the --readnever command-line option (DWARF only)
- Authentication-results: sourceware.org; auth=none
- References: <1467838463-15786-1-git-send-email-brobecker@adacore.com>
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