Skip to content
  • Peter Wortmann's avatar
    Generate .loc/.file directives from source ticks · 64678e9e
    Peter Wortmann authored
    This generates DWARF, albeit indirectly using the assembler. This is
    the easiest (and, apparently, quite standard) method of generating the
    .debug_line DWARF section.
    
    Notes:
    
    * Note we have to make sure that .file directives appear correctly
      before the respective .loc. Right now we ppr them manually, which makes
      them absent from dumps. Fixing this would require .file to become a
      native instruction.
    
    * We have to pass a lot of things around the native code generator. I
      know Ian did quite a bit of refactoring already, but having one common
      monad could *really* simplify things here...
    
    * To support SplitObjcs, we need to emit/reset all DWARF data at every
      split. We use the occassion to move split marker generation to
      cmmNativeGenStream as well, so debug data extraction doesn't have to
      choke on it.
    
    (From Phabricator D396)
    64678e9e