2000-08-09 Michael Snyder <msnyder@cleaver.cygnus.com>
authorMichael Snyder <msnyder@vmware.com>
Wed, 9 Aug 2000 20:09:01 +0000 (20:09 +0000)
committerMichael Snyder <msnyder@vmware.com>
Wed, 9 Aug 2000 20:09:01 +0000 (20:09 +0000)
        * blockframe.c (sigtramp_saved_pc): Use dynamic allocation,
        since TARGET_PTR_BIT is no longer a constant (MULTI_ARCH).
        * irix4-nat.c (get_longjmp_target): Ditto.
        * irix5-nat.c (get_longjmp_target): Ditto.
        * jv-valprint.c (java_value_print): Ditto.
        * m3-nat.c (get_cprocs):            Ditto.
        * m68k-tdep.c (get_longjmp_target): Ditto.
        * mips-nat.c  (get_longjmp_target): Ditto.
        * mipsv4-nat.c(get_longjmp_target): Ditto.
        * pa64solib.c (read_dynamic_info):  Ditto.
        * solib.c (elf_locate_base):        Ditto.

gdb/ChangeLog
gdb/blockframe.c
gdb/irix4-nat.c
gdb/irix5-nat.c
gdb/jv-valprint.c
gdb/m3-nat.c
gdb/m68k-tdep.c
gdb/mips-nat.c
gdb/mipsv4-nat.c
gdb/pa64solib.c
gdb/solib.c

index df64e9f..fe38e8a 100644 (file)
@@ -1,3 +1,17 @@
+2000-08-09  Michael Snyder  <msnyder@cleaver.cygnus.com>
+
+       * blockframe.c (sigtramp_saved_pc): Use dynamic allocation, 
+       since TARGET_PTR_BIT is no longer a constant (MULTI_ARCH).
+       * irix4-nat.c (get_longjmp_target): Ditto.
+       * irix5-nat.c (get_longjmp_target): Ditto.
+       * jv-valprint.c (java_value_print): Ditto.
+       * m3-nat.c (get_cprocs):            Ditto.
+       * m68k-tdep.c (get_longjmp_target): Ditto.
+       * mips-nat.c  (get_longjmp_target): Ditto.
+       * mipsv4-nat.c(get_longjmp_target): Ditto.
+       * pa64solib.c (read_dynamic_info):  Ditto.
+       * solib.c (elf_locate_base):        Ditto.
+
 Mon Aug  7 23:21:22 2000  David Taylor  <taylor@texas.cygnus.com>
 
        * TODO: remove build_parse entry.
index 8e5c18c..2352cdf 100644 (file)
@@ -950,10 +950,11 @@ CORE_ADDR
 sigtramp_saved_pc (struct frame_info *frame)
 {
   CORE_ADDR sigcontext_addr;
-  char buf[TARGET_PTR_BIT / TARGET_CHAR_BIT];
+  char *buf;
   int ptrbytes = TARGET_PTR_BIT / TARGET_CHAR_BIT;
   int sigcontext_offs = (2 * TARGET_INT_BIT) / TARGET_CHAR_BIT;
 
+  buf = alloca (ptrbytes);
   /* Get sigcontext address, it is the third parameter on the stack.  */
   if (frame->next)
     sigcontext_addr = read_memory_integer (FRAME_ARGS_ADDRESS (frame->next)
index 8e397b8..6c3fdda 100644 (file)
@@ -145,9 +145,10 @@ fill_fpregset (fpregset_t *fpregsetp, int regno)
 int
 get_longjmp_target (CORE_ADDR *pc)
 {
-  char buf[TARGET_PTR_BIT / TARGET_CHAR_BIT];
+  char *buf;
   CORE_ADDR jb_addr;
 
+  buf = alloca (TARGET_PTR_BIT / TARGET_CHAR_BIT);
   jb_addr = read_register (A0_REGNUM);
 
   if (target_read_memory (jb_addr + JB_PC * JB_ELEMENT_SIZE, buf,
index dcef6ad..b8ca2a5 100644 (file)
@@ -165,9 +165,10 @@ fill_fpregset (fpregset_t *fpregsetp, int regno)
 int
 get_longjmp_target (CORE_ADDR *pc)
 {
-  char buf[TARGET_PTR_BIT / TARGET_CHAR_BIT];
+  char *buf;
   CORE_ADDR jb_addr;
 
+  buf = alloca (TARGET_PTR_BIT / TARGET_CHAR_BIT);
   jb_addr = read_register (A0_REGNUM);
 
   if (target_read_memory (jb_addr + JB_PC * JB_ELEMENT_SIZE, buf,
index 6fd1691..f0614fa 100644 (file)
@@ -96,8 +96,9 @@ java_value_print (value_ptr val, struct ui_file *stream, int format,
 
          while (i < length && things_printed < print_max)
            {
-             char buf[TARGET_PTR_BIT / HOST_CHAR_BIT];
+             char *buf;
 
+             buf = alloca (TARGET_PTR_BIT / HOST_CHAR_BIT);
              fputs_filtered (", ", stream);
              wrap_here (n_spaces (2));
 
index 50f7b71..1472b2c 100644 (file)
@@ -2460,11 +2460,12 @@ get_cprocs (void)
   gdb_thread_t cproc_head;
   gdb_thread_t cproc_copy;
   CORE_ADDR their_cprocs;
-  char *buf[TARGET_PTR_BIT / HOST_CHAR_BIT];
+  char *buf;
   char *name;
   cthread_t cthread;
   CORE_ADDR symaddr;
 
+  buf = alloca (TARGET_PTR_BIT / HOST_CHAR_BIT);
   symaddr = lookup_address_of_variable ("cproc_list");
 
   if (!symaddr)
index c15a1e8..8093f8c 100644 (file)
@@ -646,9 +646,10 @@ fill_fpregset (fpregset_t *fpregsetp, int regno)
 int
 get_longjmp_target (CORE_ADDR *pc)
 {
-  char buf[TARGET_PTR_BIT / TARGET_CHAR_BIT];
+  char *buf;
   CORE_ADDR sp, jb_addr;
 
+  buf = alloca (TARGET_PTR_BIT / TARGET_CHAR_BIT);
   sp = read_register (SP_REGNUM);
 
   if (target_read_memory (sp + SP_ARG0,                /* Offset of first arg on stack */
index b9d20b7..cf8a31a 100644 (file)
@@ -137,8 +137,9 @@ int
 get_longjmp_target (CORE_ADDR *pc)
 {
   CORE_ADDR jb_addr;
-  char buf[TARGET_PTR_BIT / TARGET_CHAR_BIT];
+  char *buf;
 
+  buf = alloca (TARGET_PTR_BIT / TARGET_CHAR_BIT);
   jb_addr = read_register (A0_REGNUM);
 
   if (target_read_memory (jb_addr + JB_PC * JB_ELEMENT_SIZE, buf,
index d63e043..cca4006 100644 (file)
@@ -143,9 +143,10 @@ fill_fpregset (fpregset_t *fpregsetp, int regno)
 int
 get_longjmp_target (CORE_ADDR *pc)
 {
-  char buf[TARGET_PTR_BIT / TARGET_CHAR_BIT];
+  char *buf;
   CORE_ADDR jb_addr;
 
+  buf = alloca (TARGET_PTR_BIT / TARGET_CHAR_BIT);
   jb_addr = read_register (A0_REGNUM);
 
   if (target_read_memory (jb_addr + _JB_PC * JB_ELEMENT_SIZE, buf,
index 7a78136..459302a 100644 (file)
@@ -1019,8 +1019,9 @@ read_dynamic_info (asection *dyninfo_sect, dld_cache_t *dld_cache_p)
       Elf64_Dyn *x_dynp = (Elf64_Dyn*)buf;
       Elf64_Sxword dyn_tag;
       CORE_ADDR        dyn_ptr;
-      char pbuf[TARGET_PTR_BIT / HOST_CHAR_BIT];
+      char *pbuf;
 
+      pbuf = alloca (TARGET_PTR_BIT / HOST_CHAR_BIT);
       dyn_tag = bfd_h_get_64 (symfile_objfile->obfd, 
                              (bfd_byte*) &x_dynp->d_tag);
 
index a957411..d83c95a 100644 (file)
@@ -762,8 +762,9 @@ elf_locate_base (void)
 #ifdef DT_MIPS_RLD_MAP
          else if (dyn_tag == DT_MIPS_RLD_MAP)
            {
-             char pbuf[TARGET_PTR_BIT / HOST_CHAR_BIT];
+             char *pbuf;
 
+             pbuf = alloca (TARGET_PTR_BIT / HOST_CHAR_BIT);
              /* DT_MIPS_RLD_MAP contains a pointer to the address
                 of the dynamic link structure.  */
              dyn_ptr = bfd_h_get_32 (exec_bfd,