• R/O
  • HTTP
  • SSH
  • HTTPS

Liste der Commits

Tags
Keine Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

GNU Binutils with patches for OS216


users/bheckel/fortran-vla-strings
RSS
Rev. Zeit Autor
0ad7d8d users/bheckel/fortran-vla-strings 2016-09-07 19:19:36 Bernhard Heckel

fort_dyn_array: Fortran dynamic string support

This patch changes the semantic of the Dwarf string length
attribute to reflect the standard as well as enables
correct string length calculation of dynamic strings. Add
tests for varous dynamic string evaluations.

Old:
(gdb) p my_dyn_string
Cannot access memory at address 0x605fc0

New:
(gdb) p *my_dyn_string
$1 = 'foo'

gdb/Changlog:
* dwarf2read.c (read_tag_string_type): changed
semantic of DW_AT_string_length to be able to
handle Dwarf blocks as well. Support for
DW_AT_byte_length added to get correct length
if specified in combination with
DW_AT_string_length.
(attr_to_dynamic_prop): added
functionality to add Dwarf operators to baton
data attribute. Added post values to baton
as required by the string evaluation case.
(read_subrange_type): Adapt caller.
(set_die_type): Adapt caller.
(add_post_values_to_baton): New function.
* gdbtypes.c (resolve_dynamic_type): Add
conditions to support string types.
(resolve_dynamic_array): Add conditions for dynamic
strings and create a new string type.
(is_dynamic_type): Follow pointer if a string type
was detected, as Fortran strings are represented
as pointers to strings internally.

gdb/testsuite/Changelog:
* vla-strings.f90: New file.
* vla-strings.exp: New file.

Change-Id: I7d7f47c7a4900a7fdb51102032455b53d60e60d7

4c60f96 2016-09-07 19:19:36 Bernhard Heckel

Fortran: Testsuite, add cyclic pointers.

2016-05-25 Bernhard Heckel <bernhard.heckel@intel.com>

gdb/testsuite/Changelog:
* pointers.f90: Add cylic pointers.
* pointers.exp: Add print of cyclic pointers.

Change-Id: Ic3b6187c5980fd6c37e2e94787f8321e5b7f2d75

f2ba04d 2016-09-07 19:19:34 Bernhard Heckel

Resolve dynamic target types of pointers.

When dereferencing pointers to dynamic target types,
resolve the target type.

2016-06-30 Bernhard Heckel <bernhard.heckel@intel.com>

gdb/Changelog:
* NEWS: Added entry.
* c-valprint.c (c_print_val): Resolve dynamic target types.
* valops.c (value_ind): Resolve dynamic target types.
* valprint.c (check_printable): Don't shortcut not associated
pointers.

gdb/Testsuite/Changelog:
* pointers.f90: Added pointer to dynamic types.
* gdb.fortran/pointers.exp: New.

Change-Id: I998d4da4a5ba4899b8cb2115576f44efa741e698

7ad76f8 2016-09-07 19:18:45 Bernhard Heckel

Fortran: Typeprint, fix dangling types.

Show the type of not-allocated and/or not-associated types
as this is known. For array types and pointer to array types
we are going to print the number of ranks.

2016-06-30 Bernhard Heckel <bernhard.heckel@intel.com>

gdb/ChangeLog:
* f-typeprint.c (f_print_type): Don't bypass dangling types.
(f_type_print_varspec_suffix): Add print_rank parameter.
(f_type_print_varspec_suffix): Print ranks of array types
in case they dangling.
(f_type_print_base): Add print_rank parameter.

gdb/Testsuite/ChangeLog:
* gdb.fortran/pointers.f90: New.
* gdb.fortran/print_type.exp: New.
* gdb.fortran/vla-ptype.exp: Adapt expected results.
* gdb.fortran/vla-type.exp: Likewise.
* gdb.fortran/vla-value.exp: Likewise.
* gdb.mi/mi-vla-fortran.exp: Likewise.

Change-Id: Ib55f28b4092cf88e34918449a2ebb6e5daafe512

d2fd5fe 2016-07-12 15:19:34 Bernhard Heckel

Typeprint: Resolve any dynamic target type of a pointer.

Before continuing with language specific type printing
we have to resolve the target type of a pointer
as we might wanna print more details of the target
like the dimension of an array. We have to resolve it here
as we don't have any address information later on.

2016-07-08 Bernhard Heckel <bernhard.heckel@intel.com>

gdb/Changelog:
* typeprint.c (whatis_exp): Resolve dynamic target type
of pointers.

gdb/Testsuite/Changelog:
* gdb.cp/vla-cxx.cc: Added pointer to dynamic type.
* gdb.cp/vla-cxx.exp: Test pointer to dynamic type.

Change-Id: Idff0d6dd0eab3125b45d470a12b5e66b392e42c3

a879b25 2016-07-12 15:19:34 Bernhard Heckel

Fortran: Resolve dynamic properties of pointer types.

In Fortran a pointer may have a dynamic associated property.

2016-07-08 Bernhard Heckel <bernhard.heckel@intel.com>

gdb/Changelog:
* gdbtypes.c (resolve_dynamic_types_internal): Resolve pointer types.
(resolve_dynamic_pointer): New.

Change-Id: Ie4b9d6397cfa089ee2e0db02beb18415a751c1c0

26e156d 2016-07-12 15:19:34 Bernhard Heckel

Fortran: Testsuite, fix differences in type naming.

Continued on 0c13f7e559afe5f973a59311b0e401296c48d96c
(fortran: Testsuite, fix different type naming across compilers).

2016-06-08 Bernhard Heckel <bernhard.heckel@intel.com>

gdb/Testsuite/Changelog:
* gdb.fortran/vla-value.exp: Use type names defined in libfortran.
* gdb.mi/mi-var-child-f.exp: Likewise.
* gdb.mi/mi-vla-fortran.exp: Likewise.

Change-Id: I7ee94587a992add27fec77c7726f9a69c8fdf373

3689797 2016-07-11 09:00:19 GDB Administrator

Automatic date update in version.in

fde8e81 2016-07-10 09:00:20 GDB Administrator

Automatic date update in version.in

32a0481 2016-07-09 16:23:33 Alan Modra

PR20337, Objdump makes poor choice of symbols

binutils/
PR binutils/20337
* objdump.c (compare_symbols): For ELF, sort same value/type
symbols according to size.
ld/
* testsuite/ld-powerpc/elfv2exe.d: Update.

1157523 2016-07-09 09:00:21 GDB Administrator

Automatic date update in version.in

458653a 2016-07-09 03:53:31 jamesbowman

FT32: Correct 32-bit reloc for BFD_RELOC_32

The reloc for BFD_RELOC_32 was using the the 20-bit. This hack causes
problems in gdb. Fixed it to be the proper 32-bit reloc, R_FT32_32.

bfd/ChangeLog:

* elf32-ft32.c (ft32_reloc_map): Use R_FT32_32 for BFD_RELOC_32.

2f831b9 2016-07-09 03:38:35 jamesbowman

FT32: adjust disassembly opcode match fields

Tighten up the opcode match fields for conditional jump and call
instructions so more general opcodes don't match them in disassembly.

opcodes/ChangeLog:

* opcodes/ft32-opc.c (ft32_opc_info): Correct mask for "callc"
and "jmpc".

b8bca85 2016-07-08 22:39:07 Maciej W. Rozycki

MIPS/GAS: Remove extraneous `install_insn' call from `append_insn'

Complement:

commit 1e91584932efd70020c8c98037d0cb93a0552a20
Author: Richard Sandiford <rdsandiford@googlemail.com>
Date: Wed Mar 9 09:17:02 2005 +0000

