summaryrefslogtreecommitdiffstats
path: root/lldb/examples
Commit message (Collapse)AuthorAgeFilesLines
* [Examples] Move structured-data unpacking out of the loop. (NFC)Jonas Devlieghere2019-11-221-1/+1
| | | | There's no need to repeat this work in the loop.
* [Examples] Add in_call_stack breakpoint function.Jonas Devlieghere2019-11-221-0/+24
| | | | | | | | | | | | | | | | | | | | | The in_call_stack Python script makes it possible to modify the last breakpoint to only stop if a given function is present in the call stack. It will check both the symbol name and the function name (coming from the debug info, in case the binary is stripped). To use this, you have to: 1. Import the script into lldb. (lldb) command script import in_call_stack.py 2. Set a breakpoint and use the in_call_stack alias. (lldb) b foo (lldb) in_call_stack bar Note that this alias operates on the last set breakpoint. You can re-run the in_call_stack command to modify the condition.
* crashlog.py: Improve regular expressionsAdrian Prantl2019-11-071-8/+22
| | | | | | | | | | | | | | | | | | | This is yet another change to the regular expressions in crashlog.py that fix a few edge cases, and attempt to improve the readability quite a bit in the process. My last change to support spaces in filenames introduced a bug that caused the version/archspec field to be parsed as part of the image name. For example, in "0x1111111 - 0x22222 +MyApp Pro arm64 <01234>", the name of the image was recognized as "MyApp Pro arm64" instead of "MyApp Pro" with a "version" of arm64. The bugfix makes the space following an optional field mandatory *inside* the optional group. rdar://problem/56883435 Differential Revision: https://reviews.llvm.org/D69871
* Revert [heap.py] Add missing declaration for malloc_get_all_zonesVedant Kumar2019-08-221-1/+0
| | | | | | | | This reverts r369684 (git commit cc62e38d258f414c196b566374c606e83a85a034) Adding a declaration doesn't appear to be a sufficient fix. llvm-svn: 369706
* [heap.py] Add missing declaration for malloc_get_all_zonesVedant Kumar2019-08-221-0/+1
| | | | | | | | The evaluation context isn't guaranteed to have this declaration. Fixes "error: use of undeclared identifier 'malloc_get_all_zones'" bugs. llvm-svn: 369684
* [Symbolication] Remove some dead code. Nothing exciting.Davide Italiano2019-07-291-2/+0
| | | | llvm-svn: 367262
* [Symbolication] Remove a duplicate assignment.Davide Italiano2019-07-291-1/+0
| | | | llvm-svn: 367261
* [Symbolication] Fix unicode compatibility between 2 and 3.Davide Italiano2019-07-291-1/+1
| | | | | | | | | Triples are always ASCII for now, but we were handed out a unicode object. <rdar://problem/53592772> llvm-svn: 367260
* [crashlog] Fix a mismatch between bytes and strings.Davide Italiano2019-07-091-1/+1
| | | | | | | | | The functions in read_plist() want bytes as input, not strings. <rdar://problem/52600712> llvm-svn: 365416
* Use the // integer divide operator in these Jason Molenda2019-06-262-2/+2
| | | | | | target definition files, like Davide's change to x86_64_target_definition.py. llvm-svn: 364481
* [x86-64] Use `//` for integer division in the target definition.Davide Italiano2019-06-261-1/+1
| | | | | | | | This forces integer division and works with python 2 and python 3. <rdar://problem/52073911> llvm-svn: 364465
* Python 3: decode string as utf-8 to avoid type mismatch.Adrian Prantl2019-06-141-5/+5
| | | | | | | | rdar://problem/51464644 Differential Revision: https://reviews.llvm.org/D63311 llvm-svn: 363413
* Make crashlog.py less noisyAdrian Prantl2019-06-141-9/+27
| | | | | | | | | | | For end-users there is no point in printing dSYM load errors for system frameworks, since they will all fail and there's nothing they can do about it. This patch hides them by default and shows them when --verbose is present. Differential Revision: https://reviews.llvm.org/D63310 llvm-svn: 363412
* [lldb] Ignore null frames in lldb.macosx crashlogStefan Granitz2019-06-121-0/+4
| | | | llvm-svn: 363172
* [crashlog] Add a missing call to decode.Davide Italiano2019-05-301-1/+1
| | | | | | <rdar://problem/51139357> llvm-svn: 362044
* [crashlog] Use loads() instead of readPlistFromString() for python 3.Davide Italiano2019-05-181-1/+7
| | | | | | <rdar://problem/50903413> llvm-svn: 361087
* [Python] Simplify the code. NFCI.Davide Italiano2019-04-184-24/+8
| | | | llvm-svn: 358721
* [crashlog] Strip trailing `\n` from check_output return.Davide Italiano2019-04-181-1/+1
| | | | | | | | Generally having spurious `\n` doesn't matter, but here the returning string is a command which is executed, so we want to strip it. Pointed out by Jason. llvm-svn: 358717
* [crashlog] Use the right path for dsymforUUID and remove an unnecessary import.Davide Italiano2019-04-171-6/+1
| | | | | | <rdar://problem/49925960> llvm-svn: 358615
* [NFC] Remove ASCII lines from commentsJonas Devlieghere2019-04-104-86/+0
| | | | | | | | | | | | | | | | | | | | | | | A lot of comments in LLDB are surrounded by an ASCII line to delimit the begging and end of the comment. Its use is not really consistent across the code base, sometimes the lines are longer, sometimes they are shorter and sometimes they are omitted. Furthermore, it looks kind of weird with the 80 column limit, where the comment actually extends past the line, but not by much. Furthermore, when /// is used for Doxygen comments, it looks particularly odd. And when // is used, it incorrectly gives the impression that it's actually a Doxygen comment. I assume these lines were added to improve distinguishing between comments and code. However, given that todays editors and IDEs do a great job at highlighting comments, I think it's worth to drop this for the sake of consistency. The alternative is fixing all the inconsistencies, which would create a lot more churn. Differential revision: https://reviews.llvm.org/D60508 llvm-svn: 358135
* python 2/3 compat: commands vs subprocessSerge Guelton2019-03-268-15/+26
| | | | | | Differential Revision: https://reviews.llvm.org/D59584 llvm-svn: 356995
* Python 2/3 compat: StringIOSerge Guelton2019-03-252-4/+2
| | | | | | Differential Revision: https://reviews.llvm.org/D59582 llvm-svn: 356910
* Python 2/3 compat: tkinterSerge Guelton2019-03-251-2/+7
| | | | | | Differential Revision: https://reviews.llvm.org/D59586 llvm-svn: 356909
* Python 2/3 compat: str vs basestringSerge Guelton2019-03-258-0/+40
| | | | | | Differential Revision: https://reviews.llvm.org/D59589 llvm-svn: 356908
* Python 2/3 compat: unichr vs chrSerge Guelton2019-03-251-0/+4
| | | | llvm-svn: 356904
* Python 2/3 compatibility: from __future__ import print_functionSerge Guelton2019-03-2130-540/+576
| | | | | | Differential Revision: https://reviews.llvm.org/D59580 llvm-svn: 356695
* Workaround items/iteritems difference between Python2 and Python3Serge Guelton2019-03-211-1/+1
| | | | | | Differential Revision: https://reviews.llvm.org/D59588 llvm-svn: 356673
* Portable int/long conversion across Python 2 / Python 3Serge Guelton2019-03-211-1/+1
| | | | | | Differential Revision: https://reviews.llvm.org/D59585 llvm-svn: 356671
* Portable exception value access across Python 2 / Python 3Serge Guelton2019-03-211-1/+1
| | | | | | Differential Revision: https://reviews.llvm.org/D59583 llvm-svn: 356670
* A target definition file that may work for Jason Molenda2019-03-181-0/+140
| | | | | | | | Aarch32 Cortex-M target processor debugging. <rdar://problem/48448564> llvm-svn: 356416
* Fix libstdc++ data formatters for python3Pavel Labath2019-03-181-2/+3
| | | | | | | Use floor-division for consistentcy across python versions. This fixes a couple of libstdc++ data formatter tests. llvm-svn: 356377
* [Python] Fix another batch of python 2/python 3 portability issues.Davide Italiano2019-03-131-5/+2
| | | | llvm-svn: 355998
* Bring Doxygen comment syntax in sync with LLVM coding style.Adrian Prantl2019-03-111-1/+1
| | | | | | This changes '@' prefix to '\'. llvm-svn: 355841
* crashlog.py: Catch exception from subprocess.Adrian Prantl2019-03-071-1/+5
| | | | llvm-svn: 355572
* [Python] Unbreak the recently modified tests for python 2.Davide Italiano2019-03-063-0/+3
| | | | llvm-svn: 355566
* [testsuite] Port crashlog to python 3, second attempt.Davide Italiano2019-03-063-114/+112
| | | | llvm-svn: 355562
* Revert "[testsuite] Port crashlog and dependencies to Python 3."Davide Italiano2019-03-053-130/+117
| | | | | | | This revert the commit because it broke the bots. I need to find a way that works with both versions. llvm-svn: 355364
* [testsuite] Port crashlog and dependencies to Python 3.Davide Italiano2019-03-053-117/+130
| | | | | | Fixes three tests in the testsuite. llvm-svn: 355359
* Fix use of non-existing variable in crashlog.pyShafik Yaghmour2019-01-311-1/+1
| | | | | | | | | Summary: The method find_matching_slice(self) uses uuid_str on one of the paths but the variable does not exist and so this results in a NameError exception if we take that path. Differential Revision: https://reviews.llvm.org/D57467 llvm-svn: 352772
* Fix order of arguments in an lldb type summary in examplesNathan Lanza2019-01-191-1/+1
| | | | | | | | | | The format for the -w argument is: -w name ( --category name ) Rearrange the flags correctly. llvm-svn: 351664
* Update the file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-1934-112/+102
| | | | | | | | | | | | | | | | | to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636
* Fix lldb's macosx/heap.py cstr command.Davide Italiano2018-12-171-1/+1
| | | | | | <rdar://problem/44432167> llvm-svn: 349372
* Make crashlog.py work or binaries with spaces in their namesAdrian Prantl2018-12-171-21/+10
| | | | | | | | | | | | This is a little dangerous since the crashlog files aren't 100% unambiguous, but the risk is mitigated by using a non-greedy +? pattern. rdar://problem/38478511 Differential Revision: https://reviews.llvm.org/D55608 llvm-svn: 349367
* Make crashlog.py work when a .dSYM is present, but a binary is missingAdrian Prantl2018-12-171-15/+37
| | | | | | | | | | Often users have a crash log an d a .dSYM bundle, but not the original application binary. It turns out that for crash symbolication, we can safely fall back to using the binary inside the .dSYM bundle. Differential Revision: https://reviews.llvm.org/D55607 llvm-svn: 349366
* Remove header grouping comments.Jonas Devlieghere2018-11-111-1/+1
| | | | | | | | This patch removes the comments grouping header includes. They were added after running IWYU over the LLDB codebase. However they add little value, are often outdates and burdensome to maintain. llvm-svn: 346626
* Remove comments after header includes.Jonas Devlieghere2018-11-111-1/+1
| | | | | | | | | | This patch removes the comments following the header includes. They were added after running IWYU over the LLDB codebase. However they add little value, are often outdates and burdensome to maintain. Differential revision: https://reviews.llvm.org/D54385 llvm-svn: 346625
* Fixes for GDB remote packet disassembler:Greg Clayton2018-09-271-59/+131
| | | | | | | | - Add latency timings to GDB packet log summary if timestamps are on log - Add the ability to plot the latencies for each packet type with --plot - Don't crash the script when target xml register info is in wierd format llvm-svn: 343243
* Add an interactive mode to BSD archive parser.Greg Clayton2018-09-271-11/+94
| | | | llvm-svn: 343242
* Update cmdtemplate.py to use best pratices.Greg Clayton2018-06-221-53/+78
| | | | | | | | | | Fixes include: - fix all lint errors - add code that will automatically register and LLDB command classes by detecting the classes and any classes that have a "register_lldb_command" function - automatically fill in the correct module name when registering commands - automatically fill in the class name when registering command llvm-svn: 335401
* Fix/unify the spelling of Objective-C.Adrian Prantl2018-06-131-2/+2
| | | | llvm-svn: 334614
OpenPOWER on IntegriCloud