This is the mail archive of the gdb-patches@sources.redhat.com 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]

[PATCH] Fix compile errors/warnings in ia64-tdep.c


I've just committed the patch below.  These changes fix problems
encountered in compiling ia64-tdep.c with IBM's compiler.

	* ia64-tdep.c (slotN_contents, replace_slotN_contents): Change
	type of ``bundle'' from unsigned char * to char *.
	(ia64_get_saved_register): Use alloca() to allocate register
	buffers.

Index: ia64-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/ia64-tdep.c,v
retrieving revision 1.16
diff -u -p -r1.16 ia64-tdep.c
--- ia64-tdep.c	2001/03/22 02:11:11	1.16
+++ ia64-tdep.c	2001/03/27 02:26:38
@@ -432,7 +432,7 @@ replace_bit_field (char *bundle, long lo
    and instruction bundle */
 
 static long long
-slotN_contents (unsigned char *bundle, int slotnum)
+slotN_contents (char *bundle, int slotnum)
 {
   return extract_bit_field (bundle, 5+41*slotnum, 41);
 }
@@ -440,7 +440,7 @@ slotN_contents (unsigned char *bundle, i
 /* Store an instruction in an instruction bundle */
 
 static void
-replace_slotN_contents (unsigned char *bundle, long long instr, int slotnum)
+replace_slotN_contents (char *bundle, long long instr, int slotnum)
 {
   replace_bit_field (bundle, instr, 5+41*slotnum, 41);
 }
@@ -1165,7 +1165,7 @@ ia64_get_saved_register (char *raw_buffe
     }
   else if (IA64_PR0_REGNUM <= regnum && regnum <= IA64_PR63_REGNUM)
     {
-      char pr_raw_buffer[MAX_REGISTER_RAW_SIZE];
+      char *pr_raw_buffer = alloca (MAX_REGISTER_RAW_SIZE);
       int  pr_optim;
       enum lval_type pr_lval;
       CORE_ADDR pr_addr;
@@ -1188,7 +1188,7 @@ ia64_get_saved_register (char *raw_buffe
     }
   else if (IA64_NAT0_REGNUM <= regnum && regnum <= IA64_NAT31_REGNUM)
     {
-      char unat_raw_buffer[MAX_REGISTER_RAW_SIZE];
+      char *unat_raw_buffer = alloca (MAX_REGISTER_RAW_SIZE);
       int  unat_optim;
       enum lval_type unat_lval;
       CORE_ADDR unat_addr;


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