mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2024-10-23 13:41:04 +00:00
GP-874: Adding connection info to remote connectors
This commit is contained in:
parent
ac3097a086
commit
d1c1d9d5e8
|
@ -514,4 +514,12 @@ public interface GdbManager extends AutoCloseable, GdbBreakpointInsertions {
|
|||
* @throws IOException if the filename could not be determined
|
||||
*/
|
||||
String getMi2PtyName() throws IOException;
|
||||
|
||||
/**
|
||||
* Get a description for the pty for this GDB session
|
||||
*
|
||||
* @return the description
|
||||
*/
|
||||
String getPtyDescription();
|
||||
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
*/
|
||||
package agent.gdb.manager.impl;
|
||||
|
||||
import static ghidra.async.AsyncUtils.loop;
|
||||
import static ghidra.async.AsyncUtils.*;
|
||||
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
|
@ -1616,6 +1616,11 @@ public class GdbManagerImpl implements GdbManager {
|
|||
return mi2Thread.pty.getChild().nullSession();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPtyDescription() {
|
||||
return ptyFactory.getDescription();
|
||||
}
|
||||
|
||||
public boolean hasCli() {
|
||||
return cliThread != null && cliThread.pty != null;
|
||||
}
|
||||
|
|
|
@ -85,7 +85,8 @@ public class GdbModelImpl extends AbstractDebuggerObjectModel {
|
|||
|
||||
@Override
|
||||
public String getBrief() {
|
||||
return "GDB@" + Integer.toHexString(System.identityHashCode(this));
|
||||
return "GDB@" + Integer.toHexString(System.identityHashCode(this)) + " " +
|
||||
gdb.getPtyDescription();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -29,4 +29,6 @@ public interface PtyFactory {
|
|||
* @throws IOException for an I/O error, including cancellation
|
||||
*/
|
||||
Pty openpty() throws IOException;
|
||||
|
||||
String getDescription();
|
||||
}
|
||||
|
|
|
@ -25,4 +25,9 @@ public class LinuxPtyFactory implements PtyFactory {
|
|||
public Pty openpty() throws IOException {
|
||||
return LinuxPty.openpty();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDescription() {
|
||||
return "local";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -131,4 +131,9 @@ public class GhidraSshPtyFactory implements PtyFactory {
|
|||
}
|
||||
return new SshPty(sshConn.openSession());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDescription() {
|
||||
return "ssh:" + hostname + "(user=" + username + ",port=" + port + ")";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -438,7 +438,7 @@ public class GadpClient extends AbstractDebuggerObjectModel
|
|||
|
||||
@Override
|
||||
public String getBrief() {
|
||||
return description + " via GADP (" + channelState.get().name().toLowerCase() + ")";
|
||||
return "GADP@" + Integer.toHexString(System.identityHashCode(this)) + " " + description;
|
||||
}
|
||||
|
||||
public CompletableFuture<Void> connect() {
|
||||
|
|
Loading…
Reference in New Issue
Block a user