Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -312,11 +312,6 @@ libdemangle_options = [
'default_library=static',
'use_swift_demangler=false',
]
if get_option('use_gpl')
libdemangle_options += 'use_gpl=true'
else
libdemangle_options += 'use_gpl=false'
endif

libdemangle_proj = subproject('libdemangle', default_options: libdemangle_options)
libdemangle_dep = libdemangle_proj.get_variable('libdemangle_dep')
Expand Down
2 changes: 1 addition & 1 deletion subprojects/libdemangle.wrap
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[wrap-git]
url = https://github.com/rizinorg/rz-libdemangle.git
revision = d3083c18befed11069b65c57c2ad79fa5d9afba4
revision = 2350eb19c3eac935effdfbbe1fb01256b59edfa1
depth = 1
30 changes: 15 additions & 15 deletions test/db/cmd/bug_duplicate_vtables
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ nth addr vt_offset type name
3 0x00400ac8 0x00000000 VIRTUAL method.A.greet

[std]
[std::basic_ostream_char__std::char_traits_char_____std]
nth addr vt_offset type name
-----------------------------------------------------------------------
1 0x00400890 ---------- DEFAULT operator<< <std::char_traits<char> >
2 0x004008b0 ---------- DEFAULT endl<char, std::char_traits<char> >
[std::basic_ostream_char__std::char_traits_char____std]
nth addr vt_offset type name
---------------------------------------------------------------------
1 0x00400890 ---------- DEFAULT operator<<<std::char_traits<char>>
2 0x004008b0 ---------- DEFAULT endl<char, std::char_traits<char>>

[std::ios_base::Init]
nth addr vt_offset type name
Expand Down Expand Up @@ -77,11 +77,11 @@ nth addr vt_offset type name
3 0x00400ac8 0x00000000 VIRTUAL method.A.greet

[std]
[std::basic_ostream_char__std::char_traits_char_____std]
nth addr vt_offset type name
-----------------------------------------------------------------------
1 0x00400890 ---------- DEFAULT operator<< <std::char_traits<char> >
2 0x004008b0 ---------- DEFAULT endl<char, std::char_traits<char> >
[std::basic_ostream_char__std::char_traits_char____std]
nth addr vt_offset type name
---------------------------------------------------------------------
1 0x00400890 ---------- DEFAULT operator<<<std::char_traits<char>>
2 0x004008b0 ---------- DEFAULT endl<char, std::char_traits<char>>

[std::ios_base::Init]
nth addr vt_offset type name
Expand Down Expand Up @@ -120,11 +120,11 @@ nth addr vt_offset type name
3 0x00400ac8 0x00000000 VIRTUAL method.A.greet

[std]
[std::basic_ostream_char__std::char_traits_char_____std]
nth addr vt_offset type name
-----------------------------------------------------------------------
1 0x00400890 ---------- DEFAULT operator<< <std::char_traits<char> >
2 0x004008b0 ---------- DEFAULT endl<char, std::char_traits<char> >
[std::basic_ostream_char__std::char_traits_char____std]
nth addr vt_offset type name
---------------------------------------------------------------------
1 0x00400890 ---------- DEFAULT operator<<<std::char_traits<char>>
2 0x004008b0 ---------- DEFAULT endl<char, std::char_traits<char>>