<https://sourceware.org/ml/binutils/2005-03/msg00217.html>, ("Rework
MIPS nop-insertion code, add -mfix-vr4130 [5/11]"), and remove a call to
`install_insn' from `append_insn', which as from that change has become
redundant. This is because such a call, to place an instruction's bit
pattern in output, is already made from `move_insn', called from
`add_relaxed_insn' or `add_fixed_insn' as appropriate, either of which
now always is and has to be made from `append_insn' before the repeated
call to `install_insn' is made. Previously the place where this second
invocation is made was the only one where the output stream was updated,
although the update was made inline rather than with a function call.

Remove the repeated call then, to reclaim some performance.

gas/
* config/tc-mips.c (append_insn): Remove extraneous
`install_insn' call.

fc1b277 2016-07-08 09:00:20 GDB Administrator

Automatic date update in version.in

41c977a 2016-07-08 02:07:36 Walfred Tedeschi

[obv] Fix broken build on Fedora 23.

Compiler complains about possible utilization of "symbol" which is member
of lang_def.
Initialization was added.

2016-07-07 Walfred Tedeschi <walfred.tedeschi@intel.com>

gdb/ChangeLog:

* cp-namespace.c (cp_lookup_bare_symbol): Initialize
lang_this.symbol.

4f19a0e 2016-07-08 00:33:05 Walfred Tedeschi

Fix of default lookup for "this" symbol.

Using the default lookup for the symbol "this" might lead to segmentation
fault in GDB.
Some languages, e.g. Fortran, use as default lookup routine the C++
routines.
For those languages "this" can be the instance of a class or even the
definition of a class.
When an instance of a class having the name "this" is evaluated
in GDB a segmentation fault was observed.

As example of the issue take into consideration the Fortran code:
type foo
real :: a
type(bar) :: x
character*7 :: b
end type foo
type(foo) :: this

Issue appears when evaluating the variable "this" in GDB.

Within the language definition structure there is a field that represents
the name of the special symbol used for the C++ "this" for the language
being described.
The fix presented here takes into account the aforementioned field. In the
case the aforementioned field is NULL "this" is not represented in the
language described and the lookup should return a null_block_symbol.

Tests: Performed tests with gfortran and ifort.

Reviewed:
https://sourceware.org/ml/gdb-patches/2016-04/msg00068.html

After the commited patch:
https://sourceware.org/ml/gdb-patches/2016-06/msg00364.html
Patch can be applied.

2016-06-16 Walfred Tedeschi <walfred.tedeschi@intel.com>

gdb/ChangeLog:

* cp-namespace.c (cp_lookup_bare_symbol): Use language passed as
parameter to look for the symbol "this".

gdb/testsuite/ChangeLog:

* gdb.fortran/derived-types.exp (result_line, result_line_2):
New variables.
(print this%a, print this%b, print this): New tests.
* gdb.fortran/derived-types.f90 (this): New object and
initialization.

3a5ce95 2016-07-07 10:58:10 jamesbowman

FT32 linker script cleanup

Fix a typo (__PMSIZE was written as __PMSIZE_) and add section alignment
for DATA and BSS.

ld/ChangeLog:

* scripttempl/ft32.sc (__PMSIZE): Correct __PMSIZE_.
(DATA): add ALIGN.
(BSS): add ALIGN

819490e 2016-07-07 09:00:21 GDB Administrator

Automatic date update in version.in

986cf45 2016-07-06 23:18:10 Simon Marchi

gdb.ada/arraydim.exp: Fix directory layout

I forgot to fix this one in the previous commit.

gdb/testsuite/ChangeLog:

* gdb.ada/arraydim.exp: Remove extra directory level in build
directory.

f0464b2 2016-07-06 23:03:15 Simon Marchi

Remove extra output directory level for Ada tests

The output of Ada tests create a layout where the test name
("formatted_ref" in this example) appears twice:

outputs
└── gdb.ada
└── formatted_ref
└── formatted_ref
├── b~formatted_ref.adb
├── b~formatted_ref.ads
├── b~formatted_ref.ali
├── b~formatted_ref.o
├── defs.ali
├── defs.o
├── formatted_ref
├── formatted_ref.ali
└── formatted_ref.o

This causes a problem when testing with the native-gdbserver board, when
the binary has the same name as the test. When gdb_remote_download is
called to upload the compiled binary, the implementation for
native-gdbserver copies it in the standard output directory (in
outputs/gdb.ada/formatted_ref). However, there is already a directory
named formatted_ref in there, so the copy fails and gdbserver isn't able
to load the binary.

This patch bypasses the problem by removing the extra directory level.
The compiled binary will already be in its final location in the
standard output directory, so the copy will effectively be a no-op.

gdb/testsuite/ChangeLog:

* lib/ada.exp: Remove extra directory level in build directory.
* gdb.ada/cond_lang.exp: Likewise.
* gdb.ada/exec_changed.exp: Likewise.
* gdb.ada/lang_switch.exp: Likewise.

fb36c6b 2016-07-06 22:09:40 John Baldwin

Remove extraneous parentheses.

gdb/ChangeLog:

* h8300-tdep.c (h8300_print_register): Remove extraneous parentheses.

db297a6 2016-07-06 22:09:19 John Baldwin

Use unsigned integer constant with left shifts.

This avoids undefined behavior.

gdb/ChangeLog:

* ada-lang.c (ada_unpack_from_contents): Use unsigned constants with
left shifts.

9ca1071 2016-07-06 22:08:43 John Baldwin

Set uses_fp for frames with a valid FP register explicitly.

Since CORE_ADDR is unsigned, the saved FP register is always greater than
or equal to zero. Replace the comparison by explicitly setting uses_fp to
1 for frames with a valid FP register.

gdb/ChangeLog:

* sh64-tdep.c (sh64_analyze_prologue): Set "uses_fp" when setting
the MEDIA_FP_REGNUM register.

d66ff63 2016-07-06 22:08:04 John Baldwin

Remove check for negative size.

Since CORE_ADDR is unsigned, this value can never be negative.

gdb/ChangeLog:

* score-tdep.c (score7_malloc_and_get_memblock): Remove check for
negative size.

ee95032 2016-07-06 21:57:41 John Baldwin

Use 'ptid_t' instead of 'ptid' for fbsd_next_vfork_done's return type.

'ptid' compiles in C++, but not C.

gdb/ChangeLog:
* fbsd-nat.c (fbsd_is_vfork_done_pending): Fix return type.

1040b97 2016-07-06 16:24:35 Yao Qi

[ARM] Fix endless recursion on calculating CPRC candidate

When GDB determines whether type T can be part of candidate for
passing and returning in VFP registers, it calls
arm_vfp_cprc_sub_candidate recursively. However, if type T has
self-reference field, like,

class C
{
static C s;
};

arm_vfp_cprc_sub_candidate won't return. This fix is to skip calling
arm_vfp_cprc_sub_candidate if the field is static.

gdb:

2016-07-06 Yao Qi <yao.qi@linaro.org>

* arm-tdep.c (arm_vfp_cprc_sub_candidate): Don't call
arm_vfp_cprc_sub_candidate for static field.

42d9401 2016-07-06 14:26:21 Manish Goregaokar

Allow subscripting raw pointers

This will be useful for dealing with vectors; regardless of our final solution
for the Index trait.

2016-07-06 Manish Goregaokar <manish@mozilla.com>

gdb/ChangeLog:
* rust-lang.c (rust_subscript): Allow subscripting pointers

gdb/testsuite/ChangeLog:
* simple.rs: Add test for raw pointer subscripting
* simple.exp: Add test expectations

6949d8a 2016-07-06 09:00:20 GDB Administrator

Automatic date update in version.in

29d7478 2016-07-05 23:35:52 H.J. Lu

Add -flto to PR ld/20321 test

Before GCC 4.9, -flto is required for final LTO link. Add -flto to PR
ld/20321 test to support older versions of GCC.

* testsuite/ld-plugin/lto.exp: Add -flto to PR ld/20321 test.