radareorg / radare2

UNIX-like reverse engineering framework and command-line toolset
https://www.radare.org/
GNU Lesser General Public License v3.0
20.61k stars 3k forks source link

Increase size column in iS 1 char at least #12207

Closed radare closed 5 years ago

radare commented 5 years ago

most sections are >100K, so we need 1 more char to show that without

[0x00000000]> iS
[Sections]
Nm Paddr       Size Vaddr      Memsz Perms Name
00 0x00000000 65537 0x00000000 65537 -rwx TEXT
01 0x00010000 16385 0x00010000 16385 -rwx DATA
02 0x00014000 360449 0x00014000 360449 -rwx LLVM
03 0x0006c000 131073 0x0006c000 131073 -rwx LINKEDIT
radare commented 5 years ago

There are also other issues to handle vaddr/paddr columns, so we should probably use the table api to render this info

[0x1000011ec]> iS
[Sections]
Nm Paddr        Size Vaddr      Memsz Perms Name
00 0x00000f0c  13588 0x100000f0c 13588 -r-x 0.__TEXT.__text
01 0x00004420    456 0x100004420   456 -r-x 1.__TEXT.__stubs
02 0x000045e8    776 0x1000045e8   776 -r-x 2.__TEXT.__stub_helper
03 0x000048f0    504 0x1000048f0   504 -r-x 3.__TEXT.__const
04 0x00004ae8   1151 0x100004ae8  1151 -r-x 4.__TEXT.__cstring
05 0x00004f68    144 0x100004f68   144 -r-x 5.__TEXT.__unwind_info
06 0x00005000     16 0x100005000    16 -rw- 6.__DATA.__nl_symbol_ptr
07 0x00005010     40 0x100005010    40 -rw- 7.__DATA.__got
08 0x00005038    608 0x100005038   608 -rw- 8.__DATA.__la_symbol_ptr
09 0x000052a0    552 0x1000052a0   552 -rw- 9.__DATA.__const
10 0x000054d0     40 0x1000054d0    40 -rw- 10.__DATA.__data
11 0x00000000      0 0x100005500   224 -rw- 11.__DATA.__bss
12 0x00000000      0 0x1000055e0   140 -rw- 12.__DATA.__common
radare commented 5 years ago
pmb:elf pancake$ r2 hello.ppc
 -- git blind --hard
[0x10000308]> ii
[Imports]
Num  Vaddr       Bind      Type Name
   1 0x4743430a  GLOBAL    FUNC printf
   2 0x4743431a    WEAK  NOTYPE __gmon_start__
   3 0x4743432a  GLOBAL    FUNC __libc_start_main
radare commented 5 years ago

We probably want/need to support tables. this is. implement an api to define a table of strings, this way we can properly adjust the columns size, add headers, etc without duplicating or messing the same code here and there

XVilka commented 5 years ago

There is already a suggestion for table API and it was the part of GSoC last year, and will be the part of it this year too.

On Thu, Jan 10, 2019, 5:15 PM radare <notifications@github.com wrote:

We probably want/need to support tables. this is. implement an api to define a table of strings, this way we can properly adjust the columns size, add headers, etc without duplicating or messing the same code here and there

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/radare/radare2/issues/12207#issuecomment-453024049, or mute the thread https://github.com/notifications/unsubscribe-auth/AAMZ_SbpQDvEsT9h-vwR8RMivoz9eJg6ks5vBwSigaJpZM4Yn4_D .

XVilka commented 5 years ago

Here you go https://github.com/radare/radare2/issues/7519

On Thu, Jan 10, 2019, 8:03 PM XVilka Haos of System <xvilka@gmail.com wrote:

There is already a suggestion for table API and it was the part of GSoC last year, and will be the part of it this year too.

On Thu, Jan 10, 2019, 5:15 PM radare <notifications@github.com wrote:

We probably want/need to support tables. this is. implement an api to define a table of strings, this way we can properly adjust the columns size, add headers, etc without duplicating or messing the same code here and there

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/radare/radare2/issues/12207#issuecomment-453024049, or mute the thread https://github.com/notifications/unsubscribe-auth/AAMZ_SbpQDvEsT9h-vwR8RMivoz9eJg6ks5vBwSigaJpZM4Yn4_D .

deepakchethan commented 5 years ago

@radare and @XVilka, Should I just insert space or wait for the table API?

radare commented 5 years ago

better wait for the table api imho

On 16 Apr 2019, at 18:13, Deepak Chethan notifications@github.com wrote:

Should I just insert space for this time or wait for the table API ?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/radare/radare2/issues/12207#issuecomment-483729012, or mute the thread https://github.com/notifications/unsubscribe-auth/AA3-lnMLluaVXtjxD3JuYzXhhhX24J9sks5vhfaZgaJpZM4Yn4_D.

deepakchethan commented 5 years ago

Currently, the there is no need of an extra space in iS. It would be better if we close this and have the generic table api one open.