[Lldb-commits] [PATCH] D86417: [lldb] do not propagate eTrapHandlerFrame repeatedly

Luboš Luňák via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Sat Aug 29 12:52:56 PDT 2020


llunak added a comment.

No, everything's fine :). See the updated patch. The UnwindPlan object already enters x86AssemblyInspectionEngine::AugmentUnwindPlanFromCallSite() with the lazybool uninitialized and fixing that fixes everything:

  (lldb) bt
  * thread #1, name = 'a.out', stop reason = breakpoint 1.1
    * frame #0: 0x00000000004006bb a.out`handler(sig=6) at main.c:7:5
      frame #1: 0x00007ffff7a555a0 libc.so.6`__restore_rt
      frame #2: 0x00007ffff7a55520 libc.so.6`raise + 272
      frame #3: 0x00007ffff7a56b01 libc.so.6`abort + 337
      frame #4: 0x00000000004006e9 a.out`abort_caller at main.c:12:5
      frame #5: 0x0000000000400743 a.out`main at main.c:23:5
      frame #6: 0x00007ffff7a4034a libc.so.6`__libc_start_main + 234
      frame #7: 0x00000000004005fa a.out`_start at start.S:120
  (lldb) image show-unwind -n raise
  UNWIND PLANS for libc.so.6`raise (start addr 0x7ffff7a55410)
  
  Asynchronous (not restricted to call-sites) UnwindPlan is 'eh_frame CFI plus augmentation from assembly parsing'
  Synchronous (restricted to call-sites) UnwindPlan is 'eh_frame CFI'
  
  Assembly language inspection UnwindPlan:
  This UnwindPlan originally sourced from assembly insn profiling
  This UnwindPlan is sourced from the compiler: no.
  This UnwindPlan is valid at all instruction locations: yes.
  This UnwindPlan is for a trap handler function: no.
  Address range of this UnwindPlan: [libc.so.6.PT_LOAD[0]..text + 88224-0x00000000000159e3)
  row[0]:    0: CFA=rsp +8 => rsp=CFA+0 rip=[CFA-8] 
  row[1]:    1: CFA=rsp+16 => rbx=[CFA-16] rsp=CFA+0 rip=[CFA-8] 
  row[2]:   25: CFA=rsp+288 => rbx=[CFA-16] rsp=CFA+0 rip=[CFA-8] 
  row[3]:  301: CFA=rsp+16 => rbx=[CFA-16] rsp=CFA+0 rip=[CFA-8] 
  row[4]:  302: CFA=rsp +8 => rsp=CFA+0 rip=[CFA-8] 
  row[5]:  303: CFA=rsp+288 => rbx=[CFA-16] rsp=CFA+0 rip=[CFA-8] 
  
  eh_frame UnwindPlan:
  This UnwindPlan originally sourced from eh_frame CFI
  This UnwindPlan is sourced from the compiler: yes.
  This UnwindPlan is valid at all instruction locations: no.
  This UnwindPlan is for a trap handler function: no.
  Address range of this UnwindPlan: [libc.so.6.PT_LOAD[0]..text + 88224-0x00000000000159e3)
  row[0]:    0: CFA=rsp +8 => rip=[CFA-8] 
  row[1]:    1: CFA=rsp+16 => rbx=[CFA-16] rip=[CFA-8] 
  row[2]:   25: CFA=rsp+288 => rbx=[CFA-16] rip=[CFA-8] 
  row[3]:  301: CFA=rsp+16 => rbx=[CFA-16] rip=[CFA-8] 
  row[4]:  302: CFA=rsp +8 => rbx=[CFA-16] rip=[CFA-8] 
  row[5]:  304: CFA=rsp+288 => rbx=[CFA-16] rip=[CFA-8] 
  
  eh_frame augmented UnwindPlan:
  This UnwindPlan originally sourced from eh_frame CFI plus augmentation from assembly parsing
  This UnwindPlan is sourced from the compiler: no.
  This UnwindPlan is valid at all instruction locations: yes.
  This UnwindPlan is for a trap handler function: no.
  Address range of this UnwindPlan: [libc.so.6.PT_LOAD[0]..text + 88224-0x00000000000159e3)
  row[0]:    0: CFA=rsp +8 => rip=[CFA-8] 
  row[1]:    1: CFA=rsp+16 => rbx=[CFA-16] rip=[CFA-8] 
  row[2]:   25: CFA=rsp+288 => rbx=[CFA-16] rip=[CFA-8] 
  row[3]:  301: CFA=rsp+16 => rbx=[CFA-16] rip=[CFA-8] 
  row[4]:  302: CFA=rsp +8 => rbx=[CFA-16] rip=[CFA-8] 
  row[5]:  304: CFA=rsp+288 => rbx=[CFA-16] rip=[CFA-8] 
  
  Arch default UnwindPlan:
  This UnwindPlan originally sourced from x86_64 default unwind plan
  This UnwindPlan is sourced from the compiler: no.
  This UnwindPlan is valid at all instruction locations: no.
  This UnwindPlan is for a trap handler function: no.
  row[0]:    0: CFA=rbp+16 => rbp=[CFA-16] rsp=CFA+0 rip=[CFA-8] 
  
  Arch default at entry point UnwindPlan:
  This UnwindPlan originally sourced from x86_64 at-func-entry default
  This UnwindPlan is sourced from the compiler: no.
  This UnwindPlan is valid at all instruction locations: not specified.
  This UnwindPlan is for a trap handler function: not specified.
  row[0]:    0: CFA=rsp +8 => rsp=CFA+0 rip=[CFA-8] 
  
  
  (lldb) image show-unwind -n abort
  UNWIND PLANS for libc.so.6`abort (start addr 0x7ffff7a569b0)
  
  Asynchronous (not restricted to call-sites) UnwindPlan is 'eh_frame CFI'
  Synchronous (restricted to call-sites) UnwindPlan is 'eh_frame CFI'
  
  Assembly language inspection UnwindPlan:
  This UnwindPlan originally sourced from assembly insn profiling
  This UnwindPlan is sourced from the compiler: no.
  This UnwindPlan is valid at all instruction locations: yes.
  This UnwindPlan is for a trap handler function: no.
  Address range of this UnwindPlan: [libc.so.6.PT_LOAD[0]..text + 93760-0x0000000000017090)
  row[0]:    0: CFA=rsp +8 => rsp=CFA+0 rip=[CFA-8] 
  row[1]:    7: CFA=rsp+304 => rsp=CFA+0 rip=[CFA-8] 
  row[2]:   93: CFA=rsp+432 => rsp=CFA+0 rip=[CFA-8] 
  row[3]:  105: CFA=rsp+304 => rsp=CFA+0 rip=[CFA-8] 
  row[4]:  315: CFA=rsp+432 => rsp=CFA+0 rip=[CFA-8] 
  row[5]:  327: CFA=rsp+304 => rsp=CFA+0 rip=[CFA-8] 
  row[6]:  406: CFA=rsp+432 => rsp=CFA+0 rip=[CFA-8] 
  row[7]:  418: CFA=rsp+304 => rsp=CFA+0 rip=[CFA-8] 
  
  eh_frame UnwindPlan:
  This UnwindPlan originally sourced from eh_frame CFI
  This UnwindPlan is sourced from the compiler: yes.
  This UnwindPlan is valid at all instruction locations: no.
  This UnwindPlan is for a trap handler function: no.
  Address range of this UnwindPlan: [libc.so.6.PT_LOAD[0]..text + 93760-0x0000000000017090)
  row[0]:    0: CFA=rsp +8 => rip=[CFA-8] 
  row[1]:    7: CFA=rsp+304 => rip=[CFA-8] 
  row[2]:   93: CFA=rsp+432 => rip=[CFA-8] 
  row[3]:  105: CFA=rsp+304 => rip=[CFA-8] 
  row[4]:  315: CFA=rsp+432 => rip=[CFA-8] 
  row[5]:  327: CFA=rsp+304 => rip=[CFA-8] 
  row[6]:  406: CFA=rsp+432 => rip=[CFA-8] 
  row[7]:  418: CFA=rsp+304 => rip=[CFA-8] 
  
  eh_frame augmented UnwindPlan:
  This UnwindPlan originally sourced from eh_frame CFI
  This UnwindPlan is sourced from the compiler: yes.
  This UnwindPlan is valid at all instruction locations: no.
  This UnwindPlan is for a trap handler function: no.
  Address range of this UnwindPlan: [libc.so.6.PT_LOAD[0]..text + 93760-0x0000000000017090)
  row[0]:    0: CFA=rsp +8 => rip=[CFA-8] 
  row[1]:    7: CFA=rsp+304 => rip=[CFA-8] 
  row[2]:   93: CFA=rsp+432 => rip=[CFA-8] 
  row[3]:  105: CFA=rsp+304 => rip=[CFA-8] 
  row[4]:  315: CFA=rsp+432 => rip=[CFA-8] 
  row[5]:  327: CFA=rsp+304 => rip=[CFA-8] 
  row[6]:  406: CFA=rsp+432 => rip=[CFA-8] 
  row[7]:  418: CFA=rsp+304 => rip=[CFA-8] 
  
  Arch default UnwindPlan:
  This UnwindPlan originally sourced from x86_64 default unwind plan
  This UnwindPlan is sourced from the compiler: no.
  This UnwindPlan is valid at all instruction locations: no.
  This UnwindPlan is for a trap handler function: no.
  row[0]:    0: CFA=rbp+16 => rbp=[CFA-16] rsp=CFA+0 rip=[CFA-8] 
  
  Arch default at entry point UnwindPlan:
  This UnwindPlan originally sourced from x86_64 at-func-entry default
  This UnwindPlan is sourced from the compiler: no.
  This UnwindPlan is valid at all instruction locations: not specified.
  This UnwindPlan is for a trap handler function: not specified.
  row[0]:    0: CFA=rsp +8 => rsp=CFA+0 rip=[CFA-8] 


Repository:
  rLLDB LLDB

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

https://reviews.llvm.org/D86417



More information about the lldb-commits mailing list