Re: [Lldb-commits] [PATCH] Add a missing null pointer check in CommandObjectThread.cpp.

2015-03-23 Thread Jim Ingham
How do you get a thread that has NO frame 0? That seems weird, we always have a register context to make frame 0... Anyway, if you're going to do this, add it to the thread == NULL checks earlier on in the function so we can get out of the command with an appropriate error message. If we

Re: [Lldb-commits] [PATCH] Add a missing null pointer check in CommandObjectThread.cpp.

2015-03-23 Thread Stephane Sezer
This is a patch that I've been keeping in my branches for a while. I hit a null pointer dereference there. Looks like Ed had the same issue. I'll move the check to the beginning of the function as you suggested though. On Mon, Mar 23, 2015 at 12:01 PM, Jim Ingham jing...@apple.com wrote: How do

Re: [Lldb-commits] [PATCH] Add a missing null pointer check in CommandObjectThread.cpp.

2015-03-23 Thread Ed Maste
I encountered an issue like this early on while bringing up a new target (FreeBSD/mips64 I think), while the work was incomplete. Of course once I finished we always have frame 0, which is why I didn't commit it at the time. But it (or, perhaps just an assert) presumably will be handy when

Re: [Lldb-commits] [PATCH] Add a missing null pointer check in CommandObjectThread.cpp.

2015-03-23 Thread jingham
How do you get a thread that has NO frame 0? That seems weird, we always have a register context to make frame 0... Anyway, if you're going to do this, add it to the thread == NULL checks earlier on in the function so we can get out of the command with an appropriate error message. If we

[Lldb-commits] [PATCH] Add a missing null pointer check in CommandObjectThread.cpp.

2015-03-23 Thread Stephane Sezer
Hi clayborg, http://reviews.llvm.org/D8554 Files: source/Commands/CommandObjectThread.cpp Index: source/Commands/CommandObjectThread.cpp === --- source/Commands/CommandObjectThread.cpp +++ source/Commands/CommandObjectThread.cpp

Re: [Lldb-commits] [PATCH] Add a missing null pointer check in CommandObjectThread.cpp.

2015-03-23 Thread Ed Maste
LGTM, I think I had this same change in a local branch at one point. http://reviews.llvm.org/D8554 EMAIL PREFERENCES http://reviews.llvm.org/settings/panel/emailpreferences/ ___ lldb-commits mailing list lldb-commits@cs.uiuc.edu

Re: [Lldb-commits] [PATCH] Add a missing null pointer check in CommandObjectThread.cpp.

2015-03-23 Thread Stephane Sezer
REPOSITORY rL LLVM http://reviews.llvm.org/D8554 Files: lldb/trunk/source/Commands/CommandObjectThread.cpp Index: lldb/trunk/source/Commands/CommandObjectThread.cpp === --- lldb/trunk/source/Commands/CommandObjectThread.cpp +++

Re: [Lldb-commits] [PATCH] Add a missing null pointer check in CommandObjectThread.cpp.

2015-03-23 Thread Jason Molenda
Not worth changing the patch but fwiw you could have added eFlagRequiresFrame to the CommandObjectParsed flags for this command to do the same thing. My main reaction echoes Jim's - I don't know what it means to have a thread and no frame 0. But given that two lldb devs have hit it, I guess

Re: [Lldb-commits] [PATCH] Add a missing null pointer check in CommandObjectThread.cpp.

2015-03-23 Thread Jim Ingham
Yes, I think there are a lot of places around in lldb where we assume that if you have a valid thread you have a valid frame 0. You're not going to get very far if you don't get that right. Jim REPOSITORY rL LLVM http://reviews.llvm.org/D8554 EMAIL PREFERENCES