Comments (3)
Hi, thanks for the question. This happens because gdb is run as a subprocess, which causes event handling for new data to stdout/stderr to become less reliable.
There are a few options, you can can experiment with them and see which help
- interrupt gdb with the
interrupt_gdb
method of the GdbController class - force flush output check for output with
-data-evaluate-expression fflush(0)
orcall fflush(0)
. I think this needs to be run after interrupting. - periodically call the
get_gdb_response
method of the GdbController class, withraise_error_on_timeout=False
. Similar to the previous bullet, you may have to interrupt gdb before running this.
Let me know if you get it to work.
from pygdbmi.
sorry for the late reply
i've tried the way above a bit and i got some more question
in my debugee some commands need more than one seconds(defalt value of gdbController.write()) to execute, and this will also cause GdbTimeoutError
my question is: if i don't clearly know the command execute time, should i have to perform the way above (periodcally interrupt then get_gdb_response) on every command i entered? If so, is it possible that this method will cause some synchronization problems in the debugee?
from pygdbmi.
You shouldn't have to do it for every single method. For example, you can do
get_gdb_response(timeout_sec=10)
if you know the command can take up to 10 seconds.
You could also do get_gdb_response(raise_error_on_timeout=False)
if you don't care about the output for some reason.
from pygdbmi.
Related Issues (20)
- pygdbmi is now packaged for Fedora HOT 1
- Support for Intel's MPI debugging HOT 2
- Add ability to wait (with timeout) for the (gdb) "prompt".
- Slow time response with pipes (Windows) HOT 5
- IoManager._get_responses_windows self.stdout.readline() stuck HOT 2
- Thank you! I ported your parser to Rust HOT 5
- Incompatible behavior in GDB command line and pygdbmi HOT 2
- IoManager._get_responses_windows mangles token when reading from stdout
- Escapes in MI error records are mangled HOT 3
- Payload for textual messages not unescaped
- get_gdb_response doesn't parse tab char correctly HOT 6
- String parsing regression with v0.10.0.2 HOT 6
- GdbController cannot recognize window short path of gdb executable HOT 1
- "GdbTimeoutError" during '-symbol-info-variables' command HOT 1
- README.md - AttributeError: 'GdbController' object has no attribute 'get_subprocess_cmd' HOT 1
- Consider using a real language parser to parse MI output HOT 1
- Some responses dropped while debugging ARM microcontroller
- -break-insert * address not supported HOT 1
- Documentation published to https://cs01.github.io/pygdbmi/ is out of date
- Missing send_signal_to_gdb() and interrupt_gdb() of GdbController
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pygdbmi.