This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patchv4 4/5] Keep objfile original filename
- From: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- To: Yao Qi <yao at codesourcery dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Tue, 7 Jan 2014 19:47:16 +0100
- Subject: Re: [patchv4 4/5] Keep objfile original filename
- Authentication-results: sourceware.org; auth=none
- References: <20130919135631 dot GD16978 at host2 dot jankratochvil dot net> <52CC02B1 dot 9060607 at codesourcery dot com>
On Tue, 07 Jan 2014 14:35:45 +0100, Yao Qi wrote:
> We add an argument name here, but don't update
> spu_symbol_file_add_from_memory in spu-linux-nat.c. We get a build
> error below, when we build GDB with --target=spu-elf on powerpc-linux
> machine.
Sorry I did not build GDB on all archs; despite I have ppc accessible.
> This patch fixes the build error, but I am not sure NAME we passed to
> symbol_file_add_from_bfd is desired. IIUC, the NAME is "<in-memory>".
> I didn't run testsuite. Is it OK?
Yes, it is OK. The parameter is there for a difference for real disk files
between their original name with symlinks vs. their realpath() name.
Thanks,
Jan
> --- a/gdb/spu-linux-nat.c
> +++ b/gdb/spu-linux-nat.c
> @@ -379,7 +379,8 @@ spu_symbol_file_add_from_memory (int inferior_fd)
> {
> struct cleanup *cleanup = make_cleanup_bfd_unref (nbfd);
>
> - symbol_file_add_from_bfd (nbfd, SYMFILE_VERBOSE | SYMFILE_MAINLINE,
> + symbol_file_add_from_bfd (nbfd, bfd_get_filename (nbfd),
> + SYMFILE_VERBOSE | SYMFILE_MAINLINE,
> NULL, 0, NULL);
> do_cleanups (cleanup);
> }
> --
> 1.7.7.6