[lldb-dev] connecting lldb to a qemu system-mode session.
I'm having a hard time trying to figure out how to get lldb to attach to a qemu system mode session. Does lldb support something like: "target remote /tmp/gdb-socket0"? Thanks, ___ lldb-dev mailing list lldb-dev@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev
Re: [lldb-dev] connecting lldb to a qemu system-mode session.
You want the gdb-remote command. lldb has an apropos command, so for instance: (lldb) apropos remote The following commands may relate to 'remote': gdb-remote -- Connect to a process via remote GDB server. If no host is specifed, localhost is assumed. etc... Jim > On Oct 21, 2021, at 11:45 AM, Sid Manning via lldb-dev > wrote: > > I’m having a hard time trying to figure out how to get lldb to attach to a > qemu system mode session. > > Does lldb support something like: “target remote /tmp/gdb-socket0”? > > Thanks, > > ___ > lldb-dev mailing list > lldb-dev@lists.llvm.org > https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev ___ lldb-dev mailing list lldb-dev@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev
Re: [lldb-dev] connecting lldb to a qemu system-mode session.
> -Original Message- > From: Jim Ingham > Sent: Thursday, October 21, 2021 2:31 PM > To: Sid Manning > Cc: LLDB Dev > Subject: Re: [lldb-dev] connecting lldb to a qemu system-mode session. > > WARNING: This email originated from outside of Qualcomm. Please be wary > of any links or attachments, and do not enable macros. > > You want the gdb-remote command. lldb has an apropos command, so for > instance: > > (lldb) apropos remote > The following commands may relate to 'remote': > gdb-remote -- Connect to a process via remote GDB server. If > no > host is specifed, localhost is assumed. > I think I found the correct command: process connect unix-connect:///tmp/gdb-socket Would be what is needed when qemu is started using something like these options: -chardev socket,path=/tmp/gdb-socket,port=::1234,server=on,wait=off,id=gdb0 -gdb chardev:gdb0 Thanks, > etc... > > Jim > > > On Oct 21, 2021, at 11:45 AM, Sid Manning via lldb-dev d...@lists.llvm.org> wrote: > > > > I’m having a hard time trying to figure out how to get lldb to attach to a > qemu system mode session. > > > > Does lldb support something like: “target remote /tmp/gdb-socket0”? > > > > Thanks, > > > > ___ > > lldb-dev mailing list > > lldb-dev@lists.llvm.org > > https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev ___ lldb-dev mailing list lldb-dev@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev
[lldb-dev] [Bug 52257] New: lldb crashes when printing variable
https://bugs.llvm.org/show_bug.cgi?id=52257 Bug ID: 52257 Summary: lldb crashes when printing variable Product: lldb Version: unspecified Hardware: PC OS: All Status: NEW Severity: normal Priority: P Component: All Bugs Assignee: lldb-dev@lists.llvm.org Reporter: jgo...@google.com CC: jdevliegh...@apple.com, llvm-b...@lists.llvm.org Reproduction steps: 1. Save the following code as crash.ii template struct pair {}; struct A { using iterator = pair; pair a_[]; }; struct B { using iterator = A::iterator; iterator begin(); A *tag_set_; }; B b; 2. clang++ -g -c crash.ii 3. lldb -o 'print b' crash.o On a debug lldb build close to top of tree, lldb crashes with the assertion failure and stack trace pasted below. Note that the failure also reproduces after building with `-fstandalone-debug`. (lldb) target create "crash.o" Current executable set to '/usr/local/google/home/jgorbe/lldb/crash.o' (x86_64). (lldb) print b lldb: /usr/local/google/home/jgorbe/code/llvm/llvm/../clang/include/clang/AST/DeclCXX.h:435: struct DefinitionData &clang::CXXRecordDecl::data() const: Assertion `DD && "queried property of class with no definition"' failed. PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace. Stack dump: 0. Program arguments: /usr/local/google/home/jgorbe/code/llvm-build/bin/lldb -o "print b" crash.o #0 0x003d36da llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) /usr/local/google/home/jgorbe/code/llvm/llvm/lib/Support/Unix/Signals.inc:565:11 #1 0x003d388b PrintStackTraceSignalHandler(void*) /usr/local/google/home/jgorbe/code/llvm/llvm/lib/Support/Unix/Signals.inc:632:1 #2 0x003d1f53 llvm::sys::RunSignalHandlers() /usr/local/google/home/jgorbe/code/llvm/llvm/lib/Support/Signals.cpp:97:5 #3 0x003d3fb5 SignalHandler(int) /usr/local/google/home/jgorbe/code/llvm/llvm/lib/Support/Unix/Signals.inc:407:1 #4 0x7fd2f6dc08e0 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x138e0) #5 0x7fd2e70b8e71 raise ./signal/../sysdeps/unix/sysv/linux/raise.c:50:1 #6 0x7fd2e70a2536 abort ./stdlib/abort.c:81:7 #7 0x7fd2e70a241f get_sysdep_segment_value ./intl/loadmsgcat.c:509:8 #8 0x7fd2e70a241f _nl_load_domain ./intl/loadmsgcat.c:970:34 #9 0x7fd2e70b17f2 (/lib/x86_64-linux-gnu/libc.so.6+0x357f2) #10 0x7fd2eea9fdb7 clang::CXXRecordDecl::data() const /usr/local/google/home/jgorbe/code/llvm/llvm/../clang/include/clang/AST/DeclCXX.h:436:13 #11 0x7fd2eeb42095 clang::CXXRecordDecl::bases_begin() const /usr/local/google/home/jgorbe/code/llvm/llvm/../clang/include/clang/AST/DeclCXX.h:597:58 #12 0x7fd2f1618b49 clang::CXXRecordDecl::bases() const /usr/local/google/home/jgorbe/code/llvm/clang/include/clang/AST/DeclCXX.h:593:35 #13 0x7fd2f16ad990 isSafeToConvert(clang::RecordDecl const*, clang::CodeGen::CodeGenTypes&, llvm::SmallPtrSet&) /usr/local/google/home/jgorbe/code/llvm/clang/lib/CodeGen/CodeGenTypes.cpp:149:31 #14 0x7fd2f16adbc2 isSafeToConvert(clang::QualType, clang::CodeGen::CodeGenTypes&, llvm::SmallPtrSet&) /usr/local/google/home/jgorbe/code/llvm/clang/lib/CodeGen/CodeGenTypes.cpp:177:5 #15 0x7fd2f16adc16 isSafeToConvert(clang::QualType, clang::CodeGen::CodeGenTypes&, llvm::SmallPtrSet&) /usr/local/google/home/jgorbe/code/llvm/clang/lib/CodeGen/CodeGenTypes.cpp:181:5 #16 0x7fd2f16adaf0 isSafeToConvert(clang::RecordDecl const*, clang::CodeGen::CodeGenTypes&, llvm::SmallPtrSet&) /usr/local/google/home/jgorbe/code/llvm/clang/lib/CodeGen/CodeGenTypes.cpp:158:9 #17 0x7fd2f16ac6a2 isSafeToConvert(clang::RecordDecl const*, clang::CodeGen::CodeGenTypes&) /usr/local/google/home/jgorbe/code/llvm/clang/lib/CodeGen/CodeGenTypes.cpp:198:3 #18 0x7fd2f16aca62 clang::CodeGen::CodeGenTypes::ConvertRecordDeclType(clang::RecordDecl const*) /usr/local/google/home/jgorbe/code/llvm/clang/lib/CodeGen/CodeGenTypes.cpp:832:7 #19 0x7fd2f16ab45f clang::CodeGen::CodeGenTypes::ConvertType(clang::QualType) /usr/local/google/home/jgorbe/code/llvm/clang/lib/CodeGen/CodeGenTypes.cpp:416:5 #20 0x7fd2f16ab23d clang::CodeGen::CodeGenTypes::ConvertTypeForMem(clang::QualType, bool) /usr/local/google/home/jgorbe/code/llvm/clang/lib/CodeGen/CodeGenTypes .cpp:98:15 #21 0x7fd2f16abad6 clang::CodeGen::CodeGenTypes::ConvertType(clang::QualType) /usr/local/google/home/jgorbe/code/llvm/clang/lib/CodeGen/CodeGenTypes.cpp:643:17 #22 0x7fd2f16ab23d clang::CodeGen::CodeGenTypes::ConvertTypeForMem(clang::QualType, bool) /usr/local/google/home/jgorbe/code/llvm/clang/lib/CodeGen/CodeGenTypes.cpp:98:15 #23 0x7fd2f1cbf1ab (anonymous namespace)::CGRecordLowering::getStorageType(clang::FieldDecl const*) /usr/local/google/home/jgorbe/code/llvm/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp:148:17 #24 0x7fd2f1cbda67 (anonymou