File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -132,13 +132,13 @@ void gdb_apit::create_gdb_process()
132132
133133 // Only reachable, if execvp failed
134134 int errno_value = errno;
135- dprintf (pipe_output[1 ], " errno in child: %s\n " , strerror (errno_value));
135+ dprintf (pipe_output[1 ], " Starting gdb failed: %s\n " , strerror (errno_value));
136+ dprintf (pipe_output[1 ], " (gdb) \n " );
137+ throw gdb_interaction_exceptiont (" could not run gdb" );
136138 }
137139 else
138140 {
139141 // parent process
140- gdb_state = gdb_statet::CREATED;
141-
142142 close (pipe_input[0 ]);
143143 close (pipe_output[1 ]);
144144
@@ -149,6 +149,11 @@ void gdb_apit::create_gdb_process()
149149 command_stream = fdopen (pipe_input[1 ], " w" );
150150
151151 std::string line = read_most_recent_line ();
152+ if (has_prefix (line, " Starting gdb failed:" ))
153+ throw gdb_interaction_exceptiont (line);
154+
155+ gdb_state = gdb_statet::CREATED;
156+
152157 CHECK_RETURN (
153158 has_prefix (line, R"( ~"done)" ) ||
154159 has_prefix (line, R"( ~"Reading)" ));
You can’t perform that action at this time.
0 commit comments