Skip to content

Commit

Permalink
remove flushing of stdout since pygdbmi no longer buffers output
Browse files Browse the repository at this point in the history
  • Loading branch information
cs01 committed Nov 21, 2018
1 parent 7efcac7 commit fdb6358
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 27 deletions.
20 changes: 0 additions & 20 deletions gdbgui/src/js/GdbApi.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -311,10 +311,6 @@ const GdbApi = {
// print the name, type and value for simple data types,
// and the name and type for arrays, structures and unions.
constants.IGNORE_ERRORS_TOKEN_STR + "-stack-list-variables --simple-values",
// flush inferior process' output (if any)
// by default, it only flushes when the program terminates
// so this additional call is needed
GdbApi.get_flush_output_cmd()
];
if (store.get("interpreter") === "gdb") {
// update all user-defined variables in gdb
Expand Down Expand Up @@ -379,22 +375,6 @@ const GdbApi = {
return "breakpoint list";
}
},
get_flush_output_cmd: function() {
if (!store.get("flush_after_commands")) {
return "";
}
if (store.get("language") === "c_family") {
if (store.get("interpreter") === "gdb") {
return constants.IGNORE_ERRORS_TOKEN_STR + "-data-evaluate-expression fflush(0)";
} else if (store.get("interpreter") === "lldb") {
return "";
}
} else if (store.get("language") === "go") {
return ""; // TODO?
} else if (store.get("language") === "rust") {
return ""; // TODO?
}
},
get_load_binary_and_arguments_cmds(binary, args) {
// tell gdb which arguments to use when calling the binary, before loading the binary
let cmds = [
Expand Down
1 change: 0 additions & 1 deletion gdbgui/src/js/InitialStoreData.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ const initial_store_data = {

pretty_print: true, // whether gdb should "pretty print" variables. There is an option for this in Settings
refresh_state_after_sending_console_command: true, // If true, send commands to refresh GUI store after each command is sent from console
flush_after_commands: true,
show_all_sent_commands_in_console: debug, // show all sent commands if in debug mode

inferior_program: constants.inferior_states.unknown,
Expand Down
5 changes: 0 additions & 5 deletions gdbgui/src/js/Settings.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ class Settings extends React.Component {
"refresh_state_after_sending_console_command",
"show_all_sent_commands_in_console",
"highlight_source_code",
"flush_after_commands"
]);
this.get_update_max_lines_of_code_to_fetch = this.get_update_max_lines_of_code_to_fetch.bind(
this
Expand Down Expand Up @@ -90,10 +89,6 @@ class Settings extends React.Component {
"refresh_state_after_sending_console_command",
"Refresh all components when a command is sent from the console"
)}
{Settings.get_checkbox_row(
"flush_after_commands",
"Attempt to flush stdout after each command is run"
)}
{Settings.get_checkbox_row(
"show_all_sent_commands_in_console",
"Print all sent commands in console, including those sent automatically by gdbgui"
Expand Down
2 changes: 1 addition & 1 deletion gdbgui/static/js/build.js

Large diffs are not rendered by default.

0 comments on commit fdb6358

Please sign in to comment.