[lldb-dev] 'breakpoint delete' vs. 'breakpoint disable'

2018-02-16 Thread Dmitry Antipov via lldb-dev

While operating on a breakpoints, is it correct to use 'breakpoint delete' 
without
previous 'breakpoint disable'? With this scenario, I'm observing 6.0.0-rc2 
crash with:

$ /home/dantipov/.local/llvm-6.0.0/bin/lldb t-thread2
(lldb) target create "t-thread2"
Current executable set to 't-thread2' (x86_64).
(lldb) breakpoint set -n g
Breakpoint 1: where = t-thread2`g(int) + 7 at t-thread2.cc:9, address = 
0x00400d0e
(lldb) run
Process 19195 launched: '/home/dantipov/tmp/t-thread2' (x86_64)
Process 19195 stopped
* thread #2, name = 't-thread2', stop reason = breakpoint 1.1
frame #0: 0x00400d0e t-thread2`g(v=0) at t-thread2.cc:9
   6g (int v)
   7{
   8  (void) v;
-> 9 }
   10   
   11   void
   12   f (int v)
(lldb) process continue
Process 19195 resuming
Process 19195 stopped
* thread #3, name = 't-thread2', stop reason = breakpoint 1.1
frame #0: 0x00400d0e t-thread2`g(v=1) at t-thread2.cc:9
   6g (int v)
   7{
   8  (void) v;
-> 9 }
   10   
   11   void
   12   f (int v)
(lldb) process continue
Process 19195 resuming
Process 19195 stopped
* thread #2, name = 't-thread2', stop reason = breakpoint 1.1
frame #0: 0x00400d0e t-thread2`g(v=0) at t-thread2.cc:9
   6g (int v)
   7{
   8  (void) v;
-> 9 }
   10   
   11   void
   12   f (int v)
(lldb) breakpoint delete
About to delete all breakpoints, do you want to do that?: [Y/n] Y
All breakpoints removed. (1 breakpoint)
(lldb) process continue
Process 19195 resuming
Segmentation fault (core dumped)

There is no crash if 'breakpoint disable' was issued before 'breakpoint delete'.
Sample program attached.

Dmitry

---
This email message is for the sole use of the intended recipient(s) and may 
contain
confidential information.  Any unauthorized review, use, disclosure or 
distribution
is prohibited.  If you are not the intended recipient, please contact the 
sender by
reply email and destroy all copies of the original message.
---
#include 
#include 
#include 

void
g (int v)
{
  (void) v;
}

void
f (int v)
{
  while (true)
{
  g (v);
  std::this_thread::sleep_for (std::chrono::milliseconds (100 + std::rand () % 100));
}
}

int
main (int argc, char *argv[])
{
  auto max = argc > 1 ? std::atoi (argv[1]) : 2;

  std::vector T;
  for (auto i = 0; i < max; i++)
T.push_back (new std::thread (f, i));
  for (auto &t: T)
t->join ();

  return 0;
}
___
lldb-dev mailing list
lldb-dev@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev


Re: [lldb-dev] 'breakpoint delete' vs. 'breakpoint disable'

2018-02-16 Thread Greg Clayton via lldb-dev
Breakpoint disable will keep the breakpoint around and all of its locations. 
Breakpoint delete will delete it. Shouldn't make a difference and one doesn't 
have to happen before the other. Sounds like you found a bug. When things crash 
it would be good to attach a stack backtrace of why LLDB is crashing. That will 
help us to see what us causing the issue.

Greg Clayton


> On Feb 16, 2018, at 6:13 AM, Dmitry Antipov via lldb-dev 
>  wrote:
> 
> While operating on a breakpoints, is it correct to use 'breakpoint delete' 
> without
> previous 'breakpoint disable'? With this scenario, I'm observing 6.0.0-rc2 
> crash with:
> 
> $ /home/dantipov/.local/llvm-6.0.0/bin/lldb t-thread2
> (lldb) target create "t-thread2"
> Current executable set to 't-thread2' (x86_64).
> (lldb) breakpoint set -n g
> Breakpoint 1: where = t-thread2`g(int) + 7 at t-thread2.cc:9, address = 
> 0x00400d0e
> (lldb) run
> Process 19195 launched: '/home/dantipov/tmp/t-thread2' (x86_64)
> Process 19195 stopped
> * thread #2, name = 't-thread2', stop reason = breakpoint 1.1
>frame #0: 0x00400d0e t-thread2`g(v=0) at t-thread2.cc:9
>   6   g (int v)
>   7   {
>   8 (void) v;
> -> 9  }
>   10  
>   11  void
>   12  f (int v)
> (lldb) process continue
> Process 19195 resuming
> Process 19195 stopped
> * thread #3, name = 't-thread2', stop reason = breakpoint 1.1
>frame #0: 0x00400d0e t-thread2`g(v=1) at t-thread2.cc:9
>   6   g (int v)
>   7   {
>   8 (void) v;
> -> 9  }
>   10  
>   11  void
>   12  f (int v)
> (lldb) process continue
> Process 19195 resuming
> Process 19195 stopped
> * thread #2, name = 't-thread2', stop reason = breakpoint 1.1
>frame #0: 0x00400d0e t-thread2`g(v=0) at t-thread2.cc:9
>   6   g (int v)
>   7   {
>   8 (void) v;
> -> 9  }
>   10  
>   11  void
>   12  f (int v)
> (lldb) breakpoint delete
> About to delete all breakpoints, do you want to do that?: [Y/n] Y
> All breakpoints removed. (1 breakpoint)
> (lldb) process continue
> Process 19195 resuming
> Segmentation fault (core dumped)
> 
> There is no crash if 'breakpoint disable' was issued before 'breakpoint 
> delete'.
> Sample program attached.
> 
> Dmitry
> 
> ---
> This email message is for the sole use of the intended recipient(s) and may 
> contain
> confidential information.  Any unauthorized review, use, disclosure or 
> distribution
> is prohibited.  If you are not the intended recipient, please contact the 
> sender by
> reply email and destroy all copies of the original message.
> ---
> ___
> 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


Re: [lldb-dev] [llvm-dev] [GSoC 2018] Introduction and Project Proposal

2018-02-16 Thread via lldb-dev
Hi Mohammed,
For an LLDB project you probably want to post your note on 
lldb-dev@lists.llvm.org to get the attention of 
the main developers.  There is a lot of overlap in the communities and 
obviously LLDB is hosted on llvm.org, but it does have its own mailing lists.
Good luck!
--paulr

From: llvm-dev [mailto:llvm-dev-boun...@lists.llvm.org] On Behalf Of Mohammed 
Nafees via llvm-dev
Sent: Friday, February 16, 2018 11:50 AM
To: llvm-dev
Subject: [llvm-dev] [GSoC 2018] Introduction and Project Proposal

Hello,

I am Mohammed Nafees, a Computer Science student at the University of Waterloo, 
Canada and I am going to apply for Google Summer of Code 2018. I am interested 
in working on the project "Reimplement LLDB's command-line commands using the 
public SB API. ". How can I start, and how can I contact the mentors?

I have completed Google Summer of Code 2017 with KDE (project 
URL),
 and I have been associated with KDE since 2013 where I mainly contribute to 
the Marble Virtual Globe project. My resume is 
here. I 
am currently interning at McAfee LLC, Waterloo, Ontario, Canada up until April.

Looking forward to a reply and a follow-up on how to get started :)

Best,
Nafees.


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