This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]