This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch] Fixed occasional failure to load a custom shared library
- From: Kevin Buettner <kevinb at redhat dot com>
- To: gdb-patches at sources dot redhat dot com
- Date: Mon, 26 Jun 2006 18:00:51 -0700
- Subject: Re: [patch] Fixed occasional failure to load a custom shared library
- References: <20060622114016.GA21094@host0.dyn.jankratochvil.net>
On Thu, 22 Jun 2006 13:40:16 +0200
Jan Kratochvil <lace@jankratochvil.net> wrote:
Index: solib.c
===================================================================
RCS file: /cvs/src/src/gdb/solib.c,v
retrieving revision 1.84
diff -u -p -r1.84 solib.c
--- solib.c 25 Feb 2006 04:36:39 -0000 1.84
+++ solib.c 22 Jun 2006 11:24:40 -0000
@@ -146,13 +146,17 @@ solib_open (char *in_pathname, char **fo
int found_file = -1;
char *temp_pathname = NULL;
char *p = in_pathname;
+ int solib_absolute_prefix_is_empty;
+
+ solib_absolute_prefix_is_empty = (!solib_absolute_prefix
+ || !*solib_absolute_prefix);
I'd prefer to see this written as follows:
+ solib_absolute_prefix_is_empty = (solib_absolute_prefix == NULL
+ || *solib_absolute_prefix == 0);
The rest of your patch looks reasonable. (You forgot to include a
ChangeLog entry though...)
Are you able to commit this yourself or do you need someone to commit
it for you?
Thanks for the patch!
Kevin