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: set sysroot command on AIX has no effect.


I wrote:

> This is looking mostly good.  The one thing I don't like is all the extra
> xfree calls.  I think a better way would to not actually xstrdup the found
> pathname early after all, but instead just get it from the BFD.  So instead
> of the original:
> 
>    xfree (bfd_get_filename (object_bfd));
>    object_bfd->filename = xstrdup (pathname);
> 
> you'd do something like:
> 
>    object_bfd->filename = xrealloc (object_bfd->filename, ...);
>    strcat (object_bfd->filename, sep);

Sorry, I mixed up the two BFDs here, we need to get the pathname from
the archive_bfd, of coutse.  So this would be something like:

    xfree (bfd_get_filename (object_bfd));
    object_bfd->filename = xstrprintf ("%s%s", bfd_get_filename (archive_bfd), sep);

Bye,
Ulrich

-- 
  Dr. Ulrich Weigand
  GNU/Linux compilers and toolchain
  Ulrich.Weigand@de.ibm.com


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