mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-04 18:29:37 +02:00
GP-2262 Marshaling refactor - java-side
This commit is contained in:
parent
0123c85d9f
commit
ae79857b42
68 changed files with 3131 additions and 1597 deletions
|
@ -21,6 +21,7 @@
|
|||
|
||||
#include "ifacedecomp.hh"
|
||||
|
||||
|
||||
static IfaceStatus *ghidra_dcp = (IfaceStatus *)0;
|
||||
static RemoteSocket *remote = (RemoteSocket *)0;
|
||||
|
||||
|
@ -62,6 +63,8 @@ void connect_to_console(Funcdata *fd)
|
|||
|
||||
#endif
|
||||
|
||||
ElementId ELEM_DOC = ElementId("doc",218);
|
||||
|
||||
vector<ArchitectureGhidra *> archlist; // List of architectures currently running
|
||||
|
||||
map<string,GhidraCommand *> GhidraCapability::commandmap; // List of commands we can receive from Ghidra proper
|
||||
|
@ -300,10 +303,10 @@ void DecompileAt::rawAction(void)
|
|||
}
|
||||
|
||||
sout.write("\000\000\001\016",4);
|
||||
// Write output XML directly to outstream
|
||||
|
||||
if (fd->isProcComplete()) {
|
||||
sout << "<doc>\n";
|
||||
XmlEncode encoder(sout);
|
||||
encoder.openElement(ELEM_DOC);
|
||||
if (ghidra->getSendParamMeasures() && (ghidra->allacts.getCurrentName() == "paramid")) {
|
||||
ParamIDAnalysis pidanalysis( fd, true ); // Only send back final prototype
|
||||
pidanalysis.encode( encoder, true );
|
||||
|
@ -318,7 +321,7 @@ void DecompileAt::rawAction(void)
|
|||
(ghidra->allacts.getCurrentName() == "decompile"))
|
||||
ghidra->print->docFunction(fd);
|
||||
}
|
||||
sout << "</doc>\n";
|
||||
encoder.closeElement(ELEM_DOC);
|
||||
}
|
||||
sout.write("\000\000\001\017",4);
|
||||
}
|
||||
|
|
|
@ -29,6 +29,8 @@
|
|||
|
||||
class GhidraCommand;
|
||||
|
||||
extern ElementId ELEM_DOC; ///< Marshaling element \<doc>
|
||||
|
||||
/// \brief Registration point and dispatcher for commands sent to the decompiler
|
||||
///
|
||||
/// This is the base class for \b command \b capabilities (sets of commands).
|
||||
|
|
|
@ -500,7 +500,7 @@ AttributeId ATTRIB_VAL = AttributeId("val",24);
|
|||
AttributeId ATTRIB_VALUE = AttributeId("value",25);
|
||||
AttributeId ATTRIB_WORDSIZE = AttributeId("wordsize",26);
|
||||
|
||||
AttributeId ATTRIB_UNKNOWN = AttributeId("XMLunknown",144); // Number serves as next open index
|
||||
AttributeId ATTRIB_UNKNOWN = AttributeId("XMLunknown",147); // Number serves as next open index
|
||||
|
||||
ElementId ELEM_DATA = ElementId("data",1);
|
||||
ElementId ELEM_INPUT = ElementId("input",2);
|
||||
|
@ -513,4 +513,4 @@ ElementId ELEM_VAL = ElementId("val",8);
|
|||
ElementId ELEM_VALUE = ElementId("value",9);
|
||||
ElementId ELEM_VOID = ElementId("void",10);
|
||||
|
||||
ElementId ELEM_UNKNOWN = ElementId("XMLunknown",218); // Number serves as next open index
|
||||
ElementId ELEM_UNKNOWN = ElementId("XMLunknown",231); // Number serves as next open index
|
||||
|
|
|
@ -232,7 +232,7 @@ public:
|
|||
/// \brief Find the specific attribute in the current element and return it as an address space
|
||||
///
|
||||
/// Search attributes from the current element for a match to the given attribute id.
|
||||
/// Return this attribute as an address space. If there is no attribute matching the id, an exception is throw.
|
||||
/// Return this attribute as an address space. If there is no attribute matching the id, an exception is thrown.
|
||||
/// Parse via getNextAttributeId is reset.
|
||||
/// \param attribId is the specific attribute id to match
|
||||
/// \return the address space associated with the attribute
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue