Open radare opened 8 years ago
Hi, i got dmi.
working. I have just one question.
Should it print the vaddr as it does dmi
, so rebased on the current addr? Or without rebasing?
[0x7f8093d12190]> dmi.
vaddr=0x00600948 paddr=0x00600948 ord=057 fwd=NONE sz=0 bind=GLOBAL type=NOTYPE name=_end
[0x7f8093d12190]>
or
[0x7f8093d12190]> dmi.
vaddr=0x7f8093f11948 paddr=0x00600948 ord=057 fwd=NONE sz=0 bind=GLOBAL type=NOTYPE name=_end
[0x7f8093d12190]>
I guess it's rebased but just asking
with rebasing. otherwise its useless
On 20 Jan 2017, at 10:41, leberus notifications@github.com wrote:
Hi, i got dmi. working. I have just one question. Should it print the vaddr as it does dmi, so rebased on the current addr? Or without rebasing?
[0x7f8093d12190]> dmi. vaddr=0x00600948 paddr=0x00600948 ord=057 fwd=NONE sz=0 bind=GLOBAL type=NOTYPE name=_end [0x7f8093d12190]> or
[0x7f8093d12190]> dmi. vaddr=0x7f8093f11948 paddr=0x00600948 ord=057 fwd=NONE sz=0 bind=GLOBAL type=NOTYPE name=_end [0x7f8093d12190]> I guess it's rebased but just asking
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/radare/radare2/issues/5675#issuecomment-274025532, or mute the thread https://github.com/notifications/unsubscribe-auth/AA3-lsJqL6xp95Di0ozM3Fkoa70ApluWks5rUIFmgaJpZM4J0TGX.
dmi was working already.. :?
On 20 Jan 2017, at 10:41, leberus notifications@github.com wrote:
Hi, i got dmi. working. I have just one question. Should it print the vaddr as it does dmi, so rebased on the current addr? Or without rebasing?
[0x7f8093d12190]> dmi. vaddr=0x00600948 paddr=0x00600948 ord=057 fwd=NONE sz=0 bind=GLOBAL type=NOTYPE name=_end [0x7f8093d12190]> or
[0x7f8093d12190]> dmi. vaddr=0x7f8093f11948 paddr=0x00600948 ord=057 fwd=NONE sz=0 bind=GLOBAL type=NOTYPE name=_end [0x7f8093d12190]> I guess it's rebased but just asking
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/radare/radare2/issues/5675#issuecomment-274025532, or mute the thread https://github.com/notifications/unsubscribe-auth/AA3-lsJqL6xp95Di0ozM3Fkoa70ApluWks5rUIFmgaJpZM4J0TGX.
unless I'm missing something, it's working here for me:
[0x00400516]> dmi
[Symbols]
vaddr=0x00600720 paddr=0x00000720 ord=028 fwd=NONE sz=0 bind=LOCAL type=OBJECT name=__JCR_LIST__
vaddr=0x00400440 paddr=0x00000440 ord=029 fwd=NONE sz=0 bind=LOCAL type=FUNC name=deregister_tm_clones
vaddr=0x00400480 paddr=0x00000480 ord=030 fwd=NONE sz=0 bind=LOCAL type=FUNC name=register_tm_clones
vaddr=0x004004c0 paddr=0x000004c0 ord=031 fwd=NONE sz=0 bind=LOCAL type=FUNC name=__do_global_dtors_aux
vaddr=0x00600940 paddr=0x00000940 ord=032 fwd=NONE sz=1 bind=LOCAL type=OBJECT name=completed.6661
vaddr=0x00600718 paddr=0x00000718 ord=033 fwd=NONE sz=0 bind=LOCAL type=OBJECT name=__do_global_dtors_aux_fini_array_entry
vaddr=0x004004e0 paddr=0x000004e0 ord=034 fwd=NONE sz=0 bind=LOCAL type=FUNC name=frame_dummy
vaddr=0x00600710 paddr=0x00000710 ord=035 fwd=NONE sz=0 bind=LOCAL type=OBJECT name=__frame_dummy_init_array_entry
vaddr=0x00400708 paddr=0x00000708 ord=038 fwd=NONE sz=0 bind=LOCAL type=OBJECT name=__FRAME_END__
vaddr=0x00600720 paddr=0x00000720 ord=039 fwd=NONE sz=0 bind=LOCAL type=OBJECT name=__JCR_END__
vaddr=0x00600718 paddr=0x00000718 ord=041 fwd=NONE sz=0 bind=LOCAL type=NOTYPE name=__init_array_end
vaddr=0x00600728 paddr=0x00000728 ord=042 fwd=NONE sz=0 bind=LOCAL type=OBJECT name=_DYNAMIC
vaddr=0x00600710 paddr=0x00000710 ord=043 fwd=NONE sz=0 bind=LOCAL type=NOTYPE name=__init_array_start
vaddr=0x00600900 paddr=0x00000900 ord=044 fwd=NONE sz=0 bind=LOCAL type=OBJECT name=_GLOBAL_OFFSET_TABLE_
vaddr=0x004005a0 paddr=0x000005a0 ord=045 fwd=NONE sz=2 bind=GLOBAL type=FUNC name=__libc_csu_fini
vaddr=0x00600930 paddr=0x00000930 ord=047 fwd=NONE sz=0 bind=UNKNOWN type=NOTYPE name=data_start
vaddr=0x00600940 paddr=0x00000940 ord=049 fwd=NONE sz=0 bind=GLOBAL type=NOTYPE name=_edata
vaddr=0x004005a4 paddr=0x000005a4 ord=050 fwd=NONE sz=0 bind=GLOBAL type=FUNC name=_fini
vaddr=0x00600930 paddr=0x00000930 ord=052 fwd=NONE sz=0 bind=GLOBAL type=NOTYPE name=__data_start
vaddr=0x00600938 paddr=0x00000938 ord=054 fwd=NONE sz=0 bind=GLOBAL type=OBJECT name=__dso_handle
vaddr=0x004005b0 paddr=0x000005b0 ord=055 fwd=NONE sz=4 bind=GLOBAL type=OBJECT name=_IO_stdin_used
vaddr=0x00400530 paddr=0x00000530 ord=056 fwd=NONE sz=101 bind=GLOBAL type=FUNC name=__libc_csu_init
vaddr=0x00600948 paddr=0x00600948 ord=057 fwd=NONE sz=0 bind=GLOBAL type=NOTYPE name=_end
vaddr=0x00400410 paddr=0x00000410 ord=058 fwd=NONE sz=0 bind=GLOBAL type=FUNC name=_start
vaddr=0x00600940 paddr=0x00000940 ord=059 fwd=NONE sz=0 bind=GLOBAL type=NOTYPE name=__bss_start
vaddr=0x00400516 paddr=0x00000516 ord=060 fwd=NONE sz=11 bind=GLOBAL type=FUNC name=main
vaddr=0x00400506 paddr=0x00000506 ord=062 fwd=NONE sz=16 bind=GLOBAL type=FUNC name=this_is_a_function
vaddr=0x00600940 paddr=0x00000940 ord=063 fwd=NONE sz=0 bind=GLOBAL type=OBJECT name=__TMC_END__
vaddr=0x004003a8 paddr=0x000003a8 ord=065 fwd=NONE sz=0 bind=GLOBAL type=FUNC name=_init
vaddr=0x004003e0 paddr=0x000003e0 ord=001 fwd=NONE sz=16 bind=GLOBAL type=FUNC name=imp.puts
vaddr=0x004003f0 paddr=0x000003f0 ord=002 fwd=NONE sz=16 bind=GLOBAL type=FUNC name=imp.__libc_start_main
vaddr=0x00400400 paddr=0x00000400 ord=003 fwd=NONE sz=16 bind=UNKNOWN type=NOTYPE name=imp.__gmon_start__
32 symbols
[0x00400516]> pd 2 @0x00400506
;-- this_is_a_function:
0x00400506 55 push rbp
0x00400507 4889e5 mov rbp, rsp
You might want to mark "dmi?" and "dmi." as done? :)
done :)
Hi, back on business..
dmil
should load all symbols from all loaded libraries.
That means all libraries you get with dmm
?
[0x004005e0]> dmm
0x00400000 /home/leberus/old_hdd/backup-hdd/lab/r2/3462/loadlib
0x7fd0f8bb6000 /usr/lib64/samba/libflag-mapping-samba4.so
0x7fd0f8db9000 /usr/lib64/samba/libwinbind-client-samba4.so
0x7fd0f8fbd000 /usr/lib64/libpcre.so.1.2.7
....
....
....
I dont think dmil should do that. Just list them. Iirc but i should check some code to say anything serious here
On 9 Feb 2017, at 15:26, leberus notifications@github.com wrote:
Hi, back on business..
dmil should load all symbols from all loaded libraries. That means all libraries you get with dmm ?
[0x004005e0]> dmm 0x00400000 /home/leberus/old_hdd/backup-hdd/lab/r2/3462/loadlib 0x7fd0f8bb6000 /usr/lib64/samba/libflag-mapping-samba4.so 0x7fd0f8db9000 /usr/lib64/samba/libwinbind-client-samba4.so 0x7fd0f8fbd000 /usr/lib64/libpcre.so.1.2.7 .... .... .... — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.
@leberus ^
PING
on mac, dm is uselses , but dmm shows the libarry locations properly. dmi, doesnt uses those and fails hard
Fixed for mac
Hey all,
dmi
behaves weird for me (r2 from fresh git):
$ r2 -d gdb://10.0.0.1:11000 = attach 64068 0
[0x7ffff7dde1e0]> bp 0x43c5c0
[0x7ffff7dde1e0]> dc
^C= attach 64068 0
[0x7ffff25abd23]> .!rabin2 -rs foo_server
[0x7ffff25abd23]> dmi
0x00400000 /usr/local/bin/foo_server
0x7fffed546000 /usr/lib64/libxmlsec1-openssl.so.1.2.20
0x7fffed782000 /usr/lib64/libkeyutils.so.1.5
0x7fffed986000 /usr/lib64/libkrb5support.so.0.1
0x7fffedb95000 /usr/lib64/libelf-0.166.so
0x7fffeddad000 /usr/lib64/libpcre.so.1.2.0
0x7fffee00e000 /usr/lib64/libattr.so.1.1.0
0x7fffee213000 /usr/lib64/libk5crypto.so.3.1
0x7fffee445000 /usr/lib64/libcom_err.so.2.1
0x7fffee649000 /usr/lib64/libkrb5.so.3.3
0x7fffee930000 /usr/lib64/libgssapi_krb5.so.2.2
0x7fffeeb7e000 /usr/lib64/libboost_thread.so.1.60.0
0x7fffeeda9000 /usr/lib64/libicuuc.so.50.1.2
0x7fffef122000 /usr/lib64/libicui18n.so.50.1.2
0x7fffef520000 /usr/lib64/libicudata.so.50.1.2
0x7ffff0af4000 /usr/lib64/libPocoJSON.so.31
0x7ffff0d41000 /usr/lib64/libboost_chrono.so.1.60.0
0x7ffff0f4a000 /usr/lib64/libbz2.so.1.0.6
0x7ffff115a000 /usr/lib64/libdw-0.166.so
0x7ffff13a2000 /usr/lib64/libresolv-2.17.so
0x7ffff15bc000 /usr/lib64/libgpg-error.so.0.10.0
0x7ffff17c1000 /usr/lib64/libgcrypt.so.11.8.2
0x7ffff1a42000 /usr/lib64/libselinux.so.1
0x7ffff1c69000 /usr/lib64/libcap.so.2.22
0x7ffff1e6e000 /usr/lib64/libltdl.so.7.3.0
0x7ffff2078000 /usr/lib64/liblzma.so.5.2.2
0x7ffff229e000 /usr/lib64/libz.so.1.2.7
0x7ffff24b4000 /usr/lib64/libc-2.17.so
0x7ffff2875000 /usr/lib64/libgcc_s-4.8.5-20150702.so.1
0x7ffff2a8b000 /usr/lib64/libm-2.17.so
0x7ffff2d8d000 /usr/lib64/libstdc++.so.6.0.19
0x7ffff3095000 /usr/lib64/librt-2.17.so
0x7ffff329d000 /usr/lib64/libpthread-2.17.so
0x7ffff34b9000 /usr/lib64/libACE.so.6.2.7
0x7ffff38a6000 /usr/lib64/libscrypt.so.0
0x7ffff3aac000 /usr/lib64/libcrypto.so.1.0.2k
0x7ffff3f0d000 /usr/lib64/libssl.so.1.0.2k
0x7ffff417f000 /usr/lib64/libboost_filesystem.so.1.60.0
0x7ffff43a3000 /usr/lib64/libboost_system.so.1.60.0
0x7ffff45a7000 /usr/lib64/libdl-2.17.so
0x7ffff47a9000 /us
[0x7ffff25abd23]>
wat...
[0x7ffff25abd23]> dmi /usr/local/bin/foo_server
error code 1
Wat?..
dmi.
doesn't output anything at all.
Also looks like .!rabin2 -rs foo_server
doesn't load all the symbols:
[0x0043c5c0]> .!rabin2 -rs foo_server
[0x0043c5c0]> is~Reload
[0x0043c5c0]> f~Reload
[0x0043c5c0]> !rabin2 -rs foo_server | grep Reload
f sym.foo::cFeatures::Reload_charconst 1701 0x0043c5c0
Lastly, what's the point in the second argument here? Isn't grep good enough
| dmi[libname] [symname] List symbols of target lib
This issue has been moved from radareorg/radare2 to radareorg/ideas as we are trying to clean our backlog and this issue has probably been created a long while ago. This is an effort to help contributors understand what are the actionable items they can work on, prioritize issues better and help users find active/duplicated issues more easily. If this is not an enhancement/improvement/general idea but a bug, feel free to ask for re-transfer to main repo. Thanks for your understanding and contribution with this issue.
dmil
or something like to automatically load all symbols from all loaded librariesaf+
)