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()
132
132
133
133
// Only reachable, if execvp failed
134
134
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" );
136
138
}
137
139
else
138
140
{
139
141
// parent process
140
- gdb_state = gdb_statet::CREATED;
141
-
142
142
close (pipe_input[0 ]);
143
143
close (pipe_output[1 ]);
144
144
@@ -149,6 +149,11 @@ void gdb_apit::create_gdb_process()
149
149
command_stream = fdopen (pipe_input[1 ], " w" );
150
150
151
151
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
+
152
157
CHECK_RETURN (
153
158
has_prefix (line, R"( ~"done)" ) ||
154
159
has_prefix (line, R"( ~"Reading)" ));
You can’t perform that action at this time.
0 commit comments