diff --git a/test/expected/linux.libdl.txt b/test/expected/linux.libdl.txt index be44193..cfe4b8d 100644 --- a/test/expected/linux.libdl.txt +++ b/test/expected/linux.libdl.txt @@ -1,4 +1,15 @@ ./test||0||trace() +./test||0||www(std::__cxx11::basic_string, std::allocator >&&, std::__cxx11::basic_string, std::allocator > const&, std::vector, std::allocator >*, std::allocator, std::allocator >*> >&&) +./test||0||jjj(void (* const*)(float)) +./test||0||iii(Foo::Bar) +./test||0||hhh(int (* (*) [10]) [20]) +./test||0||ggg(int const* const*) +./test||0||fff(int (S::*)(float) const volatile &&) +./test||0||eee(int (*(* const* volatile (*) [10])())(float)) +./test||0||ddd(int (* (*) [10])()) +./test||0||ccc(int (*) [5][6][7][8]) +./test||0||bbb(int (* const (&) [5])(float, int const&)) +./test||0||aaa(int (&) [5]) ./test||0||foo(int) ./test||0||foo(int) ./test||0||foo(int) @@ -22,5 +33,6 @@ ./test||0||function_two(int, float) ./test||0||function_one(int) ./test||0||main +/lib/x86_64-linux-gnu/libc.so.6||0|| /lib/x86_64-linux-gnu/libc.so.6||0||__libc_start_main ./test||0||_start \ No newline at end of file diff --git a/test/expected/linux.txt b/test/expected/linux.txt index 42a14a2..153ab53 100644 --- a/test/expected/linux.txt +++ b/test/expected/linux.txt @@ -1,27 +1,38 @@ -test/test.cpp||19||trace() -test/test.cpp||35||foo(int) -test/test.cpp||39||foo(int) -test/test.cpp||39||foo(int) -test/test.cpp||39||foo(int) -test/test.cpp||39||foo(int) -test/test.cpp||39||foo(int) -test/test.cpp||39||foo(int) -test/test.cpp||39||foo(int) -test/test.cpp||39||foo(int) -test/test.cpp||39||foo(int) -test/test.cpp||39||foo(int) -test/test.cpp||47||void foo(int, int) -test/test.cpp||47||void foo(int, int, int) -test/test.cpp||47||void foo(int, int, int, int) -test/test.cpp||47||void foo(int, int, int, int, int) -test/test.cpp||47||void foo(int, int, int, int, int, int) -test/test.cpp||47||void foo(int, int, int, int, int, int, int) -test/test.cpp||47||void foo(int, int, int, int, int, int, int, int) -test/test.cpp||47||void foo(int, int, int, int, int, int, int, int, int) -test/test.cpp||47||void foo(int, int, int, int, int, int, int, int, int, int) -test/test.cpp||53||function_two(int, float) -test/test.cpp||59||function_one(int) -test/test.cpp||65||main -../csu/libc-start.c||308||__libc_start_main -||0||_start -||0|| \ No newline at end of file +test/test.cpp||21||trace() +test/test.cpp||33||www(std::__cxx11::basic_string, std::allocator >&&, std::__cxx11::basic_string, std::allocator > const&, std::vector, std::allocator >*, std::allocator, std::allocator >*> >&&) +test/test.cpp||37||jjj(void (* const*)(float)) +test/test.cpp||45||iii(Foo::Bar) +test/test.cpp||55||hhh(int (* (*) [10]) [20]) +test/test.cpp||59||ggg(int const* const*) +test/test.cpp||63||fff(int (S::*)(float) const volatile &&) +test/test.cpp||68||eee(int (*(* const* volatile (*) [10])())(float)) +test/test.cpp||72||ddd(int (* (*) [10])()) +test/test.cpp||76||ccc(int (*) [5][6][7][8]) +test/test.cpp||80||bbb(int (* const (&) [5])(float, int const&)) +test/test.cpp||85||aaa(int (&) [5]) +test/test.cpp||94||foo(int) +test/test.cpp||98||foo(int) +test/test.cpp||98||foo(int) +test/test.cpp||98||foo(int) +test/test.cpp||98||foo(int) +test/test.cpp||98||foo(int) +test/test.cpp||98||foo(int) +test/test.cpp||98||foo(int) +test/test.cpp||98||foo(int) +test/test.cpp||98||foo(int) +test/test.cpp||98||foo(int) +test/test.cpp||106||void foo(int, int) +test/test.cpp||106||void foo(int, int, int) +test/test.cpp||106||void foo(int, int, int, int) +test/test.cpp||106||void foo(int, int, int, int, int) +test/test.cpp||106||void foo(int, int, int, int, int, int) +test/test.cpp||106||void foo(int, int, int, int, int, int, int) +test/test.cpp||106||void foo(int, int, int, int, int, int, int, int) +test/test.cpp||106||void foo(int, int, int, int, int, int, int, int, int) +test/test.cpp||106||void foo(int, int, int, int, int, int, int, int, int, int) +test/test.cpp||112||function_two(int, float) +test/test.cpp||118||function_one(int) +test/test.cpp||124||main +./csu/../sysdeps/nptl/libc_start_call_main.h||58||__libc_start_call_main +./csu/../csu/libc-start.c||392||__libc_start_main_impl +./test||0|| \ No newline at end of file diff --git a/test/expected/macos.clang.libdl.txt b/test/expected/macos.clang.libdl.txt new file mode 100644 index 0000000..57b49a9 --- /dev/null +++ b/test/expected/macos.clang.libdl.txt @@ -0,0 +1,36 @@ +build/test||0||trace() +build/test||0||www(std::__1::basic_string, std::__1::allocator>&&, std::__1::basic_string, std::__1::allocator> const&, std::__1::vector, std::__1::allocator>*, std::__1::allocator, std::__1::allocator>*>>&&) +build/test||0||jjj(void (* const*)(float)) +build/test||0||iii(Foo::Bar) +build/test||0||hhh(int (* (*) [10]) [20]) +build/test||0||ggg(int const* const*) +build/test||0||fff(int (S::*)(float) const volatile &&) +build/test||0||eee(int (* (* const* volatile (*) [10])())(float)) +build/test||0||ddd(int (* (*) [10])()) +build/test||0||ccc(int (*) [5][6][7][8]) +build/test||0||bbb(int (* const (&) [5])(float, int const&)) +build/test||0||aaa(int (&) [5]) +build/test||0||foo(int) +build/test||0||foo(int) +build/test||0||foo(int) +build/test||0||foo(int) +build/test||0||foo(int) +build/test||0||foo(int) +build/test||0||foo(int) +build/test||0||foo(int) +build/test||0||foo(int) +build/test||0||foo(int) +build/test||0||foo(int) +build/test||0||void foo(int, int) +build/test||0||void foo(int, int, int) +build/test||0||void foo(int, int, int, int) +build/test||0||void foo(int, int, int, int, int) +build/test||0||void foo(int, int, int, int, int, int) +build/test||0||void foo(int, int, int, int, int, int, int) +build/test||0||void foo(int, int, int, int, int, int, int, int) +build/test||0||void foo(int, int, int, int, int, int, int, int, int) +build/test||0||void foo(int, int, int, int, int, int, int, int, int, int) +build/test||0||function_two(int, float) +build/test||0||function_one(int) +build/test||0||main +/usr/lib/dyld||0||start \ No newline at end of file diff --git a/test/expected/macos.clang.txt b/test/expected/macos.clang.txt new file mode 100644 index 0000000..2869519 --- /dev/null +++ b/test/expected/macos.clang.txt @@ -0,0 +1,38 @@ +test/test.cpp||21||trace() +test/test.cpp||33||www(std::__1::basic_string, std::__1::allocator>&&, std::__1::basic_string, std::__1::allocator> const&, std::__1::vector, std::__1::allocator>*, std::__1::allocator, std::__1::allocator>*>>&&) +test/test.cpp||37||jjj(void (* const*)(float)) +test/test.cpp||45||iii(Foo::Bar) +test/test.cpp||55||hhh(int (* (*) [10]) [20]) +test/test.cpp||59||ggg(int const* const*) +test/test.cpp||63||fff(int (S::*)(float) const volatile &&) +test/test.cpp||68||eee(int (* (* const* volatile (*) [10])())(float)) +test/test.cpp||72||ddd(int (* (*) [10])()) +test/test.cpp||76||ccc(int (*) [5][6][7][8]) +test/test.cpp||80||bbb(int (* const (&) [5])(float, int const&)) +test/test.cpp||85||aaa(int (&) [5]) +test/test.cpp||94||foo(int) +test/test.cpp||98||foo(int) +test/test.cpp||98||foo(int) +test/test.cpp||98||foo(int) +test/test.cpp||98||foo(int) +test/test.cpp||98||foo(int) +test/test.cpp||98||foo(int) +test/test.cpp||98||foo(int) +test/test.cpp||98||foo(int) +test/test.cpp||98||foo(int) +test/test.cpp||98||foo(int) +test/test.cpp||106||void foo(int, int) +test/test.cpp||106||void foo(int, int, int) +test/test.cpp||106||void foo(int, int, int, int) +test/test.cpp||106||void foo(int, int, int, int, int) +test/test.cpp||106||void foo(int, int, int, int, int, int) +test/test.cpp||106||void foo(int, int, int, int, int, int, int) +test/test.cpp||106||void foo(int, int, int, int, int, int, int, int) +test/test.cpp||106||void foo(int, int, int, int, int, int, int, int, int) +test/test.cpp||106||void foo(int, int, int, int, int, int, int, int, int, int) +test/test.cpp||112||function_two(int, float) +test/test.cpp||118||function_one(int) +test/test.cpp||124||main +./csu/../sysdeps/nptl/libc_start_call_main.h||58||__libc_start_call_main +./csu/../csu/libc-start.c||392||__libc_start_main_impl +./test||0|| \ No newline at end of file diff --git a/test/expected/macos.gcc.addr2line.txt b/test/expected/macos.gcc.addr2line.txt new file mode 100644 index 0000000..f2be649 --- /dev/null +++ b/test/expected/macos.gcc.addr2line.txt @@ -0,0 +1,38 @@ +test/test.cpp||21||trace() +test/test.cpp||33||www(std::__cxx11::basic_string, std::allocator>&&, std::__cxx11::basic_string, std::allocator> const&, std::vector, std::allocator>*, std::allocator, std::allocator>*>>&&) +test/test.cpp||37||jjj(void (* const*)(float)) +test/test.cpp||45||iii(Foo::Bar) +test/test.cpp||55||hhh(int (* (*) [10]) [20]) +test/test.cpp||59||ggg(int const* const*) +test/test.cpp||63||fff(int (S::*)(float) const volatile &&) +test/test.cpp||68||eee(int (* (* const* volatile (*) [10])())(float)) +test/test.cpp||72||ddd(int (* (*) [10])()) +test/test.cpp||76||ccc(int (*) [5][6][7][8]) +test/test.cpp||80||bbb(int (* const (&) [5])(float, int const&)) +test/test.cpp||85||aaa(int (&) [5]) +test/test.cpp||94||foo(int) +test/test.cpp||98||foo(int) +test/test.cpp||98||foo(int) +test/test.cpp||98||foo(int) +test/test.cpp||98||foo(int) +test/test.cpp||98||foo(int) +test/test.cpp||98||foo(int) +test/test.cpp||98||foo(int) +test/test.cpp||98||foo(int) +test/test.cpp||98||foo(int) +test/test.cpp||98||foo(int) +test/test.cpp||106||void foo(int, int) +test/test.cpp||106||void foo(int, int, int) +test/test.cpp||106||void foo(int, int, int, int) +test/test.cpp||106||void foo(int, int, int, int, int) +test/test.cpp||106||void foo(int, int, int, int, int, int) +test/test.cpp||106||void foo(int, int, int, int, int, int, int) +test/test.cpp||106||void foo(int, int, int, int, int, int, int, int) +test/test.cpp||106||void foo(int, int, int, int, int, int, int, int, int) +test/test.cpp||106||void foo(int, int, int, int, int, int, int, int, int, int) +test/test.cpp||112||function_two(int, float) +test/test.cpp||118||function_one(int) +test/test.cpp||124||main +./csu/../sysdeps/nptl/libc_start_call_main.h||58||__libc_start_call_main +./csu/../csu/libc-start.c||392||__libc_start_main_impl +./test||0|| \ No newline at end of file diff --git a/test/expected/macos.libdl.txt b/test/expected/macos.gcc.libdl.txt similarity index 56% rename from test/expected/macos.libdl.txt rename to test/expected/macos.gcc.libdl.txt index 4882533..e25df15 100644 --- a/test/expected/macos.libdl.txt +++ b/test/expected/macos.gcc.libdl.txt @@ -1,4 +1,15 @@ build/test||0||trace() +build/test||0||www(std::__cxx11::basic_string, std::allocator >&&, std::__cxx11::basic_string, std::allocator > const&, std::vector, std::allocator >*, std::allocator, std::allocator >*> >&&) +build/test||0||jjj(void (* const*)(float)) +build/test||0||iii(Foo::Bar) +build/test||0||hhh(int (* (*) [10]) [20]) +build/test||0||ggg(int const* const*) +build/test||0||fff(int (S::*)(float) const volatile &&) +build/test||0||eee(int (*(* const* volatile (*) [10])())(float)) +build/test||0||ddd(int (* (*) [10])()) +build/test||0||ccc(int (*) [5][6][7][8]) +build/test||0||bbb(int (* const (&) [5])(float, int const&)) +build/test||0||aaa(int (&) [5]) build/test||0||foo(int) build/test||0||foo(int) build/test||0||foo(int) diff --git a/test/expected/macos.gcc.txt b/test/expected/macos.gcc.txt new file mode 100644 index 0000000..153ab53 --- /dev/null +++ b/test/expected/macos.gcc.txt @@ -0,0 +1,38 @@ +test/test.cpp||21||trace() +test/test.cpp||33||www(std::__cxx11::basic_string, std::allocator >&&, std::__cxx11::basic_string, std::allocator > const&, std::vector, std::allocator >*, std::allocator, std::allocator >*> >&&) +test/test.cpp||37||jjj(void (* const*)(float)) +test/test.cpp||45||iii(Foo::Bar) +test/test.cpp||55||hhh(int (* (*) [10]) [20]) +test/test.cpp||59||ggg(int const* const*) +test/test.cpp||63||fff(int (S::*)(float) const volatile &&) +test/test.cpp||68||eee(int (*(* const* volatile (*) [10])())(float)) +test/test.cpp||72||ddd(int (* (*) [10])()) +test/test.cpp||76||ccc(int (*) [5][6][7][8]) +test/test.cpp||80||bbb(int (* const (&) [5])(float, int const&)) +test/test.cpp||85||aaa(int (&) [5]) +test/test.cpp||94||foo(int) +test/test.cpp||98||foo(int) +test/test.cpp||98||foo(int) +test/test.cpp||98||foo(int) +test/test.cpp||98||foo(int) +test/test.cpp||98||foo(int) +test/test.cpp||98||foo(int) +test/test.cpp||98||foo(int) +test/test.cpp||98||foo(int) +test/test.cpp||98||foo(int) +test/test.cpp||98||foo(int) +test/test.cpp||106||void foo(int, int) +test/test.cpp||106||void foo(int, int, int) +test/test.cpp||106||void foo(int, int, int, int) +test/test.cpp||106||void foo(int, int, int, int, int) +test/test.cpp||106||void foo(int, int, int, int, int, int) +test/test.cpp||106||void foo(int, int, int, int, int, int, int) +test/test.cpp||106||void foo(int, int, int, int, int, int, int, int) +test/test.cpp||106||void foo(int, int, int, int, int, int, int, int, int) +test/test.cpp||106||void foo(int, int, int, int, int, int, int, int, int, int) +test/test.cpp||112||function_two(int, float) +test/test.cpp||118||function_one(int) +test/test.cpp||124||main +./csu/../sysdeps/nptl/libc_start_call_main.h||58||__libc_start_call_main +./csu/../csu/libc-start.c||392||__libc_start_main_impl +./test||0|| \ No newline at end of file diff --git a/test/expected/macos.txt b/test/expected/macos.txt deleted file mode 100644 index f38c524..0000000 --- a/test/expected/macos.txt +++ /dev/null @@ -1,25 +0,0 @@ -test/test.cpp||19||trace() -test/test.cpp||35||foo(int) -test/test.cpp||39||foo(int) -test/test.cpp||39||foo(int) -test/test.cpp||39||foo(int) -test/test.cpp||39||foo(int) -test/test.cpp||39||foo(int) -test/test.cpp||39||foo(int) -test/test.cpp||39||foo(int) -test/test.cpp||39||foo(int) -test/test.cpp||39||foo(int) -test/test.cpp||39||foo(int) -test/test.cpp||47||void foo(int, int) -test/test.cpp||47||void foo(int, int, int) -test/test.cpp||47||void foo(int, int, int, int) -test/test.cpp||47||void foo(int, int, int, int, int) -test/test.cpp||47||void foo(int, int, int, int, int, int) -test/test.cpp||47||void foo(int, int, int, int, int, int, int) -test/test.cpp||47||void foo(int, int, int, int, int, int, int, int) -test/test.cpp||47||void foo(int, int, int, int, int, int, int, int, int) -test/test.cpp||47||void foo(int, int, int, int, int, int, int, int, int, int) -test/test.cpp||53||function_two(int, float) -test/test.cpp||59||function_one(int) -test/test.cpp||65||main -||0|| \ No newline at end of file diff --git a/test/expected/windows.txt b/test/expected/windows.txt index f6376c6..e794ec2 100644 --- a/test/expected/windows.txt +++ b/test/expected/windows.txt @@ -1,27 +1,38 @@ -test\test.cpp||19||trace() -test\test.cpp||35||foo(int) -test\test.cpp||39||foo(int) -test\test.cpp||39||foo(int) -test\test.cpp||39||foo(int) -test\test.cpp||39||foo(int) -test\test.cpp||39||foo(int) -test\test.cpp||39||foo(int) -test\test.cpp||39||foo(int) -test\test.cpp||39||foo(int) -test\test.cpp||39||foo(int) -test\test.cpp||39||foo(int) -test\test.cpp||47||foo(int, int) -test\test.cpp||47||foo(int, int, int) -test\test.cpp||47||foo(int, int, int, int) -test\test.cpp||47||foo(int, int, int, int, int) -test\test.cpp||47||foo(int, int, int, int, int, int) -test\test.cpp||47||foo(int, int, int, int, int, int, int) -test\test.cpp||47||foo(int, int, int, int, int, int, int, int) -test\test.cpp||47||foo(int, int, int, int, int, int, int, int, int) -test\test.cpp||47||foo(int, int, int, int, int, int, int, int, int, int) -test\test.cpp||54||function_two(int, float) -test\test.cpp||59||function_one(int) -test\test.cpp||65||main() +test\test.cpp||21||trace() +test\test.cpp||37||www(std::basic_string, std::allocator >*, std::basic_string, std::allocator >&, std::vector, std::allocator > *, std::allocator, std::allocator > *> >*) +test\test.cpp||41||jjj(void(*(*))(float)) +test\test.cpp||49||iii(Foo::Bar) +test\test.cpp||59||hhh(int(*(*)[10])[20]) +test\test.cpp||63||ggg(int**) +test\test.cpp||67||fff(int(S::*)(float)) +test\test.cpp||72||eee(int(*(*(*(*)[10]))())(float)) +test\test.cpp||76||ddd(int(*(*)[10])()) +test\test.cpp||80||ccc(int(*)[5][6][7][8]) +test\test.cpp||84||bbb(int(*(&)[5])(float, int&)) +test\test.cpp||89||aaa(int(&)[5]) +test\test.cpp||98||foo(int) +test\test.cpp||102||foo(int) +test\test.cpp||102||foo(int) +test\test.cpp||102||foo(int) +test\test.cpp||102||foo(int) +test\test.cpp||102||foo(int) +test\test.cpp||102||foo(int) +test\test.cpp||102||foo(int) +test\test.cpp||102||foo(int) +test\test.cpp||102||foo(int) +test\test.cpp||102||foo(int) +test\test.cpp||110||foo(int, int) +test\test.cpp||110||foo(int, int, int) +test\test.cpp||110||foo(int, int, int, int) +test\test.cpp||110||foo(int, int, int, int, int) +test\test.cpp||110||foo(int, int, int, int, int, int) +test\test.cpp||110||foo(int, int, int, int, int, int, int) +test\test.cpp||110||foo(int, int, int, int, int, int, int, int) +test\test.cpp||110||foo(int, int, int, int, int, int, int, int, int) +test\test.cpp||110||foo(int, int, int, int, int, int, int, int, int, int) +test\test.cpp||116||function_two(int, float) +test\test.cpp||122||function_one(int) +test\test.cpp||128||main() D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl||79||invoke_main() D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl||288||__scrt_common_main_seh() D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl||331||__scrt_common_main() diff --git a/test/test.cpp b/test/test.cpp index 9c267f9..997ef8c 100644 --- a/test/test.cpp +++ b/test/test.cpp @@ -1,9 +1,11 @@ #include #include +#include #include #include #include +#include std::string normalize_filename(std::string name) { if(name.find('/') == 0 || (name.find(':') == 1 && std::isupper(name[0]))) { @@ -27,12 +29,69 @@ void trace() { } } +void www(std::string&&, const std::string& str, std::vector&& foobar) { + trace(); +} + +void jjj(void(*const arr[5])(float)) { + www(std::string{}, "", {}); +} + +namespace Foo { + struct Bar {}; +} + +void iii(Foo::Bar) { + jjj(nullptr); +} + +struct S { + int foo(float) const volatile && { + return 1; + } +}; + +void hhh(int(*(*)[10])[20]) { + iii(Foo::Bar{}); +} + +void ggg(const int * const *) { + hhh(nullptr); +} + +void fff(int(S::*)(float) const volatile &&) { + ggg(nullptr); +} + +//void eee(int(*(*(*)[10])())(float)) { +void eee(int(*(* const * volatile(*)[10])())(float)) { + fff(&S::foo); +} + +void ddd(int(*(*)[10])()) { + eee(nullptr); +} + +void ccc(int(*)[5][6][7][8]) { + ddd(nullptr); +} + +void bbb(int(*const (&)[5])(float, const int&)) { + ccc(nullptr); +} + +void aaa(int(&)[5]) { + int(*const (arr)[5])(float, const int&) = {}; + bbb(arr); +} + int x; void foo(int n) { if(n == 0) { x = 0; - trace(); + int arr[5]; + aaa(arr); x = 0; } else { x = 0;