title: In GDB is it possible to give an address relative (in lines) from the start of a function?
body: <p>The subject line basically says it all.</p>
  
  <p>If I give the location based on the file and a line number, that value can change if I edit the file. In fact it tends to change quite often and in an inconvenient way if I edit more than a single function during refactoring. However, it's less likely to change if it were (line-)relative to the beginning of a function.</p>
  
  <p>In case it's not possible to give the line offset from the start of a function, then is it perhaps possible to use convenience variables to emulate it? I.e. if I would declare convenience variables that map to the start of a particular function (a list that I would keep updated)?</p>
  
  <p>According to <code>help break</code> neither seems to be available, but I thought I'd better ask to be sure.</p>
  
  <hr>
  
  <pre><code>(gdb) help break
  Set breakpoint at specified line or function.
  break [PROBE_MODIFIER] [LOCATION] [thread THREADNUM] [if CONDITION]
  PROBE_MODIFIER shall be present if the command is to be placed in a
  probe point.  Accepted values are `-probe' (for a generic, automatically
  guessed probe type) or `-probe-stap' (for a SystemTap probe).
  LOCATION may be a line number, function name, or "*" and an address.
  If a line number is specified, break at start of code for that line.
  If a function is specified, break at start of code for that function.
  If an address is specified, break at that exact address.
  With no LOCATION, uses current execution address of the selected
  stack frame.  This is useful for breaking on return to a stack frame.
  
  THREADNUM is the number from "info threads".
  CONDITION is a boolean expression.
  
  Multiple breakpoints at one place are permitted, and useful if their
  conditions are different.
  
  Do "help breakpoints" for info on other commands dealing with breakpoints.
  </code></pre>