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: [patchv4 4/5] Keep objfile original filename


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


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