aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/ChangeLog14
-rw-r--r--gdb/blockframe.c3
-rw-r--r--gdb/irix4-nat.c3
-rw-r--r--gdb/irix5-nat.c3
-rw-r--r--gdb/jv-valprint.c3
-rw-r--r--gdb/m3-nat.c3
-rw-r--r--gdb/m68k-tdep.c3
-rw-r--r--gdb/mips-nat.c3
-rw-r--r--gdb/mipsv4-nat.c3
-rw-r--r--gdb/pa64solib.c3
-rw-r--r--gdb/solib.c3
11 files changed, 34 insertions, 10 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index df64e9f..fe38e8a 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -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.
diff --git a/gdb/blockframe.c b/gdb/blockframe.c
index 8e5c18c..2352cdf 100644
--- a/gdb/blockframe.c
+++ b/gdb/blockframe.c
@@ -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)
diff --git a/gdb/irix4-nat.c b/gdb/irix4-nat.c
index 8e397b8..6c3fdda 100644
--- a/gdb/irix4-nat.c
+++ b/gdb/irix4-nat.c
@@ -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,
diff --git a/gdb/irix5-nat.c b/gdb/irix5-nat.c
index dcef6ad..b8ca2a5 100644
--- a/gdb/irix5-nat.c
+++ b/gdb/irix5-nat.c
@@ -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,
diff --git a/gdb/jv-valprint.c b/gdb/jv-valprint.c
index 6fd1691..f0614fa 100644
--- a/gdb/jv-valprint.c
+++ b/gdb/jv-valprint.c
@@ -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));
diff --git a/gdb/m3-nat.c b/gdb/m3-nat.c
index 50f7b71..1472b2c 100644
--- a/gdb/m3-nat.c
+++ b/gdb/m3-nat.c
@@ -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)
diff --git a/gdb/m68k-tdep.c b/gdb/m68k-tdep.c
index c15a1e8..8093f8c 100644
--- a/gdb/m68k-tdep.c
+++ b/gdb/m68k-tdep.c
@@ -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 */
diff --git a/gdb/mips-nat.c b/gdb/mips-nat.c
index b9d20b7..cf8a31a 100644
--- a/gdb/mips-nat.c
+++ b/gdb/mips-nat.c
@@ -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,
diff --git a/gdb/mipsv4-nat.c b/gdb/mipsv4-nat.c
index d63e043..cca4006 100644
--- a/gdb/mipsv4-nat.c
+++ b/gdb/mipsv4-nat.c
@@ -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,
diff --git a/gdb/pa64solib.c b/gdb/pa64solib.c
index 7a78136..459302a 100644
--- a/gdb/pa64solib.c
+++ b/gdb/pa64solib.c
@@ -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);
diff --git a/gdb/solib.c b/gdb/solib.c
index a957411..d83c95a 100644
--- a/gdb/solib.c
+++ b/gdb/solib.c
@@ -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,