Re: [lldb-dev] Attaching to a stopped (cored) process hangs lldb-server

2015-11-04 Thread Mark Chandler via lldb-dev
zzard Entertainment (P) 949-955-1380 x15353 -Original Message- From: jing...@apple.com [mailto:jing...@apple.com] Sent: Wednesday, November 04, 2015 10:38 AM To: Mark Chandler Cc: Greg Clayton ; lldb-dev@lists.llvm.org Subject: Re: [lldb-dev] Attaching to a stopped (cored) process hangs lldb-s

Re: [lldb-dev] Attaching to a stopped (cored) process hangs lldb-server

2015-11-04 Thread Jim Ingham via lldb-dev
rd Entertainment > (P) 949-955-1380 x15353 > > -Original Message- > From: Greg Clayton [mailto:gclay...@apple.com] > Sent: Wednesday, November 04, 2015 10:13 AM > To: Mark Chandler > Cc: Todd Fiala ; Pavel Labath ; > lldb-dev@lists.llvm.org > Subject: Re: [

Re: [lldb-dev] Attaching to a stopped (cored) process hangs lldb-server

2015-11-04 Thread Mark Chandler via lldb-dev
...@apple.com] Sent: Wednesday, November 04, 2015 10:13 AM To: Mark Chandler Cc: Todd Fiala ; Pavel Labath ; lldb-dev@lists.llvm.org Subject: Re: [lldb-dev] Attaching to a stopped (cored) process hangs lldb-server So the entire core file is in memory somehow and when it is read from STDIN will be

Re: [lldb-dev] Attaching to a stopped (cored) process hangs lldb-server

2015-11-04 Thread Greg Clayton via lldb-dev
353 > > -Original Message- > From: Greg Clayton [mailto:gclay...@apple.com] > Sent: Wednesday, November 04, 2015 10:01 AM > To: Todd Fiala > Cc: Mark Chandler ; Pavel Labath ; > lldb-dev@lists.llvm.org > Subject: Re: [lldb-dev] Attaching to a stopped (cored) process

Re: [lldb-dev] Attaching to a stopped (cored) process hangs lldb-server

2015-11-04 Thread Mark Chandler via lldb-dev
- From: Greg Clayton [mailto:gclay...@apple.com] Sent: Wednesday, November 04, 2015 10:01 AM To: Todd Fiala Cc: Mark Chandler ; Pavel Labath ; lldb-dev@lists.llvm.org Subject: Re: [lldb-dev] Attaching to a stopped (cored) process hangs lldb-server > On Nov 4, 2015, at 9:47 AM, Todd Fi

Re: [lldb-dev] Attaching to a stopped (cored) process hangs lldb-server

2015-11-04 Thread Greg Clayton via lldb-dev
> On Nov 4, 2015, at 9:47 AM, Todd Fiala wrote: > > Although doing any kind of waitpid() in the case of a core file doesn't make > sense. The process is still around. The process is being handed the core file via STDIN, but the process is still around and this tool is attaching to that proce

Re: [lldb-dev] Attaching to a stopped (cored) process hangs lldb-server

2015-11-04 Thread Todd Fiala via lldb-dev
in this? >> > >> > Greg >> > >> >> On Nov 3, 2015, at 4:41 PM, Mark Chandler >> wrote: >> >> >> >> The biggest tell is that the process state is already 'S' or stopped. >> I don’t know lldb at all to make a change to fix t

Re: [lldb-dev] Attaching to a stopped (cored) process hangs lldb-server

2015-11-04 Thread Todd Fiala via lldb-dev
] > Sent: Tuesday, November 03, 2015 5:41 PM > To: Greg Clayton > Cc: Mark Chandler ; lldb-dev@lists.llvm.org > Subject: Re: [lldb-dev] Attaching to a stopped (cored) process hangs > lldb-server > > I'm following this discussion, but I don't yet understand what is

Re: [lldb-dev] Attaching to a stopped (cored) process hangs lldb-server

2015-11-03 Thread Mark Chandler via lldb-dev
[mailto:lab...@google.com] Sent: Tuesday, November 03, 2015 5:41 PM To: Greg Clayton Cc: Mark Chandler ; lldb-dev@lists.llvm.org Subject: Re: [lldb-dev] Attaching to a stopped (cored) process hangs lldb-server I'm following this discussion, but I don't yet understand what is goi

Re: [lldb-dev] Attaching to a stopped (cored) process hangs lldb-server

2015-11-03 Thread Pavel Labath via lldb-dev
---Original Message----- >> From: Greg Clayton [mailto:gclay...@apple.com] >> Sent: Tuesday, November 03, 2015 4:39 PM >> To: Mark Chandler >> Cc: lldb-dev@lists.llvm.org >> Subject: Re: [lldb-dev] Attaching to a stopped (cored) process hangs >> lldb-server >

Re: [lldb-dev] Attaching to a stopped (cored) process hangs lldb-server

2015-11-03 Thread Mark Chandler via lldb-dev
y...@apple.com] > Sent: Tuesday, November 03, 2015 4:39 PM > To: Mark Chandler mailto:mchand...@blizzard.com>> > Cc: lldb-dev@lists.llvm.org<mailto:lldb-dev@lists.llvm.org> > Subject: Re: [lldb-dev] Attaching to a stopped (cored) process hangs > lldb-server > > Makes s

Re: [lldb-dev] Attaching to a stopped (cored) process hangs lldb-server

2015-11-03 Thread Greg Clayton via lldb-dev
Mark Chandler >> Battle.Net Engineering Systems | Blizzard Entertainment >> (P) 949-955-1380 x15353 >> >> -Original Message- >> From: Greg Clayton [mailto:gclay...@apple.com] >> Sent: Tuesday, November 03, 2015 4:34 PM >> To: Mark Chandler >> Cc:

Re: [lldb-dev] Attaching to a stopped (cored) process hangs lldb-server

2015-11-03 Thread Mark Chandler via lldb-dev
ilto:gclay...@apple.com] Sent: Tuesday, November 03, 2015 4:39 PM To: Mark Chandler Cc: lldb-dev@lists.llvm.org Subject: Re: [lldb-dev] Attaching to a stopped (cored) process hangs lldb-server Makes sense about not writing the core file to disk. Is there a way you can detect this "core" mode

Re: [lldb-dev] Attaching to a stopped (cored) process hangs lldb-server

2015-11-03 Thread Greg Clayton via lldb-dev
Sent: Tuesday, November 03, 2015 4:34 PM > To: Mark Chandler > Cc: lldb-dev@lists.llvm.org > Subject: Re: [lldb-dev] Attaching to a stopped (cored) process hangs > lldb-server > > One different approach is to have your tool write all STDIN to a file (the > core file comes in

Re: [lldb-dev] Attaching to a stopped (cored) process hangs lldb-server

2015-11-03 Thread Greg Clayton via lldb-dev
So you would save the file, create a target: const char *core_path = ...; // Save STDIN to a file and put path in "core_path" const bool source_init_files = false; debugger = lldb::SBDebugger::Create(source_init_files); target = debugger.CreateTarget(None); process = target.LoadCore(core_path);

Re: [lldb-dev] Attaching to a stopped (cored) process hangs lldb-server

2015-11-03 Thread Mark Chandler via lldb-dev
: lldb-dev@lists.llvm.org Subject: Re: [lldb-dev] Attaching to a stopped (cored) process hangs lldb-server One different approach is to have your tool write all STDIN to a file (the core file comes into the tool as STDIN bytes) and then hand LLDB the core file and do any needed backtracing and data

Re: [lldb-dev] Attaching to a stopped (cored) process hangs lldb-server

2015-11-03 Thread Greg Clayton via lldb-dev
One different approach is to have your tool write all STDIN to a file (the core file comes into the tool as STDIN bytes) and then hand LLDB the core file and do any needed backtracing and data gathering from the core file instead of actually attaching to the process for real. All executable and

[lldb-dev] Attaching to a stopped (cored) process hangs lldb-server

2015-11-02 Thread Mark Chandler via lldb-dev
So im trying to write a core handler program and use lldb to attach and dump important information about it. This works if a use my tool to attach to an existing one but I found that lldb-server will hang in a waitpid call if the kernel has invoked the tool after another process has cored. Exam