1. To handle the expression with spaces, this command uses 2 arguments. For a case
like -break-condition 1 i == 5, the first will pick the 'i' and second will
pick the '== 5'. But the second argument was made mandatory which failed in
cases when there was no space in the expression like i==5.
2. The function GetRestOfExpressionNotSurroundedInQuotes has 2 locals with the
same names. It resulted in one hiding the other and this function always
returned empty string.
No regression on Linux. Committed as obvious.
llvm-svn: 246847
Summary:
GetOptInc provides getopt(), getopt_long() and getopt_long_only().
Windows (for defined(_MSC_VER)) doesn't ship with all of the getopt(3) family members and needs all of them. NetBSD requires only getopt_long_only(3).
While there fix the code for clang diagnostics.
Author: Kamil Rytarowski
Reviewers: joerg
Subscribers: labath, zturner, lldb-commits
Differential Revision: http://reviews.llvm.org/D12582
llvm-svn: 246843
Summary:
This also moves the xcode support files to be near or the same
as the ones used for cmake.
The source/API/liblldb.xcodes.exports differs from the
source/API/liblldb.exports in that one contains the actual
symbol names (_ prefixed) while the other contains the symbol
names as they are in the code. The liblldb.exports file is
preprocessed by the cmake scripts into the correct per-platform
file needed (like a linker script on Linux).
This is not enabled on Windows as Windows doesn't use the same
name mangling and so it won't be valid there. Also, this is handled
already in a different way on Windows (via dll exports).
Reviewers: emaste, clayborg, labath, chaoren
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D12599
llvm-svn: 246822
Summary:
This doesn't exist in other LLVM projects any longer and doesn't
do anything.
Reviewers: chaoren, labath
Subscribers: emaste, tberghammer, lldb-commits, danalbert
Differential Revision: http://reviews.llvm.org/D12586
llvm-svn: 246749
Summary:
When calling find_first_of and find_last_of on a single character,
we can instead just call find / rfind and make our intent more
clear.
Reviewers: clayborg
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D12518
llvm-svn: 246609
Summary:
Comparing m_page_size against kInvalidPageSize was resulting in
a warning about comparing integers with different signs. Since
kInvalidPageSize isn't used anywhere outside of MachVMMemory.cpp,
we can readily transform it into a static const vm_size_t with
the correct value to avoid the sign comparison warnings.
Reviewers: clayborg
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D12519
llvm-svn: 246606
Summary:
This was previously only established within debugserver, but
there is a use of the VLA extension in source/Host/macosx/Symbols.cpp,
so ignore this warning globally.
Reviewers: clayborg
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D12515
llvm-svn: 246605
Summary:
find_first_of will look for any of the characters, not the full
string passed in. When looking for "--" then, we must use find
and not find_first_of.
Reviewers: ki.stfu, abidh
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D12517
llvm-svn: 246529
Older OSX versions don't define NSOperatingSystemVersion, so building
lldb gets: error: unknown type name 'NSOperatingSystemVersion'
This patch fixes the build by having GetOSVersionNumbers return false if
__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 101000, causing lldb to
behave the same as it did before the commit.
Reviewed by: jasonmolenda
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D12396
llvm-svn: 246138
Summary:
This was no longer needed and hasn't been needed since r143244
in 2011. This removes everything associated with generating
or using it.
Reviewers: clayborg, jasonmolenda
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D11971
llvm-svn: 244850
major, minor, and patchlevel in the qHostInfo reply.
Document that qHostInfo may report major/minor/patch
separately / in addition to the version: combination.
<rdar://problem/22125465>
llvm-svn: 244716
Summary:
(This revision supersedes the abandon: http://reviews.llvm.org/D9716)
Size field is used to let the debugger attribute an address to a specific library when symbols are not available.
For example:
OpenGLESApp4.app!Cube_draw() Line 74 C
OpenGLESApp4.app!-[GameViewController glkView:drawInRect:](GameViewController * self, SEL _cmd, GLKView * view, CGRect rect) Line 89 C++
GLKit!<redacted>
QuartzCore!<redacted>
QuartzCore!<redacted>
QuartzCore!<redacted>
QuartzCore!<redacted>
QuartzCore!<redacted>
UIKit!<redacted>
UIKit!<redacted>
UIKit!<redacted>
UIKit!<redacted>
FrontBoardServices!<redacted>
CoreFoundation!<redacted>
Patch from paulmay@microsoft.com
Reviewers: ChuckR, abidh, ki.stfu
Subscribers: greggm, lldb-commits
Differential Revision: http://reviews.llvm.org/D11574
llvm-svn: 244573
Summary:
* Remove extraneous members that were just storing temporary
values.
* OutOfBand_e parameters don't need to be const as they are
scalars.
* Switch from a map with CMIUtilString values to using a mapping
function. This uses a switch statement which will generate
a warning if a new result class is added.
* Make BuildAsyncRecord a static function rather than a private
member function so that we can construct the result text
correctly and avoid having extra stuff in the header.
Reviewers: abidh, ki.stfu
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D11751
llvm-svn: 243975
Summary: This brings the code more in line with the usual LLDB style. NFC.
Reviewers: abidh, ki.stfu
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D11746
llvm-svn: 243967
Move code in CMICmdCmdVarListChildren::Execute() up so that the child
object will always be added when the MI command -var-list-children is
entered (instead of only when the print-value was all or simple). This
patch fixes evaluation of expressions like varobj.member for a created
varobj with children.
Reviewed by: abidh
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D11659
llvm-svn: 243782
Expression evaluation error messages may have embedded new lines
and tabs. These should be escaped in the result string.
Patch by paulmaybee. Reviewed in http://reviews.llvm.org/D11570.
llvm-svn: 243741
This patch adds a test for ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED
around the code which requires 10.10 support to link. Without this, lldb
gets unresolved references to _csr_check and _rootless_allows_task_for_pid.
Reviewed by: jasonmolenda
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D11668
llvm-svn: 243715
Summary:
Currently if the "first child" of the pointer is a char type then the pointer is displayed as a string. This test succeeds incorrectly when the pointer is to a structured type with a char type as its first field. Fix this by switching the test to retrieve the pointee type and checking that it is a char type.
Reviewers: abidh, ChuckR, ki.stfu
Subscribers: greggm, lldb-commits
Differential Revision: http://reviews.llvm.org/D11488
llvm-svn: 243619
system, make a couple of additional checks to see if the
attach was denied via the System Integrity Protection that
is new in Mac OS X 10.11. If so, return a special E87
error code to indicate this to lldb.
Up in lldb, if we receive the E87 error code, be specific
about why the attach failed.
Also detect the more common case of general attach failure
and print a better error message than "lost connection".
I believe this code will all build on Mac OS X 10.10 systems.
It may not compile or run on earlier versions of the OS.
None of this should build on other non-darwin systems.
llvm-svn: 243511
The command "-break-insert ns::foo" for function 'foo' in namespace 'ns'
was being parsed as file:function. This patch fixes these cases by adding
checks for '::'. (Note: '::func' is not parsed correctly by lldb due to
llvm.org/pr24271).
Reviewed by: ki.stfu
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D11396
llvm-svn: 243281
Summary:
This replaces (void)x; usages where they x was subsequently
involved in an assertion with this macro to make the
intent more clear.
Reviewers: clayborg
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D11451
llvm-svn: 243074
Summary:
No longer rely on cmake to set DEBUGSERVER_VERSION_STR,
but now generate the _vers.c file like xcode does
and include the generated file into the build on Mac OS X.
This fixes the cmake Mac OS X build after an earlier change
by Jason Molenda.
Reviewers: clayborg, jasonmolenda
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D11450
llvm-svn: 243072
Summary:
This removes Authors:, Gotchas:, Changes: and Copyright:.
It leaves a couple of Gotcha: blocks that were not empty.
Reviewers: abidh, ki.stfu, domipheus
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D11452
llvm-svn: 242996
Summary:
Many methods, in particular various 'Add' methods didn't have
any actual failure scenarios that were being emitted. This meant
that a lot of surrounding code could be simplified.
Reviewers: abidh, ki.stfu
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D11412
llvm-svn: 242911
Summary:
* Remove extraneous members that were just storing temporary
values.
* ResultClass_e parameters don't need to be const as they are
scalars.
* Switch from a map with CMIUtilString values to using a mapping
function. This uses a switch statement which will generate
a warning if a new result class is added.
* Make BuildRecordResult a static function rather than a private
member function so that we can construct the result text
correctly and avoid having extra stuff in the header.
* Don't need (void) parameter lists in C++.
Reviewers: abidh, ki.stfu, domipheus
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D11052
llvm-svn: 242769
Changed the "jthreads" key/value in the stop reply packets to be "jstopinfo". This JSON only contains threads with valid stop reasons and allows us not to have to ask about other threads via qThreadStopInfo when we are stepping. The "jstopinfo" only gets sent if there are more than one thread since the stop reply packet contains all the info needed for a single thread.
Added a Process::WillPublicStop() in case process subclasses want to do any extra gathering for public stops. For ProcessGDBRemote, we end up sending a jThreadsInfo packet to gather all expedited registers, expedited memory and MacOSX queue information. We only do this for public stops to minimize the packets we send when we have multiple private stops. Multiple private stops happen when a source level single step, step into or step out run the process multiple times while implementing the stepping, and none of these private stops make it out to the UI via notifications because they are private stops.
llvm-svn: 242593
frame, don't go any further, in RNBRemote::SendStopReplyPacketForThread.
These are the memory pre-fetches in the T05 packet and are
included in every private stop that lldb does. lldb needs, at most,
the caller stack frame so we're sending more data than needed by
including additional stack memory prefetches in this reply packet.
Once we've stopped for a public stop, we're going to do a jThreadsInfo
which will include the stack memory prefetches for all threads,
including the one which had the stop reason.
llvm-svn: 242380
This allows stepping operations that don't ever do a public stop to get all the info they need without having to send a jThreadsInfo packet since those tend to be large.
This patch will be followed by a patch that will detect when we do a public stop, and when that happens we will send a jThreadsInfo packet at that time to get all expedited registers and memory.
llvm-svn: 242352
This fixes an off-by-one bug in CMICmdCmdDataInfoLine::Acknowledge. Given:
LineEntry: \[0x0000000100000f37-0x0000000100000f45\): /path/to/file:123:1
-data-info-line would report the line as 12, omitting the last digit.
Reviewed by: ki.stfu, abidh
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D11209
llvm-svn: 242306
vm_kernel_page_size appears to not be defined on OSX Mavericks, so the
build fails. This patch fixes the build by calculating the pagesize if
_VM_PAGE_SIZE_H_ is not defined.
llvm-svn: 242114