[std::ios_base::Init]
nth addr vt_offset type name
Expand Down
2 changes: 1 addition & 1 deletion test/db/cmd/cmd_ac
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,7 @@ aaa
aclj
EOF
EXPECT=<<EOF
[{"name":"B","bases":[{"id":"0","name":"A","offset":0}],"vtables":[{"id":"0","addr":4197640,"offset":0}],"methods":[{"name":"B","addr":4197198,"type":"CONSTRUCTOR"},{"name":"printValue","addr":4197250,"type":"VIRTUAL","vtable_offset":8},{"name":"method.A.greet","addr":4197064,"type":"VIRTUAL","vtable_offset":0}]},{"name":"std::ios_base::Init","bases":[],"vtables":[],"methods":[{"name":"Init","addr":4196432,"type":"DEFAULT"},{"name":"~Init","addr":4196480,"type":"DEFAULT"}]},{"name":"std","bases":[],"vtables":[],"methods":[]},{"name":"std::ostream","bases":[],"vtables":[],"methods":[{"name":"operator<<","addr":4196400,"type":"DEFAULT"},{"name":"operator<<","addr":4196512,"type":"DEFAULT"}]},{"name":"std::basic_ostream_char__std::char_traits_char_____std","bases":[],"vtables":[],"methods":[{"name":"operator<< <std::char_traits<char> >","addr":4196496,"type":"DEFAULT"},{"name":"endl<char, std::char_traits<char> >","addr":4196528,"type":"DEFAULT"}]},{"name":"A","bases":[],"vtables":[{"id":"0","addr":4197672,"offset":0}],"methods":[{"name":"greet","addr":4197064,"type":"VIRTUAL","vtable_offset":0},{"name":"printValue","addr":4197108,"type":"VIRTUAL","vtable_offset":8},{"name":"A","addr":4197174,"type":"CONSTRUCTOR"}]},{"name":"C","bases":[{"id":"0","name":"A","offset":0}],"vtables":[{"id":"0","addr":4197608,"offset":0}],"methods":[{"name":"C","addr":4197316,"type":"CONSTRUCTOR"},{"name":"printValue","addr":4197368,"type":"VIRTUAL","vtable_offset":8},{"name":"method.A.greet","addr":4197064,"type":"VIRTUAL","vtable_offset":0}]}]
[{"name":"B","bases":[{"id":"0","name":"A","offset":0}],"vtables":[{"id":"0","addr":4197640,"offset":0}],"methods":[{"name":"B","addr":4197198,"type":"CONSTRUCTOR"},{"name":"printValue","addr":4197250,"type":"VIRTUAL","vtable_offset":8},{"name":"method.A.greet","addr":4197064,"type":"VIRTUAL","vtable_offset":0}]},{"name":"std::basic_ostream_char__std::char_traits_char____std","bases":[],"vtables":[],"methods":[{"name":"operator<<<std::char_traits<char>>","addr":4196496,"type":"DEFAULT"},{"name":"endl<char, std::char_traits<char>>","addr":4196528,"type":"DEFAULT"}]},{"name":"std::ios_base::Init","bases":[],"vtables":[],"methods":[{"name":"Init","addr":4196432,"type":"DEFAULT"},{"name":"~Init","addr":4196480,"type":"DEFAULT"}]},{"name":"std","bases":[],"vtables":[],"methods":[]},{"name":"std::ostream","bases":[],"vtables":[],"methods":[{"name":"operator<<","addr":4196400,"type":"DEFAULT"},{"name":"operator<<","addr":4196512,"type":"DEFAULT"}]},{"name":"A","bases":[],"vtables":[{"id":"0","addr":4197672,"offset":0}],"methods":[{"name":"greet","addr":4197064,"type":"VIRTUAL","vtable_offset":0},{"name":"printValue","addr":4197108,"type":"VIRTUAL","vtable_offset":8},{"name":"A","addr":4197174,"type":"CONSTRUCTOR"}]},{"name":"C","bases":[{"id":"0","name":"A","offset":0}],"vtables":[{"id":"0","addr":4197608,"offset":0}],"methods":[{"name":"C","addr":4197316,"type":"CONSTRUCTOR"},{"name":"printValue","addr":4197368,"type":"VIRTUAL","vtable_offset":8},{"name":"method.A.greet","addr":4197064,"type":"VIRTUAL","vtable_offset":0}]}]
EOF
RUN

Expand Down
96 changes: 46 additions & 50 deletions test/db/cmd/cmd_acll
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ nth addr vt_offset type name
3 0x00400ac8 0x00000000 VIRTUAL method.A.greet

[std]
[std::basic_ostream_char__std::char_traits_char_____std]
nth addr vt_offset type name
-----------------------------------------------------------------------
1 0x00400890 ---------- DEFAULT operator<< <std::char_traits<char> >
2 0x004008b0 ---------- DEFAULT endl<char, std::char_traits<char> >
[std::basic_ostream_char__std::char_traits_char____std]
nth addr vt_offset type name
---------------------------------------------------------------------
1 0x00400890 ---------- DEFAULT operator<<<std::char_traits<char>>
2 0x004008b0 ---------- DEFAULT endl<char, std::char_traits<char>>

[std::ios_base::Init]
nth addr vt_offset type name
Expand Down Expand Up @@ -89,10 +89,10 @@ nth addr vt_offset type name
4 0x00001602 ---------- DESTRUCTOR ~Triangle

[std]
[std::basic_ostream_char__std::char_traits_char_____std]
nth addr vt_offset type name
----------------------------------------------------------------------
1 ---------- ---------- DEFAULT endl<char, std::char_traits<char> >
[std::basic_ostream_char__std::char_traits_char____std]
nth addr vt_offset type name
---------------------------------------------------------------------
1 ---------- ---------- DEFAULT endl<char, std::char_traits<char>>

[std::ios_base::Init]
nth addr vt_offset type name
Expand Down Expand Up @@ -148,10 +148,10 @@ nth addr vt_offset type name
4 0x00001602 ---------- DESTRUCTOR ~Triangle

[std]
[std::basic_ostream_char__std::char_traits_char_____std]
nth addr vt_offset type name
----------------------------------------------------------------------
1 ---------- ---------- DEFAULT endl<char, std::char_traits<char> >
[std::basic_ostream_char__std::char_traits_char____std]
nth addr vt_offset type name
---------------------------------------------------------------------
1 ---------- ---------- DEFAULT endl<char, std::char_traits<char>>

