Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

organize parseheap output #37

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

organize parseheap output #37

wants to merge 1 commit into from

Conversation

snorez
Copy link

@snorez snorez commented Jun 22, 2019

Hi, scwuaptx. Thanks for you work.

I try to make the output of parseheap organised, line less than 80 characters.
Column width could be easily modified.

gdb-peda> parseheap 
addr              prev      size      status    fd                bk                
0x602000          0x0       0x30      Freed     0x0               None              
0x602030          0x0       0x30      Used      None              None              
0x602060          0x0       0x30      Used      None              None              
0x602090          0x0       0x40      Used      None              None              
0x6020d0          0x0       0x40      Used      None              None              
0x602110          0x0       0x50      Used      None              None              
0x602160          0x0       0x50      Used      None              None              
0x6021b0          0x0       0x430     Freed     0x7ffff7dd1b78    0x7ffff7dd1b78    
0x6025e0          0x430     0x30      Used      None              None              
gdb-peda> 

@scwuaptx
Copy link
Owner

Thank you for your PR.
but in some case :

gdb-peda$ parseheap
addr              prev      size      status    fd                bk                
0x55555575f000    0x0       0x250     Used      None              None              
0x55555575f250    0x0       0x11c10   Used      None              None              
0x555555770e60    0x0       0x410     Used      None              None              
0x555555771270    0x0       0x1010    Used      None              None              
0x555555772280    0x0       0x50      Freed     0x5555557724f0    None              
0x5555557722d0    0x0       0x210     Freed     0x0               None              
0x5555557724e0    0x0       0x50      Freed     0x0               None              
0x555555772530    0x0       0x1f0     Freed     0x0               None              
0x555555772720    0x0       0x30      Used      None              None              
0x555555772750    0x55555577276c0x20      Used      None              None              
0x555555772770    0x0       0x20      Used      None              None              
0x555555772790    0x0       0x30      Used      None              None              
0x5555557727c0    0x5555557727dc0x20      Used      None              None              
0x5555557727e0    0x0       0x20      Used      None              None              
0x555555772800    0x0       0x30      Used      None              None              
0x555555772830    0x55555577284c0x20      Used      None              None              
0x555555772850    0x0       0x20      Used      None              None  

If you enable pie and prev has long value, it would mess up. :(

@snorez
Copy link
Author

snorez commented Jun 24, 2019

@scwuaptx That is right. However, you could just make lens=[19, 19, 19, 12, 19, 19] to make it look pretty. BTW, the size value could not be that large very often.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants