]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
2002-01-07 Michael Snyder <msnyder@redhat.com>
authorMichael Snyder <msnyder@vmware.com>
Tue, 8 Jan 2002 02:09:31 +0000 (02:09 +0000)
committerMichael Snyder <msnyder@vmware.com>
Tue, 8 Jan 2002 02:09:31 +0000 (02:09 +0000)
* cp-valprint.c (cp_print_value): FIXME comment, alloca size.
* p-valprint.c (pascal_object_print_value): Ditto.
* somread.c (som_symtab_read): Ditto.
* symfile.c (simple_free_overlay_region_table): Ditto.
* valops.c (value_assign): Ditto.

gdb/ChangeLog
gdb/cp-valprint.c
gdb/p-valprint.c
gdb/somread.c
gdb/symfile.c
gdb/valops.c

index 1ab3eb4e86dd47a9da2d47bf8c915c430b696c85..b1f4539b9bc12cc91fe74e44b173de49d8fae1af 100644 (file)
@@ -1,5 +1,11 @@
 2002-01-07  Michael Snyder  <msnyder@redhat.com>
 
+       * cp-valprint.c (cp_print_value): FIXME comment, alloca size.
+       * p-valprint.c (pascal_object_print_value): Ditto.
+       * somread.c (som_symtab_read): Ditto.
+       * symfile.c (simple_free_overlay_region_table): Ditto.
+       * valops.c (value_assign): Ditto.
+
        * tracepoint.c (tracepoint_save_command): From Klee Dienes --
        use tilde_expand and strerror for opening save-tracepoints file.
 
index 567e0abed358d0a0b5a2c37d04d1331f69611cd6..669203121c8c44cd4a8236470822738f4bff1a78 100644 (file)
@@ -570,6 +570,7 @@ cp_print_value (struct type *type, struct type *real_type, char *valaddr,
                  && ((boffset + offset) < 0
                      || (boffset + offset) >= TYPE_LENGTH (type)))
                {
+                 /* FIXME (alloca): unsafe if baseclass is really really large. */
                  base_valaddr = (char *) alloca (TYPE_LENGTH (baseclass));
                  if (target_read_memory (address + offset + boffset, base_valaddr,
                                          TYPE_LENGTH (baseclass)) != 0)
index 08a862eb2cac07a4f2a5e40740c41603c6888e7e..0b89c727e88750163fb11625b21ed11b74ff7872 100644 (file)
@@ -970,6 +970,7 @@ pascal_object_print_value (struct type *type, char *valaddr, CORE_ADDR address,
 
       if (boffset != -1 && (boffset < 0 || boffset >= TYPE_LENGTH (type)))
        {
+         /* FIXME (alloc): not safe is baseclass is really really big. */
          base_valaddr = (char *) alloca (TYPE_LENGTH (baseclass));
          if (target_read_memory (address + boffset, base_valaddr,
                                  TYPE_LENGTH (baseclass)) != 0)
index aba3323d3dfaa918cdc70695749786b1bc5a5100..bab25d4d8026b5bb988cd90933defaedb407a1b4 100644 (file)
@@ -99,12 +99,14 @@ som_symtab_read (bfd *abfd, struct objfile *objfile,
 
   number_of_symbols = bfd_get_symcount (abfd);
 
+  /* FIXME (alloca): could be quite large. */
   buf = alloca (symsize * number_of_symbols);
   bfd_seek (abfd, obj_som_sym_filepos (abfd), SEEK_SET);
   val = bfd_bread (buf, symsize * number_of_symbols, abfd);
   if (val != symsize * number_of_symbols)
     error ("Couldn't read symbol dictionary!");
 
+  /* FIXME (alloca): could be quite large. */
   stringtab = alloca (obj_som_stringtab_size (abfd));
   bfd_seek (abfd, obj_som_str_filepos (abfd), SEEK_SET);
   val = bfd_bread (stringtab, obj_som_stringtab_size (abfd), abfd);
index d999cf9349f4ede7f67e2a50c7bb54077e286088..c0b9d3e786ae42331d348b804a84e93b9f0c0dc0 100644 (file)
@@ -3009,6 +3009,7 @@ simple_free_overlay_region_table (void)
 static void
 read_target_long_array (CORE_ADDR memaddr, unsigned int *myaddr, int len)
 {
+  /* FIXME (alloca): Not safe if array is very large. */
   char *buf = alloca (len * TARGET_LONG_BYTES);
   int i;
 
index cb302226bb1af194d4c7f1f7372ff373e1d55763..f211753c4a76a4552861dcff9866335949ab447c 100644 (file)
@@ -697,6 +697,7 @@ value_assign (struct value *toval, struct value *fromval)
        int amount_copied;
 
        /* Make the buffer large enough in all cases.  */
+       /* FIXME (alloca): Not safe for very large data types. */
        char *buffer = (char *) alloca (amount_to_copy
                                        + sizeof (LONGEST)
                                        + MAX_REGISTER_RAW_SIZE);