[std::ios_base::Init]
nth addr vt_offset type name
Expand Down Expand Up @@ -182,10 +182,10 @@ nth addr vt_offset type name
2 0x004008da 0x00000000 VIRTUAL print

[std]
[std::basic_ostream_char__std::char_traits_char_____std]
nth addr vt_offset type name
-----------------------------------------------------------------------
1 0x00400660 ---------- DEFAULT operator<< <std::char_traits<char> >
[std::basic_ostream_char__std::char_traits_char____std]
nth addr vt_offset type name
---------------------------------------------------------------------
1 0x00400660 ---------- DEFAULT operator<<<std::char_traits<char>>

[std::ios_base::Init]
nth addr vt_offset type name
Expand Down Expand Up @@ -230,10 +230,10 @@ nth addr vt_offset type name
2 0x00400ac0 ---------- DEFAULT ~Mammal

[std]
[std::basic_ostream_char__std::char_traits_char_____std]
nth addr vt_offset type name
-----------------------------------------------------------------------
1 0x004007c0 ---------- DEFAULT operator<< <std::char_traits<char> >
[std::basic_ostream_char__std::char_traits_char____std]
nth addr vt_offset type name
---------------------------------------------------------------------
1 0x004007c0 ---------- DEFAULT operator<<<std::char_traits<char>>

[std::ios_base::Init]
nth addr vt_offset type name
Expand Down Expand Up @@ -303,25 +303,21 @@ nth addr vt_offset type name
-----------------------------------------------------------------------
1 0x100003838 ---------- DEFAULT __compressed_pair_elem[abi:v160006]

[std::__1::__compressed_pair_elem_std::__1::basic_string_char__std::__1::char_traits_char___std::__1::allocator_char___::__rep__0__false_]
[std::__1::__compressed_pair_elem_std::__1::basic_string_char__std::__1::char_traits_char___std::__1::allocator_char__::__rep__0__false_]
nth addr vt_offset type name
-----------------------------------------------------------------------
1 0x100003824 ---------- DEFAULT __compressed_pair_elem[abi:v160006]
2 0x1000039b8 ---------- DEFAULT __get[abi:v160006]
3 0x1000039f0 ---------- DEFAULT __get[abi:v160006]

[std::__1::__compressed_pair_std::__1::basic_string_char__std::__1::char_traits_char___std::__1::allocator_char___::__rep__std::__1::allocator_char___]
nth addr vt_offset type name
------------------------------------------------------
1 0x100003994 ---------- DEFAULT first[abi:v160006]
2 0x1000039cc ---------- DEFAULT first[abi:v160006]

[std::__1::__default_init_tag___std::__1::__compressed_pair_std::__1::basic_string_char__std::__1::char_traits_char___std::__1::allocator_char___::__rep__std::__1::allocator_char___]
[std::__1::__compressed_pair_std::__1::basic_string_char__std::__1::char_traits_char___std::__1::allocator_char__::__rep__std::__1::allocator_char__]
nth addr vt_offset type name
------------------------------------------------------------------------------------------------------------------------------
1 0x10000379c ---------- DEFAULT __compressed_pair[abi:v160006]<std::__1::__default_init_tag, std::__1::__default_init_tag>
2 0x100003994 ---------- DEFAULT first[abi:v160006]
3 0x1000039cc ---------- DEFAULT first[abi:v160006]

[std::__1::__non_trivial_if_true__std::__1::allocator_char___]
[std::__1::__non_trivial_if_true__std::__1::allocator_char__]
nth addr vt_offset type name
-----------------------------------------------------------------
1 0x100003890 ---------- DEFAULT __non_trivial_if[abi:v160006]
Expand All @@ -331,33 +327,33 @@ nth addr vt_offset type name
----------------------------------------------------------
1 0x100003864 ---------- DEFAULT allocator[abi:v160006]

[std::__1::basic_ios_char__std::__1::char_traits_char___]
[std::__1::basic_ios_char__std::__1::char_traits_char__]
nth addr vt_offset type name
---------------------------------------------------------
1 0x1000035a0 ---------- DEFAULT fill[abi:v160006]
2 0x100003628 ---------- DEFAULT setstate[abi:v160006]
3 0x100003a6c ---------- DEFAULT rdbuf[abi:v160006]
4 0x100003ad8 ---------- DEFAULT widen[abi:v160006]

[std::__1::basic_ostream_char__std::__1::char_traits_char___::sentry]
[std::__1::basic_ostream_char__std::__1::char_traits_char__::sentry]
nth addr vt_offset type name
--------------------------------------------------------------
1 0x1000032f8 ---------- DEFAULT operator bool[abi:v160006]
2 0x100003ce8 ---------- DEFAULT sentry
3 0x100003cf4 ---------- DEFAULT ~sentry

