#
2272c481 |
| 18-Jun-2018 |
Pavel Labath <labath@google.com> |
Use llvm::VersionTuple instead of manual version marshalling
Summary: This has multiple advantages: - we need only one function argument/instance variable instead of three - no need to default initi
Use llvm::VersionTuple instead of manual version marshalling
Summary: This has multiple advantages: - we need only one function argument/instance variable instead of three - no need to default initialize variables - no custom parsing code - VersionTuple has comparison operators, which makes version comparisons much simpler
Reviewers: zturner, friss, clayborg, jingham
Subscribers: emaste, lldb-commits
Differential Revision: https://reviews.llvm.org/D47889
llvm-svn: 334950
show more ...
|
Revision tags: llvmorg-6.0.1, llvmorg-6.0.1-rc3 |
|
#
937348cd |
| 13-Jun-2018 |
Jonas Devlieghere <jonas@devlieghere.com> |
[FileSpec] Make style argument mandatory for SetFile. NFC
SetFile has an optional style argument which defaulted to the native style. This patch makes that argument mandatory so clients of the FileS
[FileSpec] Make style argument mandatory for SetFile. NFC
SetFile has an optional style argument which defaulted to the native style. This patch makes that argument mandatory so clients of the FileSpec class are forced to think about the correct syntax.
At the same time this introduces a (protected) convenience method to update the file from within the FileSpec class that keeps the current style.
These two changes together prevent a potential pitfall where the style might be forgotten, leading to the path being updated and the style unintentionally being changed to the host style.
llvm-svn: 334663
show more ...
|
Revision tags: llvmorg-6.0.1-rc2 |
|
#
19dd1a0e |
| 10-May-2018 |
Pavel Labath <labath@google.com> |
Convert all RunShellCommand functions to use the Timeout class
this completes the Timeout migration started in r331880 with the Predicate class.
llvm-svn: 331970
|
#
05097246 |
| 30-Apr-2018 |
Adrian Prantl <aprantl@apple.com> |
Reflow paragraphs in comments.
This is intended as a clean up after the big clang-format commit (r280751), which unfortunately resulted in many of the comment paragraphs in LLDB being very hard to r
Reflow paragraphs in comments.
This is intended as a clean up after the big clang-format commit (r280751), which unfortunately resulted in many of the comment paragraphs in LLDB being very hard to read.
FYI, the script I used was:
import textwrap import commands import os import sys import re tmp = "%s.tmp"%sys.argv[1] out = open(tmp, "w+") with open(sys.argv[1], "r") as f: header = "" text = "" comment = re.compile(r'^( *//) ([^ ].*)$') special = re.compile(r'^((([A-Z]+[: ])|([0-9]+ )).*)|(.*;)$') for line in f: match = comment.match(line) if match and not special.match(match.group(2)): # skip intentionally short comments. if not text and len(match.group(2)) < 40: out.write(line) continue
if text: text += " " + match.group(2) else: header = match.group(1) text = match.group(2)
continue
if text: filled = textwrap.wrap(text, width=(78-len(header)), break_long_words=False) for l in filled: out.write(header+" "+l+'\n') text = ""
out.write(line)
os.rename(tmp, sys.argv[1])
Differential Revision: https://reviews.llvm.org/D46144
llvm-svn: 331197
show more ...
|
Revision tags: llvmorg-6.0.1-rc1 |
|
#
145d95c9 |
| 17-Apr-2018 |
Pavel Labath <labath@google.com> |
Move Args.cpp from Interpreter to Utility
Summary: The Args class is used in plenty of places besides the command interpreter (e.g., anything requiring an argc+argv combo, such as when launching a p
Move Args.cpp from Interpreter to Utility
Summary: The Args class is used in plenty of places besides the command interpreter (e.g., anything requiring an argc+argv combo, such as when launching a process), so it needs to be in a lower layer. Now that the class has no external dependencies, it can be moved down to the Utility module.
This removes the last (direct) dependency from the Host module to Interpreter, so I remove the Interpreter module from Host's dependency list.
Reviewers: zturner, jingham, davide
Subscribers: mgorny, lldb-commits
Differential Revision: https://reviews.llvm.org/D45480
llvm-svn: 330200
show more ...
|
Revision tags: llvmorg-5.0.2, llvmorg-5.0.2-rc2 |
|
#
9af71b38 |
| 20-Mar-2018 |
Pavel Labath <labath@google.com> |
Move StringExtractorGDBRemote.h to the include folder
While trying to use this header I noticed that it is not in the include folder. Move it to there and update all #includes to reference that file
Move StringExtractorGDBRemote.h to the include folder
While trying to use this header I noticed that it is not in the include folder. Move it to there and update all #includes to reference that file correctly.
llvm-svn: 327996
show more ...
|
#
16064d35 |
| 20-Mar-2018 |
Pavel Labath <labath@google.com> |
Re-land: [lldb] Use vFlash commands when writing to target's flash memory regions
The difference between this and the previous patch is that now we use ELF physical addresses only for loading object
Re-land: [lldb] Use vFlash commands when writing to target's flash memory regions
The difference between this and the previous patch is that now we use ELF physical addresses only for loading objects into the target (and the rest of the module load address logic still uses virtual addresses).
Summary: When writing an object file over gdb-remote, use the vFlashErase, vFlashWrite, and vFlashDone commands if the write address is in a flash memory region. A bare metal target may have this kind of setup.
- Update ObjectFileELF to set load addresses using physical addresses. A typical case may be a data section with a physical address in ROM and a virtual address in RAM, which should be loaded to the ROM address. - Add support for querying the target's qXfer:memory-map, which contains information about flash memory regions, leveraging MemoryRegionInfo data structures with minor modifications - Update ProcessGDBRemote to use vFlash commands in DoWriteMemory when the target address is in a flash region
Original discussion at http://lists.llvm.org/pipermail/lldb-dev/2018-January/013093.html
Reviewers: clayborg, labath
Reviewed By: labath
Subscribers: llvm-commits, arichardson, emaste, mgorny, lldb-commits
Differential Revision: https://reviews.llvm.org/D42145 Patch by Owen Shaw <llvm@owenpshaw.net>.
llvm-svn: 327970
show more ...
|
Revision tags: llvmorg-5.0.2-rc1, llvmorg-6.0.0 |
|
#
ec03d7e3 |
| 28-Feb-2018 |
Pavel Labath <labath@google.com> |
Revert "[lldb] Use vFlash commands when writing to target's flash memory regions"
This reverts commit r326261 as it introduces inconsistencies in the handling of load addresses for ObjectFileELF --
Revert "[lldb] Use vFlash commands when writing to target's flash memory regions"
This reverts commit r326261 as it introduces inconsistencies in the handling of load addresses for ObjectFileELF -- some parts of the class use physical addresses, and some use virtual. This has manifested itself as us not being able to set the load address of the vdso "module" on android.
llvm-svn: 326367
show more ...
|
#
029fb693 |
| 27-Feb-2018 |
Pavel Labath <labath@google.com> |
[lldb] Use vFlash commands when writing to target's flash memory regions
Summary: When writing an object file over gdb-remote, use the vFlashErase, vFlashWrite, and vFlashDone commands if the write
[lldb] Use vFlash commands when writing to target's flash memory regions
Summary: When writing an object file over gdb-remote, use the vFlashErase, vFlashWrite, and vFlashDone commands if the write address is in a flash memory region. A bare metal target may have this kind of setup.
- Update ObjectFileELF to set load addresses using physical addresses. A typical case may be a data section with a physical address in ROM and a virtual address in RAM, which should be loaded to the ROM address. - Add support for querying the target's qXfer:memory-map, which contains information about flash memory regions, leveraging MemoryRegionInfo data structures with minor modifications - Update ProcessGDBRemote to use vFlash commands in DoWriteMemory when the target address is in a flash region
Original discussion at http://lists.llvm.org/pipermail/lldb-dev/2018-January/013093.html
Reviewers: clayborg, labath
Reviewed By: labath
Subscribers: arichardson, emaste, mgorny, lldb-commits
Differential Revision: https://reviews.llvm.org/D42145 Patch by Owen Shaw <llvm@owenpshaw.net>
llvm-svn: 326261
show more ...
|
Revision tags: llvmorg-6.0.0-rc3, llvmorg-6.0.0-rc2, llvmorg-6.0.0-rc1 |
|
#
62930e57 |
| 10-Jan-2018 |
Pavel Labath <labath@google.com> |
Add Utility/Environment class for handling... environments
Summary: There was some confusion in the code about how to represent process environment. Most of the code (ab)used the Args class for this
Add Utility/Environment class for handling... environments
Summary: There was some confusion in the code about how to represent process environment. Most of the code (ab)used the Args class for this purpose, but some of it used a more basic StringList class instead. In either case, the fact that the underlying abstraction did not provide primitive operations for the typical environment operations meant that even a simple operation like checking for an environment variable value was several lines of code.
This patch adds a separate Environment class, which is essentialy a llvm::StringMap<std::string> in disguise. To standard StringMap functionality, it adds a couple of new functions, which are specific to the environment use case: - (most important) envp conversion for passing into execve() and likes. Instead of trying to maintain a constantly up-to-date envp view, it provides a function which creates a envp view on demand, with the expectation that this will be called as the very last thing before handing the value to the system function. - insert(StringRef KeyEqValue) - splits KeyEqValue into (key, value) pair and inserts it into the environment map. - compose(value_type KeyValue) - takes a map entry and converts in back into "KEY=VALUE" representation.
With this interface most of the environment-manipulating code becomes one-liners. The only tricky part was maintaining compatibility in SBLaunchInfo, which expects that the environment entries are accessible by index and that the returned const char* is backed by the launch info object (random access into maps is hard and the map stores the entry in a deconstructed form, so we cannot just return a .c_str() value). To solve this, I have the SBLaunchInfo convert the environment into the "envp" form, and use it to answer the environment queries. Extra code is added to make sure the envp version is always in sync.
(This also improves the layering situation as Args was in the Interpreter module whereas Environment is in Utility.)
Reviewers: zturner, davide, jingham, clayborg
Subscribers: emaste, lldb-commits, mgorny
Differential Revision: https://reviews.llvm.org/D41359
llvm-svn: 322174
show more ...
|
#
8c92c899 |
| 18-Dec-2017 |
Pavel Labath <labath@google.com> |
Fix regression in jModulesInfo packet handling
The recent UUID cleanups exposed a bug in the parsing code for the jModulesInfo response, which was passing wrong value for the second argument to UUID
Fix regression in jModulesInfo packet handling
The recent UUID cleanups exposed a bug in the parsing code for the jModulesInfo response, which was passing wrong value for the second argument to UUID::SetFromStringRef (it passed the length of the string, whereas the correct value should be the number of decoded bytes we expect to receive).
This was not picked up by tests, because they test with 16-byte uuids, for which the function happens to do the right thing even if the length does not match (if the length does not match, the function does not update m_num_uuid_bytes member, but that member is already 16 to begin with).
I fix that and add a test with 20-byte uuid to catch if this regresses. I have also added more safeguards into the parsing code to fail if we cannot parse the entire uuid field we recieve. While testing the latter part, I noticed that the "negative" jModulesInfo tests were succeeding because we were sending malformed json (and not because the json contents was invalid), so I make those tests a bit more robuts as well.
llvm-svn: 320985
show more ...
|
Revision tags: llvmorg-5.0.1, llvmorg-5.0.1-rc3 |
|
#
606908aa |
| 06-Dec-2017 |
Vedant Kumar <vsk@apple.com> |
Remove no-op function pointer null checks, NFC
Null-checking functions which aren't marked weak_import is a no-op (the compiler rewrites the check to 'true'), regardless of whether a library providi
Remove no-op function pointer null checks, NFC
Null-checking functions which aren't marked weak_import is a no-op (the compiler rewrites the check to 'true'), regardless of whether a library providing its definition is weak-linked. If the deployment target is greater than the minimum requirement, the availability markup on APIs does not lower to weak_import.
Remove no-op null checks to clean up the code and silence warnings.
Differential Revision: https://reviews.llvm.org/D40812
llvm-svn: 319936
show more ...
|
Revision tags: llvmorg-5.0.1-rc2, llvmorg-5.0.1-rc1 |
|
#
c51ad483 |
| 27-Oct-2017 |
Pavel Labath <labath@google.com> |
Add specific ppc64le hardware watchpoint handler
Summary: Add hardware watchpoint funcionality for ppc64le
Reviewers: clayborg, zturner
Reviewed By: clayborg
Subscribers: eugene, clayborg, zturne
Add specific ppc64le hardware watchpoint handler
Summary: Add hardware watchpoint funcionality for ppc64le
Reviewers: clayborg, zturner
Reviewed By: clayborg
Subscribers: eugene, clayborg, zturner, lbianc, gut, nemanjai, alexandreyy, kbarton, lldb-commits
Differential Revision: https://reviews.llvm.org/D38897 Patch by Ana Julia Caetano <ana.caetano@eldorado.org.br>
llvm-svn: 316772
show more ...
|
#
1492cb89 |
| 18-Sep-2017 |
Tamas Berghammer <tberghammer@google.com> |
Fix Linux remote debugging after r313442
On Linux lldb-server sends an OK response to qfThreadInfo if no process is started yet. I don't know why would LLDB issue a qfThreadInfo packet before starti
Fix Linux remote debugging after r313442
On Linux lldb-server sends an OK response to qfThreadInfo if no process is started yet. I don't know why would LLDB issue a qfThreadInfo packet before starting a process but creating a fake thread ID in case of an OK or Error respoinse sounds bad anyway so lets not do it.
llvm-svn: 313525
show more ...
|
#
3293b9d4 |
| 16-Sep-2017 |
Vadim Chugunov <vadimcn@gmail.com> |
Fix compatibility with OpenOCD debug stub.
OpenOCD sends register classes as two separate <feature> nodes, fixed parser to process both of them.
OpenOCD returns "l" in response to "qfThreadInfo", s
Fix compatibility with OpenOCD debug stub.
OpenOCD sends register classes as two separate <feature> nodes, fixed parser to process both of them.
OpenOCD returns "l" in response to "qfThreadInfo", so IsUnsupportedResponse() was false and we were ending up without any threads in the process. I think it's reasonable to assume that there's always at least one thread.
llvm-svn: 313442
show more ...
|
Revision tags: llvmorg-5.0.0, llvmorg-5.0.0-rc5, llvmorg-5.0.0-rc4, llvmorg-5.0.0-rc3, llvmorg-5.0.0-rc2, llvmorg-5.0.0-rc1 |
|
#
dab1d5f3 |
| 12-Jul-2017 |
Ravitheja Addepally <ravitheja.addepally@intel.com> |
Adding Support for Error Strings in Remote Packets
Summary: This patch adds support for sending strings along with error codes in the reply packets. The implementation is based on the feedback recie
Adding Support for Error Strings in Remote Packets
Summary: This patch adds support for sending strings along with error codes in the reply packets. The implementation is based on the feedback recieved in the lldb-dev mailing list. The patch also adds an extra packet for the client to query if the server has the capability to provide strings along with error replys.
Reviewers: labath, jingham, sas, lldb-commits, clayborg
Reviewed By: labath, clayborg
Differential Revision: https://reviews.llvm.org/D34945
llvm-svn: 307768
show more ...
|
Revision tags: llvmorg-4.0.1, llvmorg-4.0.1-rc3, llvmorg-4.0.1-rc2 |
|
#
cf4321a4 |
| 29-May-2017 |
Stephan Bergmann <sbergman@redhat.com> |
More StructuredData::Type::eTypeDictionary -> lldb::eStructuredDataTypeDictionary
...missing from previous r304138 "Added new API to SBStructuredData class"
llvm-svn: 304142
|
#
e714c4f5 |
| 26-May-2017 |
Ravitheja Addepally <ravitheja.addepally@intel.com> |
Implementation of remote packets for Trace data.
Summary: The changes consist of new packets for trace manipulation and trace collection. The new packets are also documented. The packets are capable
Implementation of remote packets for Trace data.
Summary: The changes consist of new packets for trace manipulation and trace collection. The new packets are also documented. The packets are capable of providing custom trace specific parameters to start tracing and also retrieve such configuration from the server.
Reviewers: clayborg, lldb-commits, tberghammer, labath, zturner
Reviewed By: clayborg, labath
Subscribers: krytarowski, lldb-commits
Differential Revision: https://reviews.llvm.org/D32585
llvm-svn: 303972
show more ...
|
#
2833321f |
| 12-May-2017 |
Zachary Turner <zturner@google.com> |
Update StructuredData::String to return StringRefs.
It was returning const std::string& which was leading to unnecessary copies all over the place, and preventing people from doing things like Dict-
Update StructuredData::String to return StringRefs.
It was returning const std::string& which was leading to unnecessary copies all over the place, and preventing people from doing things like Dict->GetValueForKeyAsString("foo", ref);
llvm-svn: 302875
show more ...
|
#
97206d57 |
| 12-May-2017 |
Zachary Turner <zturner@google.com> |
Rename Error -> Status.
This renames the LLDB error class to Status, as discussed on the lldb-dev mailing list.
A change of this magnitude cannot easily be done without find and replace, but that h
Rename Error -> Status.
This renames the LLDB error class to Status, as discussed on the lldb-dev mailing list.
A change of this magnitude cannot easily be done without find and replace, but that has potential to catch unwanted occurrences of common strings such as "Error". Every effort was made to find all the obvious things such as the word "Error" appearing in a string, etc, but it's possible there are still some lingering occurences left around. Hopefully nothing too serious.
llvm-svn: 302872
show more ...
|
Revision tags: llvmorg-4.0.1-rc1 |
|
#
70a9f511 |
| 14-Apr-2017 |
Greg Clayton <gclayton@apple.com> |
Increase the packet timeout for the jModulesInfo since it can take longer than the default 1 second timeout on some linux versions when many shared libraries are involved.
llvm-svn: 300342
|
#
48d1427c |
| 31-Mar-2017 |
Stephane Sezer <sas@cd80.net> |
Verify memory address range validity in GDBRemoteCommunicationClient
Summary: This aims to verify the validity of the response from the debugging server in GDBRemoteCommunicationClient::GetMemoryReg
Verify memory address range validity in GDBRemoteCommunicationClient
Summary: This aims to verify the validity of the response from the debugging server in GDBRemoteCommunicationClient::GetMemoryRegionInfo. I was working with ds2 (https://github.com/facebook/ds2) and encountered a bug that caused the server's response to have a 'size' value of 0, which caused lldb to behave incorrectly.
Reviewers: k8stone, labath, clayborg
Reviewed By: labath, clayborg
Subscribers: clayborg, sas, lldb-commits
Differential Revision: https://reviews.llvm.org/D31485
Change by Alex Langford <apl@fb.com>
llvm-svn: 299239
show more ...
|
#
3eb2b44d |
| 22-Mar-2017 |
Zachary Turner <zturner@google.com> |
Delete some more dead includes.
This breaks the cycle between Target and PluginLanguageC++, reducing the overall cycle count from 43 to 42.
llvm-svn: 298561
|
#
7993cc5e |
| 07-Mar-2017 |
Eugene Zemtsov <ezemtsov@google.com> |
Make LLDB skip server-client roundtrip for signals that don't require any actions
If QPassSignals packaet is supported by lldb-server, lldb-client will utilize it and ask the server to ignore signal
Make LLDB skip server-client roundtrip for signals that don't require any actions
If QPassSignals packaet is supported by lldb-server, lldb-client will utilize it and ask the server to ignore signals that don't require stops or notifications. Such signals will be immediately re-injected into inferior to continue normal execution.
Differential Revision: https://reviews.llvm.org/D30520
llvm-svn: 297231
show more ...
|
Revision tags: llvmorg-4.0.0, llvmorg-4.0.0-rc4 |
|
#
8c6b546d |
| 06-Mar-2017 |
Zachary Turner <zturner@google.com> |
Remove dependency from FileSpec to ArchSpec.
All it really needs is the llvm::Triple, so make FileSpec take the Triple directly instead of the ArchSpec.
llvm-svn: 297096
|