snare / voltron

A hacky debugger UI for hackers
MIT License
6.18k stars 414 forks source link

Alignment issue #214

Open iviirai opened 7 years ago

iviirai commented 7 years ago

Hi, there is a alignment problem in disasm view.

[disassembly]                                                                   
=> 0x80485a1 <main+46>: movb   $0x67,-0x2d(%ebp)
   0x80485a5 <main+50>: movb   $0x62,-0x2c(%ebp)
   0x80485a9 <main+54>: movb   $0x7e,-0x2b(%ebp)
   0x80485ad <main+58>: movb   $0x7c,-0x2a(%ebp)
   0x80485b1 <main+62>: movb   $0x6d,-0x29(%ebp)
   0x80485b5 <main+66>: movb   $0x4d,-0x28(%ebp)
   0x80485b9 <main+70>: movb   $0x54,-0x27(%ebp)
   0x80485bd <main+74>: movb   $0xb,-0x26(%ebp)
   0x80485c1 <main+78>: movb   $0x36,-0x25(%ebp)
   0x80485c5 <main+82>: movb   $0x1a,-0x24(%ebp)
   0x80485c9 <main+86>: movb   $0x3f,-0x23(%ebp)
   0x80485cd <main+90>: movb   $0x2a,-0x22(%ebp)
   0x80485d1 <main+94>: movb   $0x7b,-0x21(%ebp)
   0x80485d5 <main+98>: movb   $0x2f,-0x20(%ebp)
   0x80485d9 <main+102>:    movb   $0x24,-0x1f(%ebp)
   0x80485dd <main+106>:    movb   $0x25,-0x1e(%ebp)
   0x80485e1 <main+110>:    movb   $0x69,-0x1d(%ebp)
   0x80485e5 <main+114>:    movb   $0x29,-0x1c(%ebp)
   0x80485e9 <main+118>:    movb   $0x14,-0x1b(%ebp)
   0x80485ed <main+122>:    movb   $0x1a,-0x1a(%ebp)
   0x80485f1 <main+126>:    movb   $0x5b,-0x19(%ebp)
   0x80485f5 <main+130>:    movb   $0xc,-0x18(%ebp)
   0x80485f9 <main+134>:    movb   $0xd,-0x17(%ebp)
snare commented 7 years ago

The disassembly view just takes the output from the debugger's disassembly command and syntax highlights it. This is generated by the debugger.

iviirai commented 7 years ago

But disass in gdb gives a different output.

   0x080485c1 <+78>:    movb   $0x36,-0x25(%ebp)
   0x080485c5 <+82>:    movb   $0x1a,-0x24(%ebp)
   0x080485c9 <+86>:    movb   $0x3f,-0x23(%ebp)
   0x080485cd <+90>:    movb   $0x2a,-0x22(%ebp)
   0x080485d1 <+94>:    movb   $0x7b,-0x21(%ebp)
   0x080485d5 <+98>:    movb   $0x2f,-0x20(%ebp)
   0x080485d9 <+102>:   movb   $0x24,-0x1f(%ebp)
   0x080485dd <+106>:   movb   $0x25,-0x1e(%ebp)
   0x080485e1 <+110>:   movb   $0x69,-0x1d(%ebp)
   0x080485e5 <+114>:   movb   $0x29,-0x1c(%ebp)