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: Small patch to enable build of gdb-7.6 for GNU/Hurd


On Mon, 2013-05-27 at 16:10 +0400, Joel Brobecker wrote:
> > 2013-05-27  Svante Signell  <srs@hurd-2013.my.own.domain>
> > 
> > 	* nto-tdep.c (nto_init_solib_absolute_prefix): Solve build
> > 	problems for systems not defining PATH_MAX by using xstrprintf and
> > 	a cleanup.
> 
> Is the domain name above really valid?

No, it's a local one. I forgot to change that one.

> > Attached is an updated patch for the build problems on systems where
> > PATH_MAX is not defined.
> 
> In this case, I think you need to use what we call a "cleanup",
> because execute_command might trigger an "error" (GDB's poor man's
> exception mechanism), thus prevening the last xfree from releasing
> buf.

I thought of that problem and looking into the code for execute_command
convinced me that that command should always return. Obviously I was
wrong, you are the experts.

> A formatting nit: The GNU Coding Standard, which we follow in GDB,
> requires a space before opening parens.

I just realized that after submitting the mail.

> While looking at this code, I don't think you'll need 2 xstrprintf
> either. Can you try the attached patch?

Yes, of course this code is much neater. I will report build status
soon.



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