Commit Graph

436 Commits

Author SHA1 Message Date
Han Ming Ong c9a35eb947 Use a more unique end delimiter. In any case, the thread names are hexified when returning to lldb.
llvm-svn: 172021
2013-01-10 00:04:49 +00:00
Han Ming Ong 95b604b276 <rdar://problem/12975489>
1. Using mach port number, just like when inferior is paused.
2. Use key:value pair of thread used time instead of comma separated notation.

llvm-svn: 172012
2013-01-09 22:37:34 +00:00
Jason Molenda 153c8e0cc2 <rdar://problem/12602653>
Add unconditional logging messages to every place in debugserver
where we send a SIGKILL signal or do a ptrace PT_KILL call to
terminate the inferior process.  When the debuggee is silently
killed off, the console logging from debugserver can disambiguate
whether debugserver killed off the process because it failed to
completely set it up, becuase it was told to (via the "k" packet),
or if some external daemon killed it.

llvm-svn: 171606
2013-01-05 06:08:51 +00:00
Jim Ingham e2231ac783 Added an SBAPI to get the PythonPath (if the Host knows how to do that). And a -P option to the Driver
to print it out.  Changed dotest.py to use that to find the PythonPath it should use given the lldb binary
it was told to run.

llvm-svn: 170932
2012-12-21 22:22:26 +00:00
Andrew Kaylor f85defaea5 Adding eStopReasonThreadExiting and fixing the handling of this state on Linux.
llvm-svn: 170800
2012-12-20 23:08:03 +00:00
Jason Molenda f17b5ac6e1 <rdar://problem/11961650>
Update the debugserver "qProcessInfo" implementation to return the
cpu type, cpu subtype, OS and vendor information just like qHostInfo
does so lldb can create an ArchSpec based on the returned values.

Add a new GetProcessArchitecture to GDBRemoteCommunicationClient akin
to GetHostArchitecture.  If the qProcessInfo packet is supported,
GetProcessArchitecture will return the cpu type / subtype of the 
process -- e.g. a 32-bit user process running on a 64-bit x86_64 Mac
system. 

Have ProcessGDBRemote set the Target's architecture based on the 
GetProcessArchitecture when we've completed an attach/launch/connect.

llvm-svn: 170491
2012-12-19 02:54:03 +00:00
Jason Molenda fca9c6bb9f Add a new qProcessInfo packet to debugserver.
This can be used by lldb to ask for information
about the process debugserver is attached to/launched.
Particularly useful on a 64-bit x86 Mac system which
can run  32-bit or 64-bit user-land processes.

llvm-svn: 170409
2012-12-18 04:39:43 +00:00
Han Ming Ong 48a100190e <rdar://problem/12890948>
Send thread name using hex encoding.

llvm-svn: 170370
2012-12-17 20:53:19 +00:00
Daniel Malea 926758ba45 Initialize m_done to false in Driver constructor to avoid premature exit bug (spotted on Linux)
Patch by Chia-Hung Duan!

llvm-svn: 170348
2012-12-17 17:40:07 +00:00
Han Ming Ong 3e70c45fa8 <rdar://problem/12890901>
Capturing thread name during profiling.

llvm-svn: 170312
2012-12-17 07:33:07 +00:00
Enrico Granata dc3f4f90d1 Trigger the display of error and output in sourced commands from the result object's status instead of the presence of text in the error stream
This should be more consistent with the notion of command success/failure and avoids spewing warnings that the user might not care about
There will need to be an option to specify the level of verbosity desired (never show anything, only show failures, errors and warning, everything)

llvm-svn: 170167
2012-12-14 00:52:54 +00:00
Enrico Granata aa0c8fffc7 <rdar://problem/12700464>
Fixing an issue where errors in command files sourced as arguments to command-line lldb (e.g. ./lldb -s foo.cmd) would not be shown to the user

llvm-svn: 170146
2012-12-13 20:20:11 +00:00
Jim Ingham c3faa19577 Broadcast an event when the selected thread is changed.
<rdar://problem/10976636>

llvm-svn: 169810
2012-12-11 02:31:48 +00:00
Daniel Malea a85e6b6c32 Fix a few more clang (3.2) warnings on Linux:
- remove unused members
- add NO_PEDANTIC to selected Makefiles
- fix return values (removed NULL as needed)
- disable warning about four-char-constants
- remove unneeded const from operator*() declaration
- add missing lambda function return types
- fix printf() with no format string
- change sizeof to use a type name instead of variable name
- fix Linux ProcessMonitor.cpp to be 32/64 bit friendly
- disable warnings emitted by swig-generated C++ code

Patch by Matt Kopec!

llvm-svn: 169645
2012-12-07 22:21:08 +00:00
Daniel Malea 89660bf795 More Linux warnings fixes (remove default labels as needed):
- as per http://llvm.org/docs/CodingStandards.html#don-t-use-default-labels-in-fully-covered-switches-over-enumerations

Patch by Matt Kopec!

llvm-svn: 169633
2012-12-07 20:51:09 +00:00
Daniel Malea 93a64300f8 Fix Linux build warnings due to redefinition of macros:
- add new header lldb-python.h to be included before other system headers
- short term fix (eventually python dependencies must be cleaned up)

Patch by Matt Kopec!

llvm-svn: 169341
2012-12-05 00:20:57 +00:00
Greg Clayton 90ba81150e <rdar://problem/12649160>
Added the ability to debug through your process exec'ing itself to the same architecture.

llvm-svn: 169340
2012-12-05 00:16:59 +00:00
Greg Clayton 12057dafea Get rid of a warning where functions in DNB.h were extern "C" when they don't need to be anymore.
llvm-svn: 169202
2012-12-04 01:57:36 +00:00
Greg Clayton 3bcdfc0ec1 <rdar://problem/12798131>
Cleaned up the option parsing code to always pass around the short options as integers. Previously we cast this down to "char" and lost some information. I recently added an assert that would detect duplicate short character options which was firing during the test suite.

This fix does the following:
- make sure all short options are treated as "int"
- make sure that short options can be non-printable values when a short option is not required or when an option group is mixed into many commands and a short option is not desired
- fix the help printing to "do the right thing" in all cases. Previously if there were duplicate short character options, it would just not emit help for the duplicates
- fix option parsing when there are duplicates to parse options correctly. Previously the option parsing, when done for an OptionGroup, would just start parsing options incorrectly by omitting table entries and it would end up setting the wrong option value

llvm-svn: 169189
2012-12-04 00:32:51 +00:00
Jason Molenda 420f81dc5d Bump lldb version num to lldb-178, debugserver version to debugserver-198.
llvm-svn: 169081
2012-12-01 04:50:09 +00:00
Jim Ingham c5917d9a38 Save and restore terminal state when lldb is suspended with SIGTSTP and resumed with SIGCONT.
Readline & gdb have a bunch of code to handle older UNIX'es with other job control mechanisms.
I didn't try to replicate that.

llvm-svn: 169032
2012-11-30 20:23:19 +00:00
Han Ming Ong 929a94f026 <rdar://problem/12780259>
Prevent async and sync calls to get profile data from stomping on each other.
At the same time, don't use '$' as end delimiter per chunk of profile data.

llvm-svn: 168948
2012-11-29 22:14:45 +00:00
Daniel Malea d01b2953fa Resolve printf formatting warnings on Linux:
- use macros from inttypes.h for format strings instead of OS-specific types

Patch from Matt Kopec!

llvm-svn: 168945
2012-11-29 21:49:15 +00:00
Jason Molenda b8e5c79af1 Correct the label for the com.apple.debugserver.posix plist.
<rdar://problem/12769073> 

llvm-svn: 168834
2012-11-29 00:01:49 +00:00
Sean Callanan 948d4aba5d Fixed the debugserver Xcode project to allow
DebugClang builds of LLDB to build a properly
codesigned debugserver.  I did this by adding
a DebugClang configuration to debugserver that's
just a clone of the Debug configuration.

llvm-svn: 168746
2012-11-27 23:34:41 +00:00
Han Ming Ong 8594ae85d5 <rdar://problem/12759744> Provide physical memory distribution as part of profile data
Make use of unix system calls to provide physical memory usage profile data.

llvm-svn: 168720
2012-11-27 19:21:03 +00:00
Jason Molenda d251c9d163 Han Ming's commit in r168228 had a bunch of 4-space tabs
in the source files.  Expand to spaces.  No content changes,
just whitespace.

llvm-svn: 168238
2012-11-17 01:41:04 +00:00
Han Ming Ong c811d382f0 Follow up on <rdar://12720514>. Removed commented out code.
llvm-svn: 168232
2012-11-17 00:33:14 +00:00
Han Ming Ong ab3b8b22a1 <rdar://problem/12720514> Sub-TLF: Provide service to profile the inferior
This allows client to query profiling states on the inferior.

