zed.three at gmail dot com
2017-11-26 17:49:17 UTC
https://sourceware.org/bugzilla/show_bug.cgi?id=22498
Bug ID: 22498
Summary: Can't access type component when calling script from
command line
Product: gdb
Version: 8.0.1
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: python
Assignee: unassigned at sourceware dot org
Reporter: zed.three at gmail dot com
Target Milestone: ---
Running the "reproducer.py" script below from the command line results in:
{my_char = 'good'} <error reading variable>
while calling it from inside gdb produces the correct result:
(gdb) py exec(open("reproducer.py").read())
...
( my_char = 'good' ) 'good'
Changing `my_char` to type `integer` does seem to work though.
---
mvce.f90:
program mvce
implicit none
type :: my_type
character(len=4) :: my_char
end type my_type
type(my_type) :: foo
foo%my_char = "good"
print*, foo%my_char
end program mvce
---
reproducer.py:
gdb.execute("file a.out")
gdb.execute("b 11")
gdb.execute("run")
foo = gdb.parse_and_eval("foo")
print(foo, foo['my_char'])
Bug ID: 22498
Summary: Can't access type component when calling script from
command line
Product: gdb
Version: 8.0.1
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: python
Assignee: unassigned at sourceware dot org
Reporter: zed.three at gmail dot com
Target Milestone: ---
Running the "reproducer.py" script below from the command line results in:
{my_char = 'good'} <error reading variable>
while calling it from inside gdb produces the correct result:
(gdb) py exec(open("reproducer.py").read())
...
( my_char = 'good' ) 'good'
Changing `my_char` to type `integer` does seem to work though.
---
mvce.f90:
program mvce
implicit none
type :: my_type
character(len=4) :: my_char
end type my_type
type(my_type) :: foo
foo%my_char = "good"
print*, foo%my_char
end program mvce
---
reproducer.py:
gdb.execute("file a.out")
gdb.execute("b 11")
gdb.execute("run")
foo = gdb.parse_and_eval("foo")
print(foo, foo['my_char'])
--
You are receiving this mail because:
You are on the CC list for the bug.
You are receiving this mail because:
You are on the CC list for the bug.