This is the mail archive of the gdb-patches@sourceware.org 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]
Other format: [Raw text]

[RFA] set PROTOTYPED flag for pascal functions in dwarf2read.c


  According to Jonas Maebe, all pascal functions are
prototyped (as are C++ and Java functions).
  I did not find any code that really uses the fact
that a function is prototyped, but I am willing to
commit this after approval by dwarf2 maintainers
so that I can close one more bug report...


Pierre Muller

2007-09-26  Pierre Muller  <muller@ics.u-strasbg.fr>

        * Fix PR pascal/2231
        dwarf2read.c (read_subroutine_type):
        All pascal functions are prototyped.


Index: dwarf2read.c
===================================================================
RCS file: /cvs/src/src/gdb/dwarf2read.c,v
retrieving revision 1.231
diff -u -p -r1.231 dwarf2read.c
--- dwarf2read.c        5 Sep 2007 00:51:48 -0000       1.231
+++ dwarf2read.c        26 Sep 2007 12:38:19 -0000
@@ -4744,11 +4744,12 @@ read_subroutine_type (struct die_info *d
   type = die_type (die, cu);
   ftype = make_function_type (type, (struct type **) 0);

-  /* All functions in C++ and Java have prototypes.  */
+  /* All functions in C++, Pascal and Java have prototypes.  */
   attr = dwarf2_attr (die, DW_AT_prototyped, cu);
   if ((attr && (DW_UNSND (attr) != 0))
       || cu->language == language_cplus
-      || cu->language == language_java)
+      || cu->language == language_java
+      || cu->language == language_pascal)
     TYPE_FLAGS (ftype) |= TYPE_FLAG_PROTOTYPED;

   if (die->child != NULL)




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