The GDB 4.8 features are: * Guile scripting support. * Python scripting enhancements. * New commands: ** guile ** guile-repl ** info auto-load guile-scripts [REGEXP] * New options: ** maint ada set ignore-descriptive-types (on|off) ** maint set target-async (on|off) ** set|show auto-load guile-scripts (on|off) ** set|show auto-connect-native-target ** set|show guile print-stack (none|message|full) ** set|show mi-async (on|off) ** set|show print symbol-loading (off|brief|full) ** set|show record btrace replay-memory-access (read-only|read-write) * Remote Protocol: ** The qXfer:btrace:read packet supports a new annex 'delta'. * GDB/MI: ** A new option "-gdb-set mi-async" replaces "-gdb-set target-async". * New target configurations: ** PowerPC64 GNU/Linux little-endian * btrace enhancements: ** The btrace record target now supports the 'record goto' command. ** The btrace record target supports limited reverse execution and replay. * ISO C99 variable length automatic arrays support. * It is no longer required to "set target-async on" in order to use background execution commands (e.g., "c&", "s&", etc.). OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gdb?expand=0&rev=102
43 lines
1.8 KiB
Diff
43 lines
1.8 KiB
Diff
Re: [PATCH 04/23] vla: make dynamic fortran arrays functional.
|
|
https://sourceware.org/ml/gdb-patches/2014-06/msg00570.html
|
|
|
|
Index: gdb-7.7.90.20140627/gdb/valarith.c
|
|
===================================================================
|
|
--- gdb-7.7.90.20140627.orig/gdb/valarith.c 2014-07-07 20:44:03.136394525 +0200
|
|
+++ gdb-7.7.90.20140627/gdb/valarith.c 2014-07-07 20:45:41.588536459 +0200
|
|
@@ -195,10 +195,17 @@ value_subscripted_rvalue (struct value *
|
|
struct type *array_type = check_typedef (value_type (array));
|
|
struct type *elt_type = check_typedef (TYPE_TARGET_TYPE (array_type));
|
|
unsigned int elt_size = TYPE_LENGTH (elt_type);
|
|
- unsigned int elt_offs = longest_to_int (index - lowerbound);
|
|
+ unsigned int elt_offs;
|
|
LONGEST elt_stride = TYPE_BYTE_STRIDE (TYPE_INDEX_TYPE (array_type));
|
|
struct value *v;
|
|
|
|
+ if (TYPE_NOT_ASSOCIATED (array_type))
|
|
+ error (_("no such vector element because not associated"));
|
|
+ if (TYPE_NOT_ALLOCATED (array_type))
|
|
+ error (_("no such vector element because not allocated"));
|
|
+
|
|
+ elt_offs = longest_to_int (index - lowerbound);
|
|
+
|
|
if (elt_stride > 0)
|
|
elt_offs *= elt_stride;
|
|
else if (elt_stride < 0)
|
|
@@ -212,14 +219,7 @@ value_subscripted_rvalue (struct value *
|
|
|
|
if (index < lowerbound || (!TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED (array_type)
|
|
&& elt_offs >= TYPE_LENGTH (array_type)))
|
|
- {
|
|
- if (TYPE_NOT_ASSOCIATED (array_type))
|
|
- error (_("no such vector element because not associated"));
|
|
- else if (TYPE_NOT_ALLOCATED (array_type))
|
|
- error (_("no such vector element because not allocated"));
|
|
- else
|
|
- error (_("no such vector element"));
|
|
- }
|
|
+ error (_("no such vector element"));
|
|
|
|
if (VALUE_LVAL (array) == lval_memory && value_lazy (array))
|
|
v = allocate_value_lazy (elt_type);
|