llvm-svn: 168228
2012-11-17 00:21:04 +00:00
Greg Clayton 1cb5951a2f Added a posix_spawn based launchd plist for always using posix_spawn to launch programs.
llvm-svn: 167563
2012-11-08 00:06:59 +00:00
Greg Clayton 9eb4e03873 <rdar://problem/12647273>
Added the ability to get the full process list when using the --applist option in debugserver.

llvm-svn: 167502
2012-11-06 23:36:26 +00:00
Sean Callanan 84dcccd14b Switched debugserver to use C++11/libc++.
<rdar://problem/12624679>

llvm-svn: 167303
2012-11-02 18:30:51 +00:00
Jason Molenda 0b2dbe0ebe Fix an error message in debugserver so it doesn't print "Unable to
launch process (null)" because we changed argv while doing argument
parsing.

llvm-svn: 167202
2012-11-01 02:02:59 +00:00
Jim Ingham 490bccd659 Switch from using KERN_PROCARGS2 to get the path to the executed process to proc_pidpath. The former was flakey, and the whole point of libproc is to protect us from potential flakiness at that level...
<rdar://problem/12594781>

llvm-svn: 167194
2012-11-01 01:04:46 +00:00
Greg Clayton d9c2370b33 Added the plists to the debugserver project and fixed the labels for the new plists.
llvm-svn: 167183
2012-10-31 23:49:14 +00:00
Greg Clayton e11b43bc69 More launchd style plists.
llvm-svn: 167182
2012-10-31 23:43:37 +00:00
Greg Clayton 48baf7a788 Resolve any bundle paths we are given when the specified executable is a bundle.
llvm-svn: 167175
2012-10-31 21:44:39 +00:00
Jason Molenda 67c3cf5357 eArgTypePath was removed in r166533; change -c to
expect eArgTypeFilename.

llvm-svn: 166542
2012-10-24 03:29:40 +00:00
Enrico Granata 430e540b6b Removing the two extra GetXSize(bool) calls since we do not desire to support them long-term
llvm-svn: 166060
2012-10-16 21:11:14 +00:00
Enrico Granata cd4d24d5e9 <rdar://problem/12446320> Fixing an issue with our Driver where setting an immediate output would not cause suppression of the final printout. This allows effective output redirection for Python commands
llvm-svn: 166058
2012-10-16 20:57:12 +00:00
Greg Clayton 01db0c6823 Provide an SSL context ref in case SLL is needed for communication.
llvm-svn: 165856
2012-10-13 00:18:18 +00:00
Greg Clayton 3e672345bc <rdar://problem/12042500>
Fixed an issue where we would try to launch an application twice and the second failure would cover up the first.

llvm-svn: 165756
2012-10-11 22:05:13 +00:00
Greg Clayton 1698be7352 Fix build warnings.
llvm-svn: 165755
2012-10-11 22:04:01 +00:00
Jim Ingham 4f465cff8a Change the Thread constructor over to take a Process& rather than a ProcessSP. We can't create Threads with a NULL ProcessSP, so it makes no sense to use the SP.
Then make the Thread a Broadcaster, and get it to broadcast when the selected frame is changed (but only from the Command Line) and when Thread::ReturnFromFrame 
changes the stack.
Made the Driver use this notification to print the new thread status rather than doing it in the command.
Fixed a few places where people were setting their broadcaster class by hand rather than using the static broadcaster class call.

<rdar://problem/12383087>

llvm-svn: 165640
2012-10-10 18:32:14 +00:00
Jason Molenda 65c28cb47a Fix the extra space char being emitted in this message when breakpoints resolve -
1 location  added to breakpoint 2

llvm-svn: 164810
2012-09-28 01:50:47 +00:00
Greg Clayton dcadc5cfb7 Re-adding this previously removed file.
llvm-svn: 164331
2012-09-20 23:08:52 +00:00
Greg Clayton b85248da95 This file is causing problems. I am going to remove it and try re-adding it.
llvm-svn: 164328
2012-09-20 23:08:12 +00:00
Jason Molenda 944cc67eba Bump to lldb-168, debugserver-193.
llvm-svn: 164291
2012-09-20 06:42:30 +00:00
Greg Clayton 813ddfcdd0 <rdar://problem/12219840>
Don't leak mach ports when calling "mach_thread_self()".

llvm-svn: 164152
2012-09-18 18:19:49 +00:00
Greg Clayton 43e0af06b4 Stop using the "%z" size_t modifier and cast all size_t values to uint64_t. Some platforms don't support this modification.
llvm-svn: 164148
2012-09-18 18:04:04 +00:00