Closed dkleinrath closed 3 years ago
Feel free to send a PR!
If Capstone doesn't support the architecture, you can just disable the disassembling step. The disassembling improves our coverage a bit but isn't necessary for Bloaty to function.
I had a similar question for Trensilica's core. How do you disable the disassembling step ?
Sorry for the very late reply on this. Would you try this branch and see if it solves your problem? I think it will, but I don't have any AVR binaries to test against.
https://github.com/haberman/bloaty/tree/avr
If you can includes a very small AVR binary I'll add it to the test suite. Thanks!
I cloned your repo and tried to build it, since I have an AVR binary I'd like to analyze with bloaty.
Make output is as follows:
In file included from /home/travis/bloaty_test/bloaty/third_party/googletest/googlemock/include/gmock/gmock-spec-builders.h:75, from /home/travis/bloaty_test/bloaty/third_party/googletest/googlemock/include/gmock/gmock-generated-function-mockers.h:43, from /home/travis/bloaty_test/bloaty/third_party/googletest/googlemock/include/gmock/gmock.h:61, from /home/travis/bloaty_test/bloaty/third_party/googletest/googlemock/src/gmock-all.cc:40: /home/travis/bloaty_test/bloaty/third_party/googletest/googlemock/include/gmock/gmock-matchers.h: In instantiation of ‘testing::PolymorphicMatcher
::PolymorphicMatcher(const Impl&) [with Impl = testing::internal::StrEqualityMatcher<std::cxx11::basic_string >]’: /home/travis/bloaty_test/bloaty/third_party/googletest/googlemock/include/gmock/gmock-matchers.h:497:10: required from ‘testing::PolymorphicMatcher cxx11::basic_stringtesting::MakePolymorphicMatcher(const Impl&) [with Impl = testing::internal::StrEqualityMatcher<std::__cxx11::basic_string >]’ /home/travis/bloaty_test/bloaty/third_party/googletest/googlemock/include/gmock/gmock-matchers.h:3975:65: required from here /home/travis/bloaty_test/bloaty/third_party/googletest/googlemock/include/gmock/gmock-matchers.h:432:67: error: implicitly-declared ‘testing::internal::StrEqualityMatcher<std:: >::StrEqualityMatcher(const testing::internal::StrEqualityMatcher<std::cxx11::basic_string >&)’ is deprecated [-Werror=deprecated-copy] 432 | explicit PolymorphicMatcher(const Impl& animpl) : impl(an_impl) {} | ^ In file included from /home/travis/bloaty_test/bloaty/third_party/googletest/googletest/include/gtest/internal/gtest-linked_ptr.h:74, from /home/travis/bloaty_test/bloaty/third_party/googletest/googlemock/include/gmock/internal/gmock-port.h:53, from /home/travis/bloaty_test/bloaty/third_party/googletest/googlemock/include/gmock/internal/gmock-generated-internal-utils.h:44, from /home/travis/bloaty_test/bloaty/third_party/googletest/googlemock/include/gmock/internal/gmock-internal-utils.h:45, from /home/travis/bloaty_test/bloaty/third_party/googletest/googlemock/include/gmock/gmock-actions.h:46, from /home/travis/bloaty_test/bloaty/third_party/googletest/googlemock/include/gmock/gmock.h:58, from /home/travis/bloaty_test/bloaty/third_party/googletest/googlemock/src/gmock-all.cc:40: /home/travis/bloaty_test/bloaty/third_party/googletest/googletest/include/gtest/internal/gtest-port.h:900:8: note: because ‘testing::internal::StrEqualityMatcher<std::__cxx11::basic_string cxx11::basic_string>’ has user-provided ‘void testing::internal::StrEqualityMatcher ::operator=(const testing::internal::StrEqualityMatcher &) [with StringType = std:: ]’ 900 | void operator=(type const &) | ^ ~~~ /home/travis/bloaty_test/bloaty/third_party/googletest/googlemock/include/gmock/gmock-matchers.h:1180:3: note: in expansion of macro ‘GTEST_DISALLOWASSIGN’ 1180 | GTEST_DISALLOWASSIGN(StrEqualityMatcher); | ^~~~~~ In file included from /home/travis/bloaty_test/bloaty/third_party/googletest/googlemock/include/gmock/gmock-spec-builders.h:75, from /home/travis/bloaty_test/bloaty/third_party/googletest/googlemock/include/gmock/gmock-generated-function-mockers.h:43, from /home/travis/bloaty_test/bloaty/third_party/googletest/googlemock/include/gmock/gmock.h:61, from /home/travis/bloaty_test/bloaty/third_party/googletest/googlemock/src/gmock-all.cc:40: /home/travis/bloaty_test/bloaty/third_party/googletest/googlemock/include/gmock/gmock-matchers.h: In instantiation of ‘testing::PolymorphicMatcher::PolymorphicMatcher(const Impl&) [with Impl = testing::internal::HasSubstrMatcher<std::cxx11::basic_string >]’: /home/travis/bloaty_test/bloaty/third_party/googletest/googlemock/include/gmock/gmock-matchers.h:497:10: required from ‘testing::PolymorphicMatcher cxx11::basic_stringtesting::MakePolymorphicMatcher(const Impl&) [with Impl = testing::internal::HasSubstrMatcher<std::__cxx11::basic_string >]’ /home/travis/bloaty_test/bloaty/third_party/googletest/googlemock/include/gmock/gmock-matchers.h:4004:57: required from here /home/travis/bloaty_test/bloaty/third_party/googletest/googlemock/include/gmock/gmock-matchers.h:432:67: error: implicitly-declared ‘testing::internal::HasSubstrMatcher<std:: >::HasSubstrMatcher(const testing::internal::HasSubstrMatcher<std::cxx11::basic_string >&)’ is deprecated [-Werror=deprecated-copy] 432 | explicit PolymorphicMatcher(const Impl& animpl) : impl(an_impl) {} | ^ In file included from /home/travis/bloaty_test/bloaty/third_party/googletest/googletest/include/gtest/internal/gtest-linked_ptr.h:74, from /home/travis/bloaty_test/bloaty/third_party/googletest/googlemock/include/gmock/internal/gmock-port.h:53, from /home/travis/bloaty_test/bloaty/third_party/googletest/googlemock/include/gmock/internal/gmock-generated-internal-utils.h:44, from /home/travis/bloaty_test/bloaty/third_party/googletest/googlemock/include/gmock/internal/gmock-internal-utils.h:45, from /home/travis/bloaty_test/bloaty/third_party/googletest/googlemock/include/gmock/gmock-actions.h:46, from /home/travis/bloaty_test/bloaty/third_party/googletest/googlemock/include/gmock/gmock.h:58, from /home/travis/bloaty_test/bloaty/third_party/googletest/googlemock/src/gmock-all.cc:40: /home/travis/bloaty_test/bloaty/third_party/googletest/googletest/include/gtest/internal/gtest-port.h:900:8: note: because ‘testing::internal::HasSubstrMatcher<std::__cxx11::basic_string cxx11::basic_string>’ has user-provided ‘void testing::internal::HasSubstrMatcher ::operator=(const testing::internal::HasSubstrMatcher &) [with StringType = std:: ]’ 900 | void operator=(type const &) | ^ ~~~ /home/travis/bloaty_test/bloaty/third_party/googletest/googlemock/include/gmock/gmock-matchers.h:1227:3: note: in expansion of macro ‘GTEST_DISALLOWASSIGN’ 1227 | GTEST_DISALLOWASSIGN(HasSubstrMatcher); | ^~~~~~ In file included from /home/travis/bloaty_test/bloaty/third_party/googletest/googlemock/include/gmock/gmock-spec-builders.h:75, from /home/travis/bloaty_test/bloaty/third_party/googletest/googlemock/include/gmock/gmock-generated-function-mockers.h:43, from /home/travis/bloaty_test/bloaty/third_party/googletest/googlemock/include/gmock/gmock.h:61, from /home/travis/bloaty_test/bloaty/third_party/googletest/googlemock/src/gmock-all.cc:40: /home/travis/bloaty_test/bloaty/third_party/googletest/googlemock/include/gmock/gmock-matchers.h: In instantiation of ‘testing::PolymorphicMatcher::PolymorphicMatcher(const Impl&) [with Impl = testing::internal::StartsWithMatcher<std::cxx11::basic_string >]’: /home/travis/bloaty_test/bloaty/third_party/googletest/googlemock/include/gmock/gmock-matchers.h:497:10: required from ‘testing::PolymorphicMatcher cxx11::basic_stringtesting::MakePolymorphicMatcher(const Impl&) [with Impl = testing::internal::StartsWithMatcher<std::__cxx11::basic_string >]’ /home/travis/bloaty_test/bloaty/third_party/googletest/googlemock/include/gmock/gmock-matchers.h:4011:55: required from here /home/travis/bloaty_test/bloaty/third_party/googletest/googlemock/include/gmock/gmock-matchers.h:432:67: error: implicitly-declared ‘testing::internal::StartsWithMatcher<std:: >::StartsWithMatcher(const testing::internal::StartsWithMatcher<std::cxx11::basic_string >&)’ is deprecated [-Werror=deprecated-copy] 432 | explicit PolymorphicMatcher(const Impl& animpl) : impl(an_impl) {} | ^ In file included from /home/travis/bloaty_test/bloaty/third_party/googletest/googletest/include/gtest/internal/gtest-linked_ptr.h:74, from /home/travis/bloaty_test/bloaty/third_party/googletest/googlemock/include/gmock/internal/gmock-port.h:53, from /home/travis/bloaty_test/bloaty/third_party/googletest/googlemock/include/gmock/internal/gmock-generated-internal-utils.h:44, from /home/travis/bloaty_test/bloaty/third_party/googletest/googlemock/include/gmock/internal/gmock-internal-utils.h:45, from /home/travis/bloaty_test/bloaty/third_party/googletest/googlemock/include/gmock/gmock-actions.h:46, from /home/travis/bloaty_test/bloaty/third_party/googletest/googlemock/include/gmock/gmock.h:58, from /home/travis/bloaty_test/bloaty/third_party/googletest/googlemock/src/gmock-all.cc:40: /home/travis/bloaty_test/bloaty/third_party/googletest/googletest/include/gtest/internal/gtest-port.h:900:8: note: because ‘testing::internal::StartsWithMatcher<std::__cxx11::basic_string cxx11::basic_string>’ has user-provided ‘void testing::internal::StartsWithMatcher ::operator=(const testing::internal::StartsWithMatcher &) [with StringType = std:: ]’ 900 | void operator=(type const &) | ^ ~~~ /home/travis/bloaty_test/bloaty/third_party/googletest/googlemock/include/gmock/gmock-matchers.h:1274:3: note: in expansion of macro ‘GTEST_DISALLOWASSIGN’ 1274 | GTEST_DISALLOWASSIGN(StartsWithMatcher); | ^~~~~~ In file included from /home/travis/bloaty_test/bloaty/third_party/googletest/googlemock/include/gmock/gmock-spec-builders.h:75, from /home/travis/bloaty_test/bloaty/third_party/googletest/googlemock/include/gmock/gmock-generated-function-mockers.h:43, from /home/travis/bloaty_test/bloaty/third_party/googletest/googlemock/include/gmock/gmock.h:61, from /home/travis/bloaty_test/bloaty/third_party/googletest/googlemock/src/gmock-all.cc:40: /home/travis/bloaty_test/bloaty/third_party/googletest/googlemock/include/gmock/gmock-matchers.h: In instantiation of ‘testing::PolymorphicMatcher::PolymorphicMatcher(const Impl&) [with Impl = testing::internal::EndsWithMatcher<std::cxx11::basic_string >]’: /home/travis/bloaty_test/bloaty/third_party/googletest/googlemock/include/gmock/gmock-matchers.h:497:10: required from ‘testing::PolymorphicMatcher cxx11::basic_stringtesting::MakePolymorphicMatcher(const Impl&) [with Impl = testing::internal::EndsWithMatcher<std::__cxx11::basic_string >]’ /home/travis/bloaty_test/bloaty/third_party/googletest/googlemock/include/gmock/gmock-matchers.h:4017:79: required from here /home/travis/bloaty_test/bloaty/third_party/googletest/googlemock/include/gmock/gmock-matchers.h:432:67: error: implicitly-declared ‘testing::internal::EndsWithMatcher<std:: >::EndsWithMatcher(const testing::internal::EndsWithMatcher<std::cxx11::basic_string >&)’ is deprecated [-Werror=deprecated-copy] 432 | explicit PolymorphicMatcher(const Impl& animpl) : impl(an_impl) {} | ^ In file included from /home/travis/bloaty_test/bloaty/third_party/googletest/googletest/include/gtest/internal/gtest-linked_ptr.h:74, from /home/travis/bloaty_test/bloaty/third_party/googletest/googlemock/include/gmock/internal/gmock-port.h:53, from /home/travis/bloaty_test/bloaty/third_party/googletest/googlemock/include/gmock/internal/gmock-generated-internal-utils.h:44, from /home/travis/bloaty_test/bloaty/third_party/googletest/googlemock/include/gmock/internal/gmock-internal-utils.h:45, from /home/travis/bloaty_test/bloaty/third_party/googletest/googlemock/include/gmock/gmock-actions.h:46, from /home/travis/bloaty_test/bloaty/third_party/googletest/googlemock/include/gmock/gmock.h:58, from /home/travis/bloaty_test/bloaty/third_party/googletest/googlemock/src/gmock-all.cc:40: /home/travis/bloaty_test/bloaty/third_party/googletest/googletest/include/gtest/internal/gtest-port.h:900:8: note: because ‘testing::internal::EndsWithMatcher<std::__cxx11::basic_string cxx11::basic_string>’ has user-provided ‘void testing::internal::EndsWithMatcher ::operator=(const testing::internal::EndsWithMatcher &) [with StringType = std:: ]’ 900 | void operator=(type const &) | ^ ~~~ /home/travis/bloaty_test/bloaty/third_party/googletest/googlemock/include/gmock/gmock-matchers.h:1320:3: note: in expansion of macro ‘GTEST_DISALLOWASSIGN’ 1320 | GTEST_DISALLOWASSIGN(EndsWithMatcher); | ^~~~~~ In file included from /home/travis/bloaty_test/bloaty/third_party/googletest/googlemock/include/gmock/gmock-spec-builders.h:75, from /home/travis/bloaty_test/bloaty/third_party/googletest/googlemock/include/gmock/gmock-generated-function-mockers.h:43, from /home/travis/bloaty_test/bloaty/third_party/googletest/googlemock/include/gmock/gmock.h:61, from /home/travis/bloaty_test/bloaty/third_party/googletest/googlemock/src/gmock-all.cc:40: /home/travis/bloaty_test/bloaty/third_party/googletest/googlemock/include/gmock/gmock-matchers.h: In instantiation of ‘testing::PolymorphicMatcher::PolymorphicMatcher(const Impl&) [with Impl = testing::internal::MatchesRegexMatcher]’: /home/travis/bloaty_test/bloaty/third_party/googletest/googlemock/include/gmock/gmock-matchers.h:497:10: required from ‘testing::PolymorphicMatcher testing::MakePolymorphicMatcher(const Impl&) [with Impl = testing::internal::MatchesRegexMatcher]’ /home/travis/bloaty_test/bloaty/third_party/googletest/googlemock/include/gmock/gmock-matchers.h:4024:75: required from here /home/travis/bloaty_test/bloaty/third_party/googletest/googlemock/include/gmock/gmock-matchers.h:432:67: error: implicitly-declared ‘testing::internal::MatchesRegexMatcher::MatchesRegexMatcher(const testing::internal::MatchesRegexMatcher&)’ is deprecated [-Werror=deprecated-copy] 432 | explicit PolymorphicMatcher(const Impl& animpl) : impl(an_impl) {} | ^ In file included from /home/travis/bloaty_test/bloaty/third_party/googletest/googletest/include/gtest/internal/gtest-linked_ptr.h:74, from /home/travis/bloaty_test/bloaty/third_party/googletest/googlemock/include/gmock/internal/gmock-port.h:53, from /home/travis/bloaty_test/bloaty/third_party/googletest/googlemock/include/gmock/internal/gmock-generated-internal-utils.h:44, from /home/travis/bloaty_test/bloaty/third_party/googletest/googlemock/include/gmock/internal/gmock-internal-utils.h:45, from /home/travis/bloaty_test/bloaty/third_party/googletest/googlemock/include/gmock/gmock-actions.h:46, from /home/travis/bloaty_test/bloaty/third_party/googletest/googlemock/include/gmock/gmock.h:58, from /home/travis/bloaty_test/bloaty/third_party/googletest/googlemock/src/gmock-all.cc:40: /home/travis/bloaty_test/bloaty/third_party/googletest/googletest/include/gtest/internal/gtest-port.h:900:8: note: because ‘testing::internal::MatchesRegexMatcher’ has user-provided ‘void testing::internal::MatchesRegexMatcher::operator=(const testing::internal::MatchesRegexMatcher&)’ 900 | void operator=(type const &) | ^ ~~~ /home/travis/bloaty_test/bloaty/third_party/googletest/googlemock/include/gmock/gmock-matchers.h:1369:3: note: in expansion of macro ‘GTEST_DISALLOWASSIGN’ 1369 | GTEST_DISALLOWASSIGN(MatchesRegexMatcher); | ^~~~~~ In file included from /home/travis/bloaty_test/bloaty/third_party/googletest/googlemock/include/gmock/gmock-spec-builders.h:75, from /home/travis/bloaty_test/bloaty/third_party/googletest/googlemock/include/gmock/gmock-generated-function-mockers.h:43, from /home/travis/bloaty_test/bloaty/third_party/googletest/googlemock/include/gmock/gmock.h:61, from /home/travis/bloaty_test/bloaty/third_party/googletest/googlemock/src/gmock-all.cc:40: /home/travis/bloaty_test/bloaty/third_party/googletest/googlemock/include/gmock/gmock-matchers.h: In instantiation of ‘testing::PolymorphicMatcher::PolymorphicMatcher(const Impl&) [with Impl = testing::internal::StrEqualityMatcher<std::cxx11::basic_string >]’: /home/travis/bloaty_test/bloaty/third_party/googletest/googlemock/include/gmock/gmock-matchers.h:497:10: required from ‘testing::PolymorphicMatcher cxx11::basic_stringtesting::MakePolymorphicMatcher(const Impl&) [with Impl = testing::internal::StrEqualityMatcher<std:: >]’ /home/travis/bloaty_test/bloaty/third_party/googletest/googlemock/include/gmock/gmock-matchers.h:4049:23: required from here /home/travis/bloaty_test/bloaty/third_party/googletest/googlemock/include/gmock/gmock-matchers.h:432:67: error: implicitly-declared ‘testing::internal::StrEqualityMatcher<std::cxx11::basic_string >::StrEqualityMatcher(const testing::internal::StrEqualityMatcher<std:: cxx11::basic_string>&)’ is deprecated [-Werror=deprecated-copy] 432 | explicit PolymorphicMatcher(const Impl& animpl) : impl(an_impl) {} | ^ In file included from /home/travis/bloaty_test/bloaty/third_party/googletest/googletest/include/gtest/internal/gtest-linked_ptr.h:74, from /home/travis/bloaty_test/bloaty/third_party/googletest/googlemock/include/gmock/internal/gmock-port.h:53, from /home/travis/bloaty_test/bloaty/third_party/googletest/googlemock/include/gmock/internal/gmock-generated-internal-utils.h:44, from /home/travis/bloaty_test/bloaty/third_party/googletest/googlemock/include/gmock/internal/gmock-internal-utils.h:45, from /home/travis/bloaty_test/bloaty/third_party/googletest/googlemock/include/gmock/gmock-actions.h:46, from /home/travis/bloaty_test/bloaty/third_party/googletest/googlemock/include/gmock/gmock.h:58, from /home/travis/bloaty_test/bloaty/third_party/googletest/googlemock/src/gmock-all.cc:40: /home/travis/bloaty_test/bloaty/third_party/googletest/googletest/include/gtest/internal/gtest-port.h:900:8: note: because ‘testing::internal::StrEqualityMatcher<std::cxx11::basic_string >’ has user-provided ‘void testing::internal::StrEqualityMatcher cxx11::basic_string::operator=(const testing::internal::StrEqualityMatcher &) [with StringType = std:: ]’ 900 | void operator=(type const &) | ^ ~~~ /home/travis/bloaty_test/bloaty/third_party/googletest/googlemock/include/gmock/gmock-matchers.h:1180:3: note: in expansion of macro ‘GTEST_DISALLOWASSIGN’ 1180 | GTEST_DISALLOWASSIGN(StrEqualityMatcher); | ^~~~~~ In file included from /home/travis/bloaty_test/bloaty/third_party/googletest/googlemock/include/gmock/gmock-spec-builders.h:75, from /home/travis/bloaty_test/bloaty/third_party/googletest/googlemock/include/gmock/gmock-generated-function-mockers.h:43, from /home/travis/bloaty_test/bloaty/third_party/googletest/googlemock/include/gmock/gmock.h:61, from /home/travis/bloaty_test/bloaty/third_party/googletest/googlemock/src/gmock-all.cc:40: /home/travis/bloaty_test/bloaty/third_party/googletest/googlemock/include/gmock/gmock-matchers.h: In instantiation of ‘testing::PolymorphicMatcher::PolymorphicMatcher(const Impl&) [with Impl = testing::internal::HasSubstrMatcher<std::cxx11::basic_string >]’: /home/travis/bloaty_test/bloaty/third_party/googletest/googlemock/include/gmock/gmock-matchers.h:497:10: required from ‘testing::PolymorphicMatcher cxx11::basic_stringtesting::MakePolymorphicMatcher(const Impl&) [with Impl = testing::internal::HasSubstrMatcher<std:: >]’ /home/travis/bloaty_test/bloaty/third_party/googletest/googlemock/include/gmock/gmock-matchers.h:4078:17: required from here /home/travis/bloaty_test/bloaty/third_party/googletest/googlemock/include/gmock/gmock-matchers.h:432:67: error: implicitly-declared ‘testing::internal::HasSubstrMatcher<std::cxx11::basic_string >::HasSubstrMatcher(const testing::internal::HasSubstrMatcher<std:: cxx11::basic_string>&)’ is deprecated [-Werror=deprecated-copy] 432 | explicit PolymorphicMatcher(const Impl& animpl) : impl(an_impl) {} | ^ In file included from /home/travis/bloaty_test/bloaty/third_party/googletest/googletest/include/gtest/internal/gtest-linked_ptr.h:74, from /home/travis/bloaty_test/bloaty/third_party/googletest/googlemock/include/gmock/internal/gmock-port.h:53, from /home/travis/bloaty_test/bloaty/third_party/googletest/googlemock/include/gmock/internal/gmock-generated-internal-utils.h:44, from /home/travis/bloaty_test/bloaty/third_party/googletest/googlemock/include/gmock/internal/gmock-internal-utils.h:45, from /home/travis/bloaty_test/bloaty/third_party/googletest/googlemock/include/gmock/gmock-actions.h:46, from /home/travis/bloaty_test/bloaty/third_party/googletest/googlemock/include/gmock/gmock.h:58, from /home/travis/bloaty_test/bloaty/third_party/googletest/googlemock/src/gmock-all.cc:40: /home/travis/bloaty_test/bloaty/third_party/googletest/googletest/include/gtest/internal/gtest-port.h:900:8: note: because ‘testing::internal::HasSubstrMatcher<std::cxx11::basic_string >’ has user-provided ‘void testing::internal::HasSubstrMatcher cxx11::basic_string::operator=(const testing::internal::HasSubstrMatcher &) [with StringType = std:: ]’ 900 | void operator=(type const &) | ^ ~~~ /home/travis/bloaty_test/bloaty/third_party/googletest/googlemock/include/gmock/gmock-matchers.h:1227:3: note: in expansion of macro ‘GTEST_DISALLOWASSIGN’ 1227 | GTEST_DISALLOWASSIGN(HasSubstrMatcher); | ^~~~~~ In file included from /home/travis/bloaty_test/bloaty/third_party/googletest/googlemock/include/gmock/gmock-spec-builders.h:75, from /home/travis/bloaty_test/bloaty/third_party/googletest/googlemock/include/gmock/gmock-generated-function-mockers.h:43, from /home/travis/bloaty_test/bloaty/third_party/googletest/googlemock/include/gmock/gmock.h:61, from /home/travis/bloaty_test/bloaty/third_party/googletest/googlemock/src/gmock-all.cc:40: /home/travis/bloaty_test/bloaty/third_party/googletest/googlemock/include/gmock/gmock-matchers.h: In instantiation of ‘testing::PolymorphicMatcher::PolymorphicMatcher(const Impl&) [with Impl = testing::internal::StartsWithMatcher<std::cxx11::basic_string >]’: /home/travis/bloaty_test/bloaty/third_party/googletest/googlemock/include/gmock/gmock-matchers.h:497:10: required from ‘testing::PolymorphicMatcher cxx11::basic_stringtesting::MakePolymorphicMatcher(const Impl&) [with Impl = testing::internal::StartsWithMatcher<std:: >]’ /home/travis/bloaty_test/bloaty/third_party/googletest/googlemock/include/gmock/gmock-matchers.h:4085:14: required from here /home/travis/bloaty_test/bloaty/third_party/googletest/googlemock/include/gmock/gmock-matchers.h:432:67: error: implicitly-declared ‘testing::internal::StartsWithMatcher<std::cxx11::basic_string >::StartsWithMatcher(const testing::internal::StartsWithMatcher<std:: cxx11::basic_string>&)’ is deprecated [-Werror=deprecated-copy] 432 | explicit PolymorphicMatcher(const Impl& animpl) : impl(an_impl) {} | ^ In file included from /home/travis/bloaty_test/bloaty/third_party/googletest/googletest/include/gtest/internal/gtest-linked_ptr.h:74, from /home/travis/bloaty_test/bloaty/third_party/googletest/googlemock/include/gmock/internal/gmock-port.h:53, from /home/travis/bloaty_test/bloaty/third_party/googletest/googlemock/include/gmock/internal/gmock-generated-internal-utils.h:44, from /home/travis/bloaty_test/bloaty/third_party/googletest/googlemock/include/gmock/internal/gmock-internal-utils.h:45, from /home/travis/bloaty_test/bloaty/third_party/googletest/googlemock/include/gmock/gmock-actions.h:46, from /home/travis/bloaty_test/bloaty/third_party/googletest/googlemock/include/gmock/gmock.h:58, from /home/travis/bloaty_test/bloaty/third_party/googletest/googlemock/src/gmock-all.cc:40: /home/travis/bloaty_test/bloaty/third_party/googletest/googletest/include/gtest/internal/gtest-port.h:900:8: note: because ‘testing::internal::StartsWithMatcher<std::cxx11::basic_string >’ has user-provided ‘void testing::internal::StartsWithMatcher cxx11::basic_string::operator=(const testing::internal::StartsWithMatcher &) [with StringType = std:: ]’ 900 | void operator=(type const &) | ^ ~~~ /home/travis/bloaty_test/bloaty/third_party/googletest/googlemock/include/gmock/gmock-matchers.h:1274:3: note: in expansion of macro ‘GTEST_DISALLOWASSIGN’ 1274 | GTEST_DISALLOWASSIGN(StartsWithMatcher); | ^~~~~~ In file included from /home/travis/bloaty_test/bloaty/third_party/googletest/googlemock/include/gmock/gmock-spec-builders.h:75, from /home/travis/bloaty_test/bloaty/third_party/googletest/googlemock/include/gmock/gmock-generated-function-mockers.h:43, from /home/travis/bloaty_test/bloaty/third_party/googletest/googlemock/include/gmock/gmock.h:61, from /home/travis/bloaty_test/bloaty/third_party/googletest/googlemock/src/gmock-all.cc:40: /home/travis/bloaty_test/bloaty/third_party/googletest/googlemock/include/gmock/gmock-matchers.h: In instantiation of ‘testing::PolymorphicMatcher::PolymorphicMatcher(const Impl&) [with Impl = testing::internal::EndsWithMatcher<std::cxx11::basic_string >]’: /home/travis/bloaty_test/bloaty/third_party/googletest/googlemock/include/gmock/gmock-matchers.h:497:10: required from ‘testing::PolymorphicMatcher cxx11::basic_stringtesting::MakePolymorphicMatcher(const Impl&) [with Impl = testing::internal::EndsWithMatcher<std:: >]’ /home/travis/bloaty_test/bloaty/third_party/googletest/googlemock/include/gmock/gmock-matchers.h:4092:14: required from here /home/travis/bloaty_test/bloaty/third_party/googletest/googlemock/include/gmock/gmock-matchers.h:432:67: error: implicitly-declared ‘testing::internal::EndsWithMatcher<std::cxx11::basic_string >::EndsWithMatcher(const testing::internal::EndsWithMatcher<std:: cxx11::basic_string>&)’ is deprecated [-Werror=deprecated-copy] 432 | explicit PolymorphicMatcher(const Impl& animpl) : impl(an_impl) {} | ^ In file included from /home/travis/bloaty_test/bloaty/third_party/googletest/googletest/include/gtest/internal/gtest-linked_ptr.h:74, from /home/travis/bloaty_test/bloaty/third_party/googletest/googlemock/include/gmock/internal/gmock-port.h:53, from /home/travis/bloaty_test/bloaty/third_party/googletest/googlemock/include/gmock/internal/gmock-generated-internal-utils.h:44, from /home/travis/bloaty_test/bloaty/third_party/googletest/googlemock/include/gmock/internal/gmock-internal-utils.h:45, from /home/travis/bloaty_test/bloaty/third_party/googletest/googlemock/include/gmock/gmock-actions.h:46, from /home/travis/bloaty_test/bloaty/third_party/googletest/googlemock/include/gmock/gmock.h:58, from /home/travis/bloaty_test/bloaty/third_party/googletest/googlemock/src/gmock-all.cc:40: /home/travis/bloaty_test/bloaty/third_party/googletest/googletest/include/gtest/internal/gtest-port.h:900:8: note: because ‘testing::internal::EndsWithMatcher<std::cxx11::basic_string >’ has user-provided ‘void testing::internal::EndsWithMatcher cxx11::basic_string::operator=(const testing::internal::EndsWithMatcher &) [with StringType = std:: ]’ 900 | void operator=(type const &) | ^ ~~~ /home/travis/bloaty_test/bloaty/third_party/googletest/googlemock/include/gmock/gmock-matchers.h:1320:3: note: in expansion of macro ‘GTEST_DISALLOWASSIGN’ 1320 | GTEST_DISALLOWASSIGN(EndsWithMatcher); | ^~~~~~ cc1plus: all warnings being treated as errors make[2]: [third_party/googletest/googlemock/CMakeFiles/gmock.dir/build.make:76: third_party/googletest/googlemock/CMakeFiles/gmock.dir/src/gmock-all.cc.o] Error 1 make[1]: [CMakeFiles/Makefile2:1183: third_party/googletest/googlemock/CMakeFiles/gmock.dir/all] Error 2 make: *** [Makefile:141: all] Error 2
I just tested this AVR branch, but not with AVR binary. I used a risc-v ELF64 binary for which the master version of bloaty gave an error: "Unknown ELF machine value: 243'"
Everything seems to work out of the box for me.
@X-Ryl669 I suppose this will be the case for you too
@TravisDean The error you have is related to a warning for using deprecated gmock API and having warnings threated as error. I have the same error but only when building the master branch, not the avr branch.
Actually I spoke a bit too soon, using "-d compileunits " or "-d inlines" fails with:
Unexpected source: 2
bloaty: /.../bloaty/src/bloaty.cc:269: std::string bloaty::ItaniumDemangle(absl::string_view, bloaty::DataSource): Assertion `false' failed.
Aborted (core dumped)
@haberman doesn't work on master as is with compileunits, get unknown elf machine architecture value: 83 with avr branch, get same error as @thmxv,
nexpected source: 1
bloaty.avr: /home/jason/bloaty-avr/src/bloaty.cc:269: std::string bloaty::ItaniumDemangle(absl::string_view, bloaty::DataSource): Assertion `false' failed.
Aborted (core dumped)
I believe both of these issues should be fixed now.
Please give it a try and let me know if it doesn't work for you.
Just some information in case someone wants to add support for the Atmel AVR architecture to bloaty.
I have tried analysing an elf-file compiled for the ATmega328P microcontroller (Atmel 8-bit AVR RISC-based architecture), which failed with the error "Unknown ELF machine value: 83'".
The error is raised in elf.cc at line 850 since EM_AVR (value 83) does not get handled there. After a quick look at the documentation of the capstone decompiler, it seems that AVR microcontrollers are not explicitly supported (?). But I gave it a try anyway by selecting the ARM architecture (also RISC-based) with little endian and the resulting bloaty binary seems to be working fine with AVR elf-files after this little addition to the switch statement in the function ElfMachineToCapstone():
case EM_AVR: *arch = CS_ARCH_ARM; *mode = CS_MODE_LITTLE_ENDIAN; break;
Note though, that I do not know much about processor architectures and the way capstone works, so the question remains, if this change introduces problems I am not yet aware of (if anyone could provide additional information in this regard, I'd be grateful).
Many thanks to the developers for this useful tool!