]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
2004-06-03 Randolph Chung <tausq@debian.org>
authorRandolph Chung <tausq@debian.org>
Fri, 4 Jun 2004 17:03:25 +0000 (17:03 +0000)
committerRandolph Chung <tausq@debian.org>
Fri, 4 Jun 2004 17:03:25 +0000 (17:03 +0000)
Fix PR build/1458 (partial)
* somsolib.c (som_solib_remove_inferior_hook): Use constant array size
for dld_flags_buffer and make all size references consistent.
* NEWS: Mention this fix.

gdb/ChangeLog
gdb/NEWS
gdb/somsolib.c

index 659a2973612988bd7317aad2dd7c95c774c9d550..21830cdfb5a3fd69f3e33f17369094037541a2a2 100644 (file)
@@ -1,3 +1,10 @@
+2004-06-03  Randolph Chung  <tausq@debian.org>
+
+       Fix PR build/1458 (partial)
+       * somsolib.c (som_solib_remove_inferior_hook): Use constant array size
+       for dld_flags_buffer and make all size references consistent.
+       * NEWS: Mention this fix.
+
 2004-06-02  Albert Chin-A-Young  <china@thewrittenword.com>
 
        Committed by Andrew Cagney.
index 0ba85d900a05845f16a2b3dcaa4ef60f4842f25e..5fabf00cddc80ca7c17efeb81102d4707042f28a 100644 (file)
--- a/gdb/NEWS
+++ b/gdb/NEWS
@@ -14,6 +14,11 @@ The shell script gdb/testsuite/gdb.stabs/configure lacked execute
 permission.  This bug would cause configure to fail on a number of
 systems (Solaris, IRIX).  Ref: server/519.
 
+* Fixed build problem on hpux2.0w-hp-hpux11.00 using the HP ANSI C compiler
+
+Older HPUX ANSI C compilers did not accept variable array sizes.  somsolib.c
+has been updated to use constant array sizes.
+
 *** Changes in GDB 6.1:
 
 * Removed --with-mmalloc
index 7ecc97e64d18c74da01a4c9ea896271672b5dce1..d8c971b35402dfb81f5bf93da2db2ca6cc0858f5 100644 (file)
@@ -1062,7 +1062,7 @@ som_solib_remove_inferior_hook (int pid)
   CORE_ADDR addr;
   struct minimal_symbol *msymbol;
   int status;
-  char dld_flags_buffer[TARGET_INT_BIT / TARGET_CHAR_BIT];
+  char dld_flags_buffer[4];
   unsigned int dld_flags_value;
   struct cleanup *old_cleanups = save_inferior_ptid ();
 
@@ -1079,16 +1079,13 @@ som_solib_remove_inferior_hook (int pid)
   msymbol = lookup_minimal_symbol ("__dld_flags", NULL, NULL);
 
   addr = SYMBOL_VALUE_ADDRESS (msymbol);
-  status = target_read_memory (addr, dld_flags_buffer, TARGET_INT_BIT / TARGET_CHAR_BIT);
+  status = target_read_memory (addr, dld_flags_buffer, 4);
 
-  dld_flags_value = extract_unsigned_integer (dld_flags_buffer,
-                                             sizeof (dld_flags_value));
+  dld_flags_value = extract_unsigned_integer (dld_flags_buffer, 4);
 
   dld_flags_value &= ~DLD_FLAGS_HOOKVALID;
-  store_unsigned_integer (dld_flags_buffer,
-                         sizeof (dld_flags_value),
-                         dld_flags_value);
-  status = target_write_memory (addr, dld_flags_buffer, TARGET_INT_BIT / TARGET_CHAR_BIT);
+  store_unsigned_integer (dld_flags_buffer, 4, dld_flags_value);
+  status = target_write_memory (addr, dld_flags_buffer, 4);
 
   do_cleanups (old_cleanups);
 }