This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH V4 5/6] Resolve dynamic target types of pointers.
- From: Yao Qi <qiyaoltc at gmail dot com>
- To: Bernhard Heckel <bernhard dot heckel at intel dot com>
- Cc: Yao Qi <qiyaoltc at gmail dot com>, brobecker at adacore dot com, gdb-patches at sourceware dot org
- Date: Mon, 17 Oct 2016 11:32:00 +0100
- Subject: Re: [PATCH V4 5/6] Resolve dynamic target types of pointers.
- Authentication-results: sourceware.org; auth=none
- References: <1473230295-809-1-git-send-email-bernhard.heckel@intel.com> <1473230295-809-6-git-send-email-bernhard.heckel@intel.com> <86k2dc8hri.fsf@gmail.com> <57FFA0CC.1040800@intel.com>
Bernhard Heckel <bernhard.heckel@intel.com> writes:
>>> +set test "print intap, not associated"
>>> +gdb_test_multiple "print intap" $test {
>>> + -re " = \\(PTR TO -> \\( $int \\(:,:\\)\\)\\) <not
>>> associated>\r\n$gdb_prompt $" {
>>> + pass $test
>>> + }
>>> + -re " = <not associated>\r\n$gdb_prompt $" {
>>> + pass $test
>>> + }
>>> +}
>> Why do we need to different regex here? Need to handle the differences
>> of different compilers? IMO, the former looks reasonable to me.
> A pointer to an array (especially to Variable Length Array, VLA) is
> described in Gfortran's compiled debug info
> like normal array types + associated property of an pointer.
Could you show the debug information gfortran and ifort generates
respectively?
> Not sure if this is a bug in Gfortran or not? I was also thinking to
> make the
> output equal, and check if an array has pointer attributes but ..... I
> don't really like this approach. This would
> cause a lot of "if .. else" construct in the code for example:
> De-reference this pointer, Address operator, ...
If gfortran people confirm it is a bug, we can xfail the test.
--
Yao (齐尧)