Bug 620930 - Python gdb.execute's to_string kwarg doesn't work as expected (pagination issue?)
Summary: Python gdb.execute's to_string kwarg doesn't work as expected (pagination iss...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: gdb
Version: 14
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Jan Kratochvil
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-08-03 19:23 UTC by Dave Malcolm
Modified: 2010-08-07 15:34 UTC (History)
2 users (show)

Fixed In Version: gdb-7.1.90.20100806-9.fc14
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-08-07 15:34:53 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Dave Malcolm 2010-08-03 19:23:47 UTC
Description of problem:
Within the Python bindings, gdb.execute with to_string=True has some surprising behavior, requiring user input.

It seems to be a bad interaction with pagination

With this loop:
(gdb) python for i in range(100): a = gdb.execute('info registers', to_string=True)

(gdb) set pagination off
(gdb) python for i in range(100): a = gdb.execute('info registers', to_string=True)

  (returns immediately)

(gdb) set pagination on
(gdb) python for i in range(100): a = gdb.execute('info registers', to_string=True)
---Type <return> to continue, or q <return> to quit---
---Type <return> to continue, or q <return> to quit---
---Type <return> to continue, or q <return> to quit---
---Type <return> to continue, or q <return> to quit---
---Type <return> to continue, or q <return> to quit---
---Type <return> to continue, or q <return> to quit---
---Type <return> to continue, or q <return> to quit---

(and so on, with me holding down the "return" key).


(I was originally using "help" as the test command, but this seems to bypass capturing, hence switched to "info registers"; separate bug, I guess)

Version-Release number of selected component (if applicable):
gdb-7.1.90.20100721-3.fc14.x86_64

How reproducible:
100%

I need this for https://fedorahosted.org/gdb-heap/ticket/3 to work in https://fedoraproject.org/wiki/Features/MemoryDebuggingTools

Comment 1 Jan Kratochvil 2010-08-05 21:25:33 UTC
Posted:
[patch] Fix python gdb.execute to not paginate
http://sourceware.org/ml/gdb-patches/2010-08/msg00052.html


Note You need to log in before you can comment on or make changes to this bug.