作者:klyz 此贴贴于2011-4-12 14:08:49,已被阅读561次/回复1 
bomb lab 求助!
现在我们在解一个Bomb lab, 我相信很多人听说过.... 
目前我卡在phase_2上面,下面是汇编码 

0000000000401068 <phase_2>: 
  401068:        55                           push   %rbp 
  401069:        53                           push   %rbx 
  40106a:        48 83 ec 28                  sub    $0x28,%rsp 
  40106e:        48 89 e3                     mov    %rsp,%rbx    // rbx = -5896 
  401071:        48 89 e6                     mov    %rsp,%rsi     // rsi =  -5896 
  401074:        e8 08 05 00 00               callq  401581 <read_six_numbers> 
  401079:        48 83 c3 04                  add    $0x4,%rbx 
  40107d:        48 8d 6c 24 18               lea    0x18(%rsp),%rbp 
  401082:        8b 43 fc                     mov    0xfffffffffffffffc(%rbx),%eax 
  401085:        83 c0 05                     add    $0x5,%eax 
  401088:        39 03                        cmp    %eax,(%rbx) 
  40108a:        74 05                        je     401091 <phase_2+0x29> 
  40108c:        e8 ba 04 00 00               callq  40154b <explode_bomb> 
  401091:        48 83 c3 04                  add    $0x4,%rbx 
  401095:        48 39 eb                     cmp    %rbp,%rbx 
  401098:        75 e8                        jne    401082 <phase_2+0x1a> 
  40109a:        48 83 c4 28                  add    $0x28,%rsp 
  40109e:        5b                           pop    %rbx 
  40109f:        5d                           pop    %rbp 
  4010a0:        c3                           retq    

0000000000401581 <read_six_numbers>: for phase 2 
  401581:        48 83 ec 18                  sub    $0x18,%rsp    // rsp = -5904 
  401585:        48 8d 4e 04                  lea    0x4(%rsi),%rcx    // rcx 32767 
  401589:        48 8d 46 14                  lea    0x14(%rsi),%rax   //rax = 0 
  40158d:        48 89 44 24 08               mov    %rax,0x8(%rsp) 
  401592:        48 8d 46 10                  lea    0x10(%rsi),%rax 
  401596:        48 89 04 24                  mov    %rax,(%rsp) // rsp = -6176 
  40159a:        4c 8d 4e 0c                  lea    0xc(%rsi),%r9  // %r9 = 0 
  40159e:        4c 8d 46 08                  lea    0x8(%rsi),%r8 //6303792prin 
  4015a2:        48 89 f2                     mov    %rsi,%rdx  // rsi = -8, rdx = -8 
  4015a5:        be a0 1d 40 00               mov    $0x401da0(37)  ,%esi 
  4015aa:        b8 00 00 00 00               mov    $0x0,%eax 
  4015af:        e8 fc f5 ff ff               callq  400bb0 <sscanf@plt> 
  4015b4:        83 f8 05                     cmp    $0x5,%eax 
  4015b7:        7f 05                        jg     4015be <read_six_numbers+0x3d> 
  4015b9:        e8 8d ff ff ff               callq  40154b <explode_bomb> 
  4015be:        48 83 c4 18                  add    $0x18,%rsp 
  4015c2:        c3                           retq    

jg 
4015be <read_six_numbers+0x3d> 这样就会执行,然后就能跳过 

callq 
40154b <explode_bomb>,这样炸弹就不会爆炸。。。。可是我为什么没法看到 

0x5和eax的值? 


是不是我的方向错了?大家给点提示!!感激不尽!!

此贴的回复贴(直接):
at&t的语法规则大家都不熟哦....另外不太明白你的问题435 zoologist 2011-4-12 21:53:21 0 正常