[PATCH] D88988: [llvm-symbolizer] Add inline stack traces for Windows.

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 5 09:33:17 PST 2020


rnk added inline comments.


================
Comment at: llvm/lib/DebugInfo/PDB/Native/NativeFunctionSymbol.cpp:70
+      CodeOffset += Annot.U1;
+      if (OffsetInFunc >= CodeOffset)
+        Found = true;
----------------
akhuang wrote:
> rnk wrote:
> > rnk wrote:
> > > I wonder if this should be `>` instead of `>=`. Consider the case of:
> > >   callq somewhere
> > >   .cv_loc ... inline location
> > >   nop # anything
> > > 
> > > Otherwise, this seems like it should work to me.
> > Any thoughts on this?
> Hm, the things I've seen are something like 
> ```
> func:
>   .cv_inline_site_id 2 ...
>   .cv_loc 2 ...
>   movl ... # inlined code
>   addl ...  # inlined code
>   .cv_loc 1
>   nop # some other instructions
>  ```
> and the address of the `movl` would be the starting offset of the S_INLINESITE. 
> 
> So the `<` would be non-inclusive but not the `>=`. 
Got it, makes sense. I think I was thinking about return addresses, where the debugger is stopped after the executing instruction, and it wants to report the line info for the previous instruction.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D88988/new/

https://reviews.llvm.org/D88988



More information about the llvm-commits mailing list