pascal/2231: dwarf2read.c should always set TYPE_FLAG_PROTOTYPED for Pascal functions

jonas@freepascal.org jonas@freepascal.org
Sun Feb 18 12:18:00 GMT 2007


>Number:         2231
>Category:       pascal
>Synopsis:       dwarf2read.c should always set TYPE_FLAG_PROTOTYPED for Pascal functions
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          patch
>Submitter-Id:   net
>Arrival-Date:   Sun Feb 18 12:18:01 GMT 2007
>Closed-Date:
>Last-Modified:
>Originator:     jonas@freepascal.org
>Release:        GNU gdb 6.3.50.20050815-cvs+Apple patches and CVS head 2007/02/18
>Organization:
>Environment:
Mac OS X 10.4.8
>Description:
dwarf2read does not automatically set TYPE_FLAG_PROTOTYPED for functions declared in Pascal language scope, although functions must always be prototyped in Pascal
>How-To-Repeat:
Load any program with functions compiled by FPC using dwarf2 debugging info. I do not know the exact consequences of the fact that this flag is not set.
>Fix:
Index: dwarf2read.c
===================================================================
RCS file: /cvs/src/src/gdb/dwarf2read.c,v
retrieving revision 1.215
diff -u -r1.215 dwarf2read.c
--- dwarf2read.c        12 Feb 2007 15:19:31 -0000      1.215
+++ dwarf2read.c        18 Feb 2007 12:00:41 -0000
@@ -4727,10 +4727,11 @@
   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_pascal
       || cu->language == language_java)
     TYPE_FLAGS (ftype) |= TYPE_FLAG_PROTOTYPED;
 
>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the Gdb-prs mailing list