mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2024-11-25 13:42:06 +00:00
GP-3311: Fix issues launching binaries with spaces using GDB.
This commit is contained in:
parent
ef93801aa1
commit
6547432f94
@ -43,7 +43,7 @@ public class GdbInferiorImpl implements GdbInferior {
|
||||
"0x(?<end>[0-9,A-F,a-f]+)\\s+" +
|
||||
"0x(?<size>[0-9,A-F,a-f]+)\\s+" +
|
||||
"0x(?<offset>[0-9,A-F,a-f]+)\\s+" +
|
||||
"(?<file>\\S*)\\s*");
|
||||
"(?<file>.*)");
|
||||
|
||||
protected static final Pattern MEMORY_MAPPING_LINE_PATTERN =
|
||||
Pattern.compile("\\s*" + //
|
||||
@ -52,7 +52,7 @@ public class GdbInferiorImpl implements GdbInferior {
|
||||
"0x(?<size>[0-9,A-F,a-f]+)\\s+" +
|
||||
"0x(?<offset>[0-9,A-F,a-f]+)\\s+" +
|
||||
"(?<flags>[rwsxp\\-]+)\\s+" +
|
||||
"(?<file>\\S*)\\s*");
|
||||
"(?<file>.*)");
|
||||
|
||||
protected final GdbManagerImpl manager;
|
||||
private final int id;
|
||||
|
@ -15,6 +15,8 @@
|
||||
*/
|
||||
package agent.gdb.manager.impl.cmd;
|
||||
|
||||
import org.apache.commons.text.StringEscapeUtils;
|
||||
|
||||
import agent.gdb.manager.GdbInferior;
|
||||
import agent.gdb.manager.evt.GdbCommandDoneEvent;
|
||||
import agent.gdb.manager.impl.GdbManagerImpl;
|
||||
@ -34,7 +36,7 @@ public class GdbFileExecAndSymbolsCommand extends AbstractGdbCommand<Void> {
|
||||
|
||||
@Override
|
||||
public String encode() {
|
||||
return "-file-exec-and-symbols " + file;
|
||||
return "-file-exec-and-symbols \"" + StringEscapeUtils.escapeJava(file) + "\"";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -19,7 +19,6 @@ import java.util.*;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
|
||||
import agent.gdb.manager.*;
|
||||
import agent.gdb.manager.impl.cmd.GdbConsoleExecCommand.CompletesWithRunning;
|
||||
import agent.gdb.manager.impl.cmd.GdbStateChangeRecord;
|
||||
import agent.gdb.manager.reason.*;
|
||||
import ghidra.async.AsyncFence;
|
||||
|
Loading…
Reference in New Issue
Block a user