title: How to cast a function name to an address and add offset in LLDB?
body: <p>Say, I have two adjacent functions <code>subfunc()</code> and <code>main()</code> in the Mach-O executable and want to disassemble all instructions from <code>subfunc()</code> to <code>main()+0x10.</code></p>
  
  <p>I know I can cast functions to addresses using <code>`(void(*)())subfunc`</code> - isn't there an easier way?</p>
  
  <p>My attempt is as follows, but I get the error message below:</p>
  
  <p><code>dis -s `(void(*)())subfunc` -e `(void(*)())main+0x10` 
  error: error: arithmetic on a pointer to the function type 'void ()'
  </code></p>
  
  <p>How can I fix this?</p>