summaryrefslogtreecommitdiffstats
path: root/lldb/tools
Commit message (Collapse)AuthorAgeFilesLines
...
* [cmake] Remove LLVM_NO_RTTI.Bruce Mitchener2015-09-037-13/+0
| | | | | | | | | | | | | | 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
* Simplify find_first_of & find_last_of on single char.Bruce Mitchener2015-09-015-11/+11
| | | | | | | | | | | | | | | 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
* [debugserver] Fix sign comparison warning.Bruce Mitchener2015-09-012-1/+2
| | | | | | | | | | | | | | | | | 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
* Use -Wno-vla-extension globally.Bruce Mitchener2015-09-011-6/+0
| | | | | | | | | | | | | | | 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
* [lldb-mi] Use find, not find_first_of, for "--".Bruce Mitchener2015-09-012-2/+2
| | | | | | | | | | | | | | | 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
* Fix lldb build on older OSX versions after svn commit r244716Dawn Perchik2015-08-271-0/+2
| | | | | | | | | | | | | | 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
* [lldb-mi] Add (gdb) prompt after =breakpoint-modified and =breakpoint-created.Dawn Perchik2015-08-191-1/+4
| | | | | | | | Reviewed by: abidh, ki.stfu Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D12113 llvm-svn: 245488
* Quiet build warnings on MacOSX.Greg Clayton2015-08-181-2/+2
| | | | llvm-svn: 245373
* Add missing newline at EOF.Bruce Mitchener2015-08-131-1/+1
| | | | | | This fixes a warning on the Mac OS X build. llvm-svn: 244863
* Remove DNBConfig.hBruce Mitchener2015-08-1310-155/+3
| | | | | | | | | | | | | | | 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
* Have debugserver send the OS version string plusJason Molenda2015-08-125-0/+47
| | | | | | | | | | 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
* Add size field to library load event (MI)Ilia K2015-08-112-8/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* [lldb-mi] Fix non-OS X builds.Bruce Mitchener2015-08-041-0/+3
| | | | llvm-svn: 243978
* [lldb-mi] Simplify MICmnMIOutOfBandRecord implementation.Bruce Mitchener2015-08-042-85/+103
| | | | | | | | | | | | | | | | | | | | | | 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
* [lldb-mi] Use empty arg lists instead of (void).Bruce Mitchener2015-08-04147-1500/+1500
| | | | | | | | | | | | 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
* [debugserver] Fix "control may reach end of non-void function" warnings.Bruce Mitchener2015-08-042-8/+9
| | | | | | | | | | Reviewers: clayborg, jingham Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D11745 llvm-svn: 243953
* Bump the version # in the xcode proj file from major number 340 to 350.Jason Molenda2015-08-041-8/+8
| | | | | | The SB API for major version 340 won't be changing any more. llvm-svn: 243943
* [lldb-mi] Fix evaluation for children of created variable object.Dawn Perchik2015-07-311-2/+3
| | | | | | | | | | | | | | 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
* Escape new line and tabs in the result of variable evaluation.Hafiz Abid Qadeer2015-07-311-1/+1
| | | | | | | | | 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
* Fix build of lldb on Mavericks after svn rev.243511.Dawn Perchik2015-07-311-2/+2
| | | | | | | | | | | | 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
* Fix bug in expression display when determining if a pointer should be ↵Ilia K2015-07-302-7/+47
| | | | | | | | | | | | | | | | treated as a string 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
* When debugserver fails to attach to a process on a DarwinJason Molenda2015-07-293-6/+74
| | | | | | | | | | | | | | | | | | | 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
* [lldb-mi] Fix setting of breakpoints using file:func syntax.Dawn Perchik2015-07-281-1/+6
| | | | | | | | Reviewed by: ki.stfu Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D11499 llvm-svn: 243484
* Support escapes and quotes in string and character values.Ilia K2015-07-284-28/+68
| | | | | | | | | | | | | | | Summary: Escape characters in strings and strings containing quotes were not appearing correctly in expression values. Patch from paulmay@microsoft.com Reviewers: abidh, ChuckR, paulmaybee Subscribers: greggm, lldb-commits Differential Revision: http://reviews.llvm.org/D11371 llvm-svn: 243383
* [lldb-mi] Fix breakpoints on functions when C++ namespaces are used.Dawn Perchik2015-07-271-5/+23
| | | | | | | | | | | | | 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
* Add UNUSED_IF_ASSERT_DISABLED and apply it.Bruce Mitchener2015-07-247-11/+13
| | | | | | | | | | | | | | | 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
* Fix Mac OS X build, debugserver version handling.Bruce Mitchener2015-07-242-3/+14
| | | | | | | | | | | | | | | | | | 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
* [lldb-mi] Remove unwanted comment blocks.Bruce Mitchener2015-07-2376-359/+0
| | | | | | | | | | | | | | | 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
* Fix the variable used to reply to the qGDBServerVersionJason Molenda2015-07-221-1/+1
| | | | | | | | | | packet so that debugserver will send a reply like name:debugserver;version:340.99; <rdar://problem/21933963> llvm-svn: 242968
* Don't water JSONGenerator objects down into ObjectSP's too early so that we ↵Greg Clayton2015-07-221-31/+31
| | | | | | can call member functions specific to dictionaries and arrays without calling GetAsDictionary() or GetAsArray() on them. llvm-svn: 242917
* Fix warnings.Bruce Mitchener2015-07-2226-63/+98
| | | | | | | | | | Reviewers: clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D11404 llvm-svn: 242913
* [lldb-mi] Remove unused bool results.Bruce Mitchener2015-07-2237-524/+382
| | | | | | | | | | | | | | | 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
* Fix warnings found by -Wextra-semiPavel Labath2015-07-227-8/+8
| | | | | | patch by Eugene Zelenko. llvm-svn: 242875
* [lldb-mi] Correct file names in first line comments.Bruce Mitchener2015-07-2118-18/+18
| | | | llvm-svn: 242781
* [lldb-mi] Fix Windows build, missing assert.h include.Bruce Mitchener2015-07-211-0/+3
| | | | | | | | | | Reviewers: ki.stfu, abidh Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D11387 llvm-svn: 242778
* [lldb-mi] Simplify MICmnMIResultRecord implementation.Bruce Mitchener2015-07-212-67/+54
| | | | | | | | | | | | | | | | | | | | | | | 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
* [lldb-mi] Remove unused portions of MIDataTypes.h.Bruce Mitchener2015-07-211-16/+0
| | | | | | | | | | Reviewers: abidh, ki.stfu Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D11385 llvm-svn: 242768
* [lldb-mi] size_t rather than MIuint for arg counts.Bruce Mitchener2015-07-214-9/+9
| | | | | | | | | | | | Summary: [lldb-mi] size_t rather than MIuint for arg counts. Reviewers: abidh, ki.stfu Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D11049 llvm-svn: 242762
* More packet performance improvements. Greg Clayton2015-07-173-48/+60
| | | | | | | | 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
* Fix liblldb linking on RHEL 6 (bug #24140)Pavel Labath2015-07-171-1/+1
| | | | | | Patch by Eugene Zelenko. llvm-svn: 242525
* Only include the stack memory for the caller stackJason Molenda2015-07-161-3/+3
| | | | | | | | | | | | | | | 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
* Added the ability to get JSON thread stop info with thread ID and stop info ↵Greg Clayton2015-07-152-62/+112
| | | | | | | | | | only in the normal stop reply packets using the new "jthreads" key value pair. 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
* Fix -data-info-line when source includes column number.Dawn Perchik2015-07-151-1/+1
| | | | | | | | | | | | 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
* Fix temp port file path generation in lldb-platform.Oleksiy Vyalov2015-07-141-6/+5
| | | | | | http://reviews.llvm.org/D11152 llvm-svn: 242182
* Fix debugserver build breakage on Mavericks after lldb commit svn 240728Dawn Perchik2015-07-141-2/+2
| | | | | | | | 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
* [lldb-mi] Add const qualifier to vMITextLine in InterpretCommandThisDriver.Dawn Perchik2015-07-131-1/+1
| | | | llvm-svn: 242057
* Introduce a MainLoop class and switch llgs to use itPavel Labath2015-07-132-62/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Add a another packet to the gdb-remote protocol,Jason Molenda2015-07-106-0/+331
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* [lldb-mi] Remove unused typedefs.Bruce Mitchener2015-07-091-6/+0
| | | | | | | | | | | | Summary: [lldb-mi] Remove unused typedefs. Reviewers: abidh, ki.stfu Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D11050 llvm-svn: 241791
* Make command files specified to the driver actually print theirJim Ingham2015-07-082-11/+11
| | | | | | | | | | 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
OpenPOWER on IntegriCloud