Fix C++ sleighexample compilation

This commit is contained in:
Eric Kilmer 2023-04-10 10:07:36 -04:00
parent 85cc8ee883
commit 8afa3a2be3
No known key found for this signature in database
GPG key ID: 504CA431CF70054B

View file

@ -22,6 +22,11 @@
#include "emulate.hh" #include "emulate.hh"
#include <iostream> #include <iostream>
using std::cerr;
using std::cout;
namespace ghidra {
// These are the bytes for an example x86 binary // These are the bytes for an example x86 binary
// These bytes are loaded at address 0x80483b4 // These bytes are loaded at address 0x80483b4
static uint1 myprog[] = { static uint1 myprog[] = {
@ -283,9 +288,13 @@ static void doEmulation(Translate &trans,LoadImage &loader)
} while(!emulater.getHalt()); } while(!emulater.getHalt());
} }
} // End namespace ghidra
int main(int argc,char **argv) int main(int argc,char **argv)
{ {
using namespace ghidra;
if (argc != 2) { if (argc != 2) {
cerr << "USAGE: " << argv[0] << " disassemble" << endl; cerr << "USAGE: " << argv[0] << " disassemble" << endl;
cerr << " " << argv[0] << " pcode" << endl; cerr << " " << argv[0] << " pcode" << endl;