Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* Patches to improve Fortran support
@ 2003-01-15 21:32 David Lecomber
  2003-05-16 11:24 ` [PATCH] Improvements to " David Lecomber
  2003-05-16 11:25 ` [PATCH] Large array fix for Fortran David Lecomber
  0 siblings, 2 replies; 6+ messages in thread
From: David Lecomber @ 2003-01-15 21:32 UTC (permalink / raw)
  To: gdb-patches

[-- Attachment #1: Type: text/plain, Size: 416 bytes --]

I have attached one of the wrong patch files to my email of Jan 13.

The first attached patch only cured the tendency of gdb to allocate -ve large
amounts of memory, which was my first attempt at curing the fortran array problem.
That was more curing the symptom than the cause, and doesn't work fully anyway..

The new attachment is the fix to the source of the problem.  Apologies for the 
confusion.

Cheers
David

[-- Attachment #2: gdb.array-ptr-patch --]
[-- Type: text/plain, Size: 1291 bytes --]

*** ../../TMP/gdb-5.3/gdb/eval.c	Sun Dec 15 22:29:59 2002
--- eval.c	Sun Dec 15 22:28:41 2002
*************** evaluate_subexp_standard (struct type *e
*** 1383,1392 ****
  	  offset_item =
  	    array_size_array[i] * offset_item + subscript_array[i];
  
- 	/* Construct a value node with the value of the offset */
- 
- 	arg2 = value_from_longest (builtin_type_f_integer, offset_item);
- 
  	/* Let us now play a dirty trick: we will take arg1 
  	   which is a value node pointing to the topmost level
  	   of the multidimensional array-set and pretend
--- 1383,1388 ----
*************** evaluate_subexp_standard (struct type *e
*** 1395,1401 ****
  	   returns the correct type value */
  
  	VALUE_TYPE (arg1) = tmp_type;
! 	return value_ind (value_add (value_coerce_array (arg1), arg2));
        }
  
      case BINOP_LOGICAL_AND:
--- 1391,1405 ----
  	   returns the correct type value */
  	
  	VALUE_TYPE (arg1) = tmp_type;
! 
! 	f77_get_dynamic_lowerbound (tmp_type, &lower);
! 
! 	/* Construct a value node with the value of the offset */
! 	/* lower will get subtracted off in value_subscript, hence add it here */
! 
! 	arg2 = value_from_longest (builtin_type_f_integer, offset_item + lower);
! 
! 	return value_subscript(arg1, arg2);
        }
  
      case BINOP_LOGICAL_AND:

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2003-05-16 16:08 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-01-15 21:32 Patches to improve Fortran support David Lecomber
2003-05-16 11:24 ` [PATCH] Improvements to " David Lecomber
2003-05-16 15:25   ` Daniel Jacobowitz
2003-05-16 16:08   ` David Carlton
2003-05-16 11:25 ` [PATCH] Large array fix for Fortran David Lecomber
2003-05-16 15:32   ` Daniel Jacobowitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox