This is the mail archive of the gdb-patches@sources.redhat.com 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] |
I have two patches that are fairly useful to basic Fortran usage for gdb-5.2 and gdb-5.3 Problem 1: Fortran array access problems.. Presently gdb allocates an entire copy of the array and then fills it, before looking for the required value. This patch changes the behaviour to be more like the C code and just allocates and copies the value required.. This solves a pretty major problem where an array is passed as a parameter to a function with an underspecified dimension (ie. real (10:*) ) because the * is translated to '-1' which then completely screws up the allocation of memory.. This previously would mean that you couldn't access data in a function where the array was passed like this; it also eliminates the SEG faults caused when it previously tried to allocate a negative amount of memory (ie. sizeof(real) * 10 * -1)... Problem 2: printing an array prints too many elements for multi-dimensional arrays. This patch limits the number of elements printed to the same number that a single-dimensioned array prints. NB. similar patch required for C, but this is less frequently used. David
Attachment:
gdb.array-arg-expression-eval-patch
Description: Text document
Attachment:
gdb.huge-array-patch
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |