aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/test/symbols.cpp
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2020-03-16 17:21:57 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2020-03-16 17:21:57 +0300
commit98c422ed7f3d3ce343c5cb8157b91d5137d38647 (patch)
treecd3c8ad3b60bafbcd92ba2c14a89d94ec82c20ac /test/symbols.cpp
parentDbgHelp: start fixing the API (diff)
downloadwinapi-debug-98c422ed7f3d3ce343c5cb8157b91d5137d38647.tar.gz
winapi-debug-98c422ed7f3d3ce343c5cb8157b91d5137d38647.zip
test: foobar -> symbols
Diffstat (limited to 'test/symbols.cpp')
-rw-r--r--test/symbols.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/test/symbols.cpp b/test/symbols.cpp
new file mode 100644
index 0000000..7ace3bb
--- /dev/null
+++ b/test/symbols.cpp
@@ -0,0 +1,21 @@
+namespace foobar_ns {
+
+int exit_code = 1;
+
+int __declspec(noinline) baz() {
+ return exit_code;
+}
+
+int __declspec(noinline) bar() {
+ return baz() * 2;
+}
+
+int __declspec(noinline) foo() {
+ return bar() * 2;
+}
+
+} // namespace foobar_ns
+
+int main() {
+ return foobar_ns::foo() * 2;
+}