This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 1/3] Fortran: Handle associated property of pointer types.
- 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>, eliz at gnu dot org, gdb-patches at sourceware dot org
- Date: Tue, 21 Jun 2016 11:03:35 +0100
- Subject: Re: [PATCH 1/3] Fortran: Handle associated property of pointer types.
- Authentication-results: sourceware.org; auth=none
- References: <1465220233-32286-1-git-send-email-bernhard dot heckel at intel dot com> <1465220233-32286-2-git-send-email-bernhard dot heckel at intel dot com> <86wplorr4w dot fsf at gmail dot com> <57690636 dot 3040807 at intel dot com>
Bernhard Heckel <bernhard.heckel@intel.com> writes:
>>> +gdb_test "print intp" "= <not associated>" "print intp, not associated"
>>> +
>>> +gdb_breakpoint [gdb_get_line_number "Before pointer assignment"]
>>> +gdb_continue_to_breakpoint "Before pointer assignment"
>>> +gdb_test "print logp" "= <not associated>" "print logp, not associated"
>>> +gdb_test "print comp" "= <not associated>" "print comp, not associated"
>>> +gdb_test "print charp" "= <not associated>" "print charp, not associated"
>>> +gdb_test "print charap" "= <not associated>" "print charap, not associated"
>>> +gdb_test "print intp" "= <not associated>" "print intp, not associated"
>>> +gdb_test "print intap" "= <not associated>" "print intap, not associated"
>>> +gdb_test "print realp" "= <not associated>" "print realp, not associated"
>>> +gdb_test "print \$my_var = intp" "= <not associated>"
>> What is the output without your fix? IMO, "print POINTER" prints the
>> value of the pointer. It doesn't matter whether the pointer is
>> associated with a target or not.
> For compilers creating the property, the output is like above.
> For missing property, it is:
>
> gdb_test "print logp" "= (PTR TO -> ( $logical )) 0x0"
>
> Based on your input I would like to propose:
> gdb_test "print logp" "= (PTR TO -> ( $logical )) <not associated>"
I don't want GDB to carry some knowledge to guess the pointer is not
associated. If compiler creates the property, gdb uses it, otherwise,
simply prints 0x0, which is right to me. I don't understand the point
of changing the output "0x0" -> "<not associated>".
--
Yao (éå)