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
Posted: [patch] Fix python gdb.execute to not paginate http://sourceware.org/ml/gdb-patches/2010-08/msg00052.html