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]

[RFA] solib-som.c fix for hpux


Dan J's change to solib handling
(http://sources.redhat.com/ml/gdb-patches/2006-01/msg00198.html) exposed
a probably unfounded assumption in the SOM solib code that assumes that
the solib_create_inferior_hook will always be called before current_sos.
As a result, gdb cvs on HPUX 32-bit would always error out when trying
to run any executable with the message "Debugging dynamic executables
loaded via the hpux8 dld.sl is not supported.". The most straightforward
fix is to remove the error and handle the case where there is not yet a
link map; that is what I have in the patch below. OTOH this does remove
the error message if anybody does try to run gdb on hpux8 (!!!)

Comments? ok to check in?

randolph

2006-03-24  Randolph Chung  <tausq@debian.org>

	* solib-som.c (link_map_start): Don't error out if there is
	not yet a link map.

Index: solib-som.c
===================================================================
RCS file: /cvs/src/src/gdb/solib-som.c,v
retrieving revision 1.8
diff -u -p -r1.8 solib-som.c
--- solib-som.c 24 Feb 2006 23:52:04 -0000      1.8
+++ solib-som.c 24 Mar 2006 05:18:35 -0000
@@ -520,7 +523,7 @@ link_map_start (void)
   read_memory (addr, buf, 4);
   addr = extract_unsigned_integer (buf, 4);
   if (addr == 0)
-    error (_("Debugging dynamic executables loaded via the hpux8 dld.sl
is not supported."));
+    return 0;

   read_memory (addr, buf, 4);
   return extract_unsigned_integer (buf, 4);

-- 
Randolph Chung
Debian GNU/Linux Developer, hppa/ia64 ports
http://www.tausq.org/


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