Bug 620930

Summary: Python gdb.execute's to_string kwarg doesn't work as expected (pagination issue?)
Product: [Fedora] Fedora Reporter: Dave Malcolm <dmalcolm>
Component: gdbAssignee: Jan Kratochvil <jan.kratochvil>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 14CC: jan.kratochvil, pmuldoon
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: gdb-7.1.90.20100806-9.fc14 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-08-07 15:34:53 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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