[Lldb-commits] [PATCH] D93939: [elf-core] Improve reading memory	from core file
    Pavel Labath via Phabricator via lldb-commits 
    lldb-commits at lists.llvm.org
       
    Sun Jan 31 02:51:43 PST 2021
    
    
  
labath added a comment.
I think that's because lldb's dissassembler currently just stops when it encounters an unknown/invalid instruction :(, so it doesn't even get to the interesting part. If I skip over the random bytes I get:
  (lldb) disassemble --start 0x400ff0 --end 0x40100c
      0x400ff0: addb   %al, (%rax)
      0x400ff2: addb   %al, (%rax)
      0x400ff4: addb   %al, (%rax)
      0x400ff6: addb   %al, (%rax)
      0x400ff8: addb   %al, (%rax)
      0x400ffa: addb   %al, (%rax)
      0x400ffc: addb   %al, (%rax)
      0x400ffe: addb   %al, (%rax)
      0x401000: addb   %al, (%rax)
      0x401002: addb   %al, (%rax)
      0x401004: addb   %al, (%rax)
      0x401006: addb   %al, (%rax)
      0x401008: addb   %al, (%rax)
      0x40100a: addb   %al, (%rax)
With your patch I guess this would stop at `0x400ffe`.
Another option would be to ditch disassembling, and check this via memory reads, as that is what you are actually fixing:
  (lldb) memory read 0x400ff0 -c 20
  0x00400ff0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  0x00401000: 00 00 00 00                                      ....
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D93939/new/
https://reviews.llvm.org/D93939
    
    
More information about the lldb-commits
mailing list