[Bug python/21688] New: `python` command ignores argument when invoked inside `if` clause

mmalcomson.public at gmail dot com sourceware-bugzilla@sourceware.org
Wed Jun 28 19:17:00 GMT 2017


https://sourceware.org/bugzilla/show_bug.cgi?id=21688

            Bug ID: 21688
           Summary: `python` command ignores argument when invoked inside
                    `if` clause
           Product: gdb
           Version: 8.0
            Status: UNCONFIRMED
          Severity: minor
          Priority: P2
         Component: python
          Assignee: unassigned at sourceware dot org
          Reporter: mmalcomson.public at gmail dot com
  Target Milestone: ---

For version 7.12 the following would print 'Hello'

```
(gdb) if 1
 > python print('Hello')
 > end
(gdb)
```

Now, with version 8.0 I get
```
(gdb) if 1
 > python print('Hello')
  > end
 >
```

If I exit both nested structures ...
```
(gdb) if 1
 > python print('Hello')
  > end
 > end
```

I get no output.

The following works as expected:
```
(gdb) python print('Hello')
Hello
(gdb)
```


It appears that the argument to the `python` function is getting ignored, but
only when in an `if` clause.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Gdb-prs mailing list