[std::__1::basic_ostream_char__std::__1::char_traits_char_____std::__1]
nth addr vt_offset type name
-------------------------------------------------------------------------------------------------------------
1 0x100002ea0 ---------- DEFAULT operator<<[abi:v160006]<std::__1::char_traits<char> >
2 0x1000030d8 ---------- DEFAULT __put_character_sequence[abi:v160006]<char, std::__1::char_traits<char> >
[std::__1::basic_ostream_char__std::__1::char_traits_char____std::__1]
nth addr vt_offset type name
------------------------------------------------------------------------------------------------------------
1 0x100002ea0 ---------- DEFAULT operator<<[abi:v160006]<std::__1::char_traits<char>>
2 0x1000030d8 ---------- DEFAULT __put_character_sequence[abi:v160006]<char, std::__1::char_traits<char>>

[std::__1::basic_streambuf_char__std::__1::char_traits_char___]
[std::__1::basic_streambuf_char__std::__1::char_traits_char__]
nth addr vt_offset type name
------------------------------------------------------
1 0x10000367c ---------- DEFAULT sputn[abi:v160006]

[std::__1::basic_string_char__std::__1::char_traits_char___std::__1::allocator_char___]
[std::__1::basic_string_char__std::__1::char_traits_char___std::__1::allocator_char__]
nth addr vt_offset type name
--------------------------------------------------------------------
1 0x1000036b8 ---------- DEFAULT basic_string[abi:v160006]
Expand All @@ -382,9 +378,9 @@ nth addr vt_offset type name
1 0x100003b88 ---------- DEFAULT widen[abi:v160006]

[std::__1::ctype_char__const__std::__1]
nth addr vt_offset type name
----------------------------------------------------------------------------------
1 0x100003b5c ---------- DEFAULT use_facet[abi:v160006]<std::__1::ctype<char> >
nth addr vt_offset type name
---------------------------------------------------------------------------------
1 0x100003b5c ---------- DEFAULT use_facet[abi:v160006]<std::__1::ctype<char>>

[std::__1::ios_base]
nth addr vt_offset type name
Expand All @@ -404,26 +400,26 @@ nth addr vt_offset type name
1 0x100003c94 ---------- DEFAULT use_facet
2 0x100003d00 ---------- DEFAULT ~locale

[std::__1::ostreambuf_iterator_char__std::__1::char_traits_char___]
[std::__1::ostreambuf_iterator_char__std::__1::char_traits_char__]
nth addr vt_offset type name
--------------------------------------------------------------------
1 0x100003554 ---------- DEFAULT ostreambuf_iterator[abi:v160006]
2 0x100003604 ---------- DEFAULT failed[abi:v160006]

[std::__1::ostreambuf_iterator_char__std::__1::char_traits_char____std::__1]
nth addr vt_offset type name
-----------------------------------------------------------------------------------------------------
1 0x100003314 ---------- DEFAULT __pad_and_output[abi:v160006]<char, std::__1::char_traits<char> >
[std::__1::ostreambuf_iterator_char__std::__1::char_traits_char___std::__1]
nth addr vt_offset type name
----------------------------------------------------------------------------------------------------
1 0x100003314 ---------- DEFAULT __pad_and_output[abi:v160006]<char, std::__1::char_traits<char>>

[std::__1::pointer_traits_char__]
nth addr vt_offset type name
-----------------------------------------------------------
1 0x100003a04 ---------- DEFAULT pointer_to[abi:v160006]

[void_std::__1]
nth addr vt_offset type name
------------------------------------------------------------------------------------------------------------------------------------------------------------
1 0x1000037d8 ---------- DEFAULT __debug_db_insert_c[abi:v160006]<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >
nth addr vt_offset type name
----------------------------------------------------------------------------------------------------------------------------------------------------------
1 0x1000037d8 ---------- DEFAULT __debug_db_insert_c[abi:v160006]<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>

EOF
RUN
Expand Down
4 changes: 2 additions & 2 deletions test/db/cmd/cmd_flags
Original file line number Diff line number Diff line change
Expand Up @@ -693,8 +693,8 @@ pd 1 @ 0x000011ef @e:asm.flags.real=true
pd 1 @ 0x000011ef @e:asm.flags.real=false
EOF
EXPECT=<<EOF
0x000011ef call std::vector<int, std::allocator<int> >::vector() ; method.std::vector_int__std::allocator_int___.vector
0x000011ef call method.std::vector_int__std::allocator_int___.vector
0x000011ef call std::vector<int, std::allocator<int>>::vector() ; method.std::vector_int__std::allocator_int__.vector
0x000011ef call method.std::vector_int__std::allocator_int__.vector
EOF
RUN

Expand Down
Loading
Loading