Re: [lldb-dev] [Bug 25896] New: Hide stack frames from specific source files

2015-12-20 Thread Todd Fiala via lldb-dev
Sounds like you almost want the ability to do a backtrace projection.  At
one point I wanted this for cross C++/Java frames, but I haven't worked on
that problem in some time.

Android folks - did we ever add anything to support hiding some of the
trampolines or other call sites involved in the C++/Java transitions?

-Todd

On Sat, Dec 19, 2015 at 3:44 PM, via lldb-dev 
wrote:

> Bug ID 25896  Summary Hide
> stack frames from specific source files Product lldb Version unspecified
> Hardware All OS All Status NEW Severity enhancement Priority P Component All
> Bugs Assignee lldb-dev@lists.llvm.org Reporter chinmayga...@gmail.com CC
> llvm-b...@lists.llvm.org Classification Unclassified
>
> When my program is paused in the debugger, I would like to hide stack frames
> originating from certain source files (or libraries) from appearing in the
> backtrace. These frames usually correspond to standard library functions that 
> I
> am not in the process of actively debugging.
>
> On a similar note, I did find `target.process.thread.step-avoid-regexp` which
> allows me to avoid stepping into select frames. However, I want to also
> suppress these frames in the backtrace listing, and, avoid showing the same
> when move up and down the bracktrace.
>
> --
> You are receiving this mail because:
>
>- You are the assignee for the bug.
>
>
> ___
> lldb-dev mailing list
> lldb-dev@lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev
>
>


-- 
-Todd
___
lldb-dev mailing list
lldb-dev@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev


Re: [lldb-dev] lldb doesn't work on centos7

2015-12-20 Thread 陶征霖 via lldb-dev
Make sense. Thanks.

2015-12-05 3:20 GMT+08:00 Greg Clayton :

> Yes the debug info does get bigger. But this is better than having the
> compiler omit the "std::string" definition so that you can't view stuff
> from the STL.
>
> Greg
>
> > On Nov 24, 2015, at 7:22 PM, 陶征霖 via lldb-dev 
> wrote:
> >
> > Also I found that the size of my program binary increases from 140M to
> 180M after -fno-limit-debug-info is added. Seems a lot of debug info is
> added?
> >
> > 2015-11-25 10:24 GMT+08:00 陶征霖 :
> > Hi Pavel,
> >
> > Thanks for your reply. Seems lldb not finding the variable in the first
> place.
> >
> > * thread #1: tid = 154, 0x00400e5e a.out`main + 94 at t.cpp:5,
> name = 'a.out', stop reason = breakpoint 1.1
> > frame #0: 0x00400e5e a.out`main + 94 at t.cpp:5
> >2   using namespace std;
> >3   int main() {
> >4  string s = "aa";
> > -> 5  cout << s;
> >6   }
> > (lldb) frame variable --raw-output s
> > (std::__1::string) s = {}
> >
> > I added -fno-limit-debug-info in my test, and it works now. But why?
> >
> > Thanks,
> > Zhenglin
> >
> >
> >
> > 2015-11-24 19:21 GMT+08:00 Pavel Labath :
> > HI,
> >
> > a couple of random shots in the dark:
> >
> > - could you paste the output of "frame variable --raw-output s"? (This
> > disables lldb's type formatters. The goal is to see if the problem is
> > in the formatter, or in lldb not finding the variable in the first
> > place).
> >
> > - could you compile your test executable with -fno-limit-debug-info
> > and see if that helps?
> >
> > pl
> >
> >
> > On 23 November 2015 at 02:15, 陶征霖 via lldb-dev 
> wrote:
> > >
> > > -- Forwarded message --
> > > From: 陶征霖 
> > > Date: 2015-11-20 23:10 GMT+08:00
> > > Subject: lldb doesn't work on centos7
> > > To: llvm-...@lists.llvm.org
> > >
> > >
> > > Hi,
> > >
> > > I build llvm+clang+lldb 3.7.0 from source code on centos7, the build
> command
> > > is "cmake -DCMAKE_BUILD_TYPE=Release
> > > -DCMAKE_INSTALL_PREFIX=${INSTALL_PREFIX} -DLLVM_LIBDIR_SUFFIX=64",
> there is
> > > no error during building process.
> > >
> > > And then I compile following c++ code using command "clang++ -std=c++11
> > > -stdlib=libc++ -lc++abi -g t.cpp":
> > > // t.cpp
> > > #include 
> > > using namespace std;
> > > int main() {
> > >string s = "aa";
> > >cout << s;
> > > }
> > > Try lldb to debug a.out, found that I can't print string s which shows
> > > empty:
> > > lldb a.out
> > > (lldb) target create "a.out"
> > > Current executable set to 'a.out' (x86_64).
> > > (lldb) l
> > >4int main() {
> > >5   string s = "aa";
> > >6   cout << s;
> > >7}
> > > (lldb) b 6
> > > Breakpoint 1: where = a.out`main + 94 at t.cpp:6, address =
> > > 0x00400e5e
> > > (lldb) r
> > > Process 150 launched: '/root/a.out' (x86_64)
> > > Process 150 stopped
> > > * thread #1: tid = 150, 0x00400e5e a.out`main + 94 at t.cpp:6,
> name
> > > = 'a.out', stop reason = breakpoint 1.1
> > > frame #0: 0x00400e5e a.out`main + 94 at t.cpp:6
> > >3using namespace std;
> > >4int main() {
> > >5   string s = "aa";
> > > -> 6   cout << s;
> > >7}
> > > (lldb) p s
> > > (std::__1::string) $0 = {}
> > >
> > > Could you please help point out what's wrong in my env? Thanks.
> > >
> > > Thanks,
> > > Zhenglin
> > >
> > > ___
> > > lldb-dev mailing list
> > > lldb-dev@lists.llvm.org
> > > http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev
> > >
> > ___
> > lldb-dev mailing list
> > lldb-dev@lists.llvm.org
> > http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev
>
>


-- 
陶征霖
Pivotal
___
lldb-dev mailing list
lldb-dev@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev


[lldb-dev] lldb -c corefile get segmentation fault on centos7

2015-12-20 Thread 陶征霖 via lldb-dev
Hi,

I build llvm+clang+lldb 3.7 successfully on centos7, and lldb -p PID works
pretty well. However when I tried lldb -c corefile executable_bin, lldb
itself core dumpped. Attached the following core info which is debugged by
gdb:
[root@dn-cn-controller-4fbd4 data1]# lldb -c a.corefile
/usr/local/myproject/bin/cnode
*(lldb) target create "/usr/local/myproject/bin/cnode" --core "a.corefile"*
Segmentation fault (core dumped)

*And then I tried gdb to check the lldb call stack:*
*(gdb) info threads*
  Id   Target Id Frame
  3Thread 0x7f81c4795700 (LWP 64) 0x7f81c9ed46d5 in
pthread_cond_wait@@GLIBC_2.3.2 ()
   from /lib64/libpthread.so.0
  2Thread 0x7f81ce580740 (LWP 59) 0x7f81c9ed46d5 in
pthread_cond_wait@@GLIBC_2.3.2 ()
   from /lib64/libpthread.so.0
* 1Thread 0x7f81c3f94700 (LWP 65) 0x7f81cbe00630 in
lldb_private::ArchSpec::GetMachine() const ()
   from /opt/dependency/tools/bin/../lib64/liblldb.so.3.7
*(gdb) bt*
#0  0x7f81cbe00630 in lldb_private::ArchSpec::GetMachine() const ()
   from /opt/dependency/tools/bin/../lib64/liblldb.so.3.7
#1  0x7f81cc20458f in
RegisterContextPOSIX_x86::RegisterContextPOSIX_x86(lldb_private::Thread&,
unsigned int, lldb_private::RegisterInfoInterface*) () from
/opt/dependency/tools/bin/../lib64/liblldb.so.3.7
#2  0x7f81cc153a24 in
RegisterContextCorePOSIX_x86_64::RegisterContextCorePOSIX_x86_64(lldb_private::Thread&,
lldb_private::RegisterInfoInterface*, lldb_private::DataExtractor const&,
lldb_private::DataExtractor const&) ()
   from /opt/dependency/tools/bin/../lib64/liblldb.so.3.7
#3  0x7f81cc151e5e in
ThreadElfCore::CreateRegisterContextForFrame(lldb_private::StackFrame*) ()
   from /opt/dependency/tools/bin/../lib64/liblldb.so.3.7
#4  0x7f81cc1523b3 in ThreadElfCore::GetRegisterContext() ()
   from /opt/dependency/tools/bin/../lib64/liblldb.so.3.7
#5  0x7f81cbfae9e2 in
lldb_private::StackFrameList::GetFramesUpTo(unsigned int) ()
   from /opt/dependency/tools/bin/../lib64/liblldb.so.3.7
#6  0x7f81cbfaf3e7 in
lldb_private::StackFrameList::ResetCurrentInlinedDepth() ()
   from /opt/dependency/tools/bin/../lib64/liblldb.so.3.7
#7  0x7f81cbfd32e2 in
lldb_private::Thread::ShouldStop(lldb_private::Event*) ()
   from /opt/dependency/tools/bin/../lib64/liblldb.so.3.7
#8  0x7f81cbfd98d2 in
lldb_private::ThreadList::ShouldStop(lldb_private::Event*) ()
   from /opt/dependency/tools/bin/../lib64/liblldb.so.3.7
#9  0x7f81cbf997bb in
lldb_private::Process::ShouldBroadcastEvent(lldb_private::Event*) ()
   from /opt/dependency/tools/bin/../lib64/liblldb.so.3.7
#10 0x7f81cbf998a1 in
lldb_private::Process::HandlePrivateEvent(std::shared_ptr&)
()
   from /opt/dependency/tools/bin/../lib64/liblldb.so.3.7
#11 0x7f81cbf9a77a in
lldb_private::Process::RunPrivateStateThread(bool) ()
   from /opt/dependency/tools/bin/../lib64/liblldb.so.3.7
#12 0x7f81cbdf7db2 in
lldb_private::HostNativeThreadBase::ThreadCreateTrampoline(void*) ()
   from /opt/dependency/tools/bin/../lib64/liblldb.so.3.7
#13 0x7f81c9ed0dc5 in start_thread () from /lib64/libpthread.so.0
#14 0x7f81c91c821d in clone () from /lib64/libc.so.6

Any suggesstion about why lldb -c core dump?

Thanks,
Zhenglin
___
lldb-dev mailing list
lldb-dev@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev