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
Summary:
This is the first part of our effort to make llgs single threaded. Currently, llgs consists of
about three threads and the synchronisation between them is a major source of latency when
debugging linux and android applications.
In order to be able to go single threaded, we must have the ability to listen for events from
multiple sources (primarily, client commands coming over the network and debug events from the
inferior) and perform necessary actions. For this reason I introduce the concept of a MainLoop.
A main loop has the ability to register callback's which will be invoked upon receipt of certain
events. MainLoopPosix has the ability to listen for file descriptors and signals.
For the moment, I have merely made the GDBRemoteCommunicationServerLLGS class use MainLoop
instead of waiting on the network socket directly, but the other threads still remain. In the
followup patches I indend to migrate NativeProcessLinux to this class and remove the remaining
threads.
Reviewers: ovyalov, clayborg, amccarth, zturner, emaste
Subscribers: tberghammer, lldb-commits
Differential Revision: http://reviews.llvm.org/D11066
llvm-svn: 242018
jGetLoadedDynamicLibrariesInfos. This packet is similar to
qXfer:libraries:read except that lldb supplies the number of solibs
that should be reported about, and the start address for the list
of them. At the initial process launch we'll read the full list
of solibs linked by the process -- at this point we could be using
qXfer:libraries:read -- but on subsequence solib-loaded notifications,
we'll be fetching a smaller number of solibs, often only one or two.
A typical Mac/iOS GUI app may have a couple hundred different
solibs loaded - doing all of the loads via memory reads takes
a couple of megabytes of traffic between lldb and debugserver.
Having debugserver summarize the load addresses of all the solibs
and sending it in JSON requires a couple of hundred kilobytes
of traffic. It's a significant performance improvement when
communicating over a slower channel.
This patch leaves all of the logic for loading the libraries
in DynamicLoaderMacOSXDYLD -- it only call over ot ProcesGDBRemote
to get the JSON result.
If the jGetLoadedDynamicLibrariesInfos packet is not implemented,
the normal technique of using memory read packets to get all of
the details from the target will be used.
<rdar://problem/21007465>
llvm-svn: 241964
results if the -Q option is not provided. Also took out the quietly
option from AddInitialCommand, we don't use that to set this option,
we use the override set by the -Q option.
<rdar://problem/21232087>
llvm-svn: 241652