title: GDB find command error "warning: Unable to access x bytes of target memory at y, halting search"
body: <p>I'm trying to find current flag count in KMines by using gdb. I know that I should look for memory mappings first to avoid non-existent memory locations. So I ran <code>info proc mappings</code> command to see the memory segments. I picked up a random memory gap (<code>0xd27000-0x168b000</code>) from the result and executed the find command like this: <code>find 0x00d27000, 0x0168b000, 10</code></p>
  
  <p>But I got the <code>warning: Unable to access 1458 bytes of target memory at 0x168aa4f, halting search.</code> error. Although the address 0x168aa4f is between 0xd27000 and 0x168b000, gdb says that it can't access to it. Why does this happen? What can I do to avoid this situation? Or is there a way to ignore unmapped/unaccessible memory locations?</p>
  
  <p>Edit: I tried to set the value of the address 0x168aa4f to 1 and it works, so gdb can actually access that address but gives error when used with the find command. But why?</p>