mirror of
https://github.com/epasveer/seer.git
synced 2026-08-29 08:34:42 +08:00
Add test program to test random start addresses.
This commit is contained in:
@@ -0,0 +1 @@
|
||||
hellostart
|
||||
@@ -0,0 +1,21 @@
|
||||
# This is the default target, which will be built when
|
||||
# you invoke make
|
||||
.PHONY: all
|
||||
all: hellostart
|
||||
|
||||
# This rule tells make how to build hellostart from hellostart.cpp
|
||||
hellostart: hellostart.cpp
|
||||
g++ -g -o hellostart hellostart.cpp
|
||||
|
||||
# This rule tells make to copy hellostart to the binaries subdirectory,
|
||||
# creating it if necessary
|
||||
.PHONY: install
|
||||
install:
|
||||
mkdir -p binaries
|
||||
cp -p hellostart binaries
|
||||
|
||||
# This rule tells make to delete hellostart and hellostart.o
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm -f hellostart hellostart.o
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
|
||||
Simple HelloWorld program to test random start addresses in seer/gdb.
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
|
||||
int main (int argc, char** argv) {
|
||||
|
||||
int i=0;
|
||||
|
||||
for (i=0; i<argc; i++) {
|
||||
std::cout << "XX: " << i << " " << argv[i] << std::endl;
|
||||
}
|
||||
|
||||
std::cout << "Address of 'i' == " << &i << std::endl;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user