* [patch/gdb-6.1] Backport fix for hpux C compiler problem
@ 2004-06-03 7:31 Randolph Chung
2004-06-04 16:24 ` Andrew Cagney
0 siblings, 1 reply; 2+ messages in thread
From: Randolph Chung @ 2004-06-03 7:31 UTC (permalink / raw)
To: gdb-patches; +Cc: Michael Elizabeth Chastain
This fixes a build problem on hpux2.0w-hp-hpux11.00 when using the HP
ANSI C compiler. It was committed to the branch earlier. Would like to
get this into the 6.1 respin.
Should be "obvious", but as this is for a stable release i'll just
double check with you all before i check this in, ok? :-)
As I mentioned in feedback to PR build/1458, I think that bug is
resolved, partially via this fix.
thanks,
randolph
2004-06-03 Randolph Chung <tausq@debian.org>
Fix PR build/1458
* 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.
Index: NEWS
===================================================================
RCS file: /cvs/src/src/gdb/NEWS,v
retrieving revision 1.138.2.4
diff -u -p -p -r1.138.2.4 NEWS
--- NEWS 29 Apr 2004 14:30:48 -0000 1.138.2.4
+++ NEWS 3 Jun 2004 07:24:07 -0000
@@ -14,6 +14,11 @@ The shell script gdb/testsuite/gdb.stabs
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: somsolib.c
===================================================================
RCS file: /cvs/src/src/gdb/somsolib.c,v
retrieving revision 1.30
diff -u -p -p -r1.30 somsolib.c
--- somsolib.c 7 Feb 2004 23:13:47 -0000 1.30
+++ somsolib.c 3 Jun 2004 07:24:09 -0000
@@ -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);
}
--
Randolph Chung
Debian GNU/Linux Developer, hppa/ia64 ports
http://www.tausq.org/
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [patch/gdb-6.1] Backport fix for hpux C compiler problem
2004-06-03 7:31 [patch/gdb-6.1] Backport fix for hpux C compiler problem Randolph Chung
@ 2004-06-04 16:24 ` Andrew Cagney
0 siblings, 0 replies; 2+ messages in thread
From: Andrew Cagney @ 2004-06-04 16:24 UTC (permalink / raw)
To: Randolph Chung; +Cc: gdb-patches, Michael Elizabeth Chastain
> This fixes a build problem on hpux2.0w-hp-hpux11.00 when using the HP
> ANSI C compiler. It was committed to the branch earlier. Would like to
> get this into the 6.1 respin.
>
> Should be "obvious", but as this is for a stable release i'll just
> double check with you all before i check this in, ok? :-)
>
> As I mentioned in feedback to PR build/1458, I think that bug is
> resolved, partially via this fix.
>
> thanks,
> randolph
>
> 2004-06-03 Randolph Chung <tausq@debian.org>
>
> Fix PR build/1458
> * 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.
Ok for 6.1.
Andrew
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-06-04 16:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-06-03 7:31 [patch/gdb-6.1] Backport fix for hpux C compiler problem Randolph Chung
2004-06-04 16:24 ` Andrew Cagney
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox