[Lldb-commits] [Bug 11574] New: lldb:SBTarget::FindFirstType and FindTypes return different results

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Dec 14 13:32:40 PST 2011


http://llvm.org/bugs/show_bug.cgi?id=11574

             Bug #: 11574
           Summary: lldb:SBTarget::FindFirstType and FindTypes return
                    different results
           Product: lldb
           Version: unspecified
          Platform: Macintosh
        OS/Version: MacOS X
            Status: NEW
          Severity: normal
          Priority: P
         Component: All Bugs
        AssignedTo: lldb-commits at cs.uiuc.edu
        ReportedBy: nathanhowell at hotmail.com
    Classification: Unclassified


Created attachment 7732
  --> http://llvm.org/bugs/attachment.cgi?id=7732
Repro app compiled with GHC 7.2.1 x86_64

I've hit an unexpected case where target.FindFirstType returns None but
FindTypes returns a singleton list containing the correct type. The offending
object, executable and source code are attached.


Current executable set to './foo' (x86_64).
(lldb) breakpoint set -n Main_main_info
Breakpoint created: 1: name = 'Main_main_info', locations = 1
(lldb) run
Process 52668 launched: '/private/tmp/repro/foo' (x86_64)
Process 52668 stopped
* thread #1: tid = 0x2c03, 0x0000000100000fb8 foo`Main_main_info, stop reason =
breakpoint 1.1
    frame #0: 0x0000000100000fb8 foo`Main_main_info
foo`Main_main_info:
-> 0x100000fb8:  leaq   -32(%rbp), %rax
   0x100000fbc:  cmpq   %r15, %rax
   0x100000fbf:  jb     0x0000000100001054       ; Main_main_info + 156
   0x100000fc5:  addq   $16, %r12

(lldb) target modules lookup -t StgConInfoTable_
1 match found in /private/tmp/repro/foo:
id = {0xe0000081c}, name = "StgConInfoTable_", byte-size = 24, decl =
InfoTables.h:342, clang_type = "struct StgConInfoTable_ {
    StgHalfInt con_desc;
    StgHalfWord __pad_con_desc;
    StgInfoTable i;
}"

(lldb) script
Python Interactive Interpreter. To exit, type 'quit()', 'exit()' or Ctrl-D.
>>> target = lldb.debugger.GetSelectedTarget()
>>> target.FindFirstType('StgConInfoTable_')
No value <-- unexpected result
>>> tl = target.FindTypes('StgConInfoTable_')
>>> tl.GetSize()
1
>>> tl.GetTypeAtIndex(0)
struct StgConInfoTable_ {
    StgHalfInt con_desc;
    StgHalfWord __pad_con_desc;
    StgInfoTable i;
}

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the lldb-commits mailing list