summaryrefslogtreecommitdiffstats
path: root/lldb/source/Symbol/DWARFCallFrameInfo.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [Logging] Replace Log::Printf with LLDB_LOG macro (NFC)Jonas Devlieghere2019-07-241-7/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | This patch replaces explicit calls to log::Printf with the new LLDB_LOGF macro. The macro is similar to LLDB_LOG but supports printf-style format strings, instead of formatv-style format strings. So instead of writing: if (log) log->Printf("%s\n", str); You'd write: LLDB_LOG(log, "%s\n", str); This change was done mechanically with the command below. I replaced the spurious if-checks with vim, since I know how to do multi-line replacements with it. find . -type f -name '*.cpp' -exec \ sed -i '' -E 's/log->Printf\(/LLDB_LOGF\(log, /g' "{}" + Differential revision: https://reviews.llvm.org/D65128 llvm-svn: 366936
* Support Linux signal return trampolines in frame initializationJoseph Tremoulet2019-07-191-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Add __kernel_rt_sigreturn to the list of trap handlers for Linux (it's used as such on aarch64 at least), and __restore_rt as well (used on x86_64). Skip decrement-and-recompute for trap handlers in InitializeNonZerothFrame, as signal dispatch may point the child frame's return address to the start of the return trampoline. Parse the 'S' flag for signal handlers from eh_frame augmentation, and propagate it to the unwind plan. Reviewers: labath, jankratochvil, compnerd, jfb, jasonmolenda Reviewed By: jasonmolenda Subscribers: clayborg, MaskRay, wuzish, nemanjai, kbarton, jrtc27, atanasyan, jsji, javed.absar, kristof.beyls, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D63667 llvm-svn: 366580
* [Symbol] Remove dead codeAlex Langford2019-05-221-55/+0
| | | | llvm-svn: 361337
* FuncUnwinders: remove "current_offset" from function argumentsPavel Labath2019-04-231-17/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This argument was added back in 2010 (r118882) to support the ability to unwind from functions whose eh_frame entry does not cover the entire range of the function. However, due to the caching happening in FuncUnwinders, this solution is very fragile. FuncUnwinders will cache the plan it got from eh_frame regardless of the value of the current_offset, so our ability to unwind from a given function depended what was the value of "current_offset" the first time that this function was called. Furthermore, since the "image show-unwind" command did not know what's the right offset to pass, this created an unfortunate situation where "image show-unwind" would show no valid plans for a function, even though they were available and being used. In this patch I implement the feature slightly differently. Instead of giving just a base address to the eh_frame unwinder, I give it the entire range we are interested in. Then, I change the unwinder to return the first plan that covers (even partially) that range. This way even a partial plan will be returned, regardless of the address in the function where we are stopped at. This solution is still not 100% correct, as it will not handle a function which is covered by two independent fde entries. However, I don't expect anybody will write this kind of functions, and this wasn't handled by the previous implementation either. If this is ever needed in the future. The eh_frame unwinder can be extended to return "composite" unwind plans created by merging sevelar fde entries. I also create a test which triggers this scenario. As doing this is virtually impossible without hand-written assembly, the test only works on x86 linux. Reviewers: jasonmolenda, clayborg Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D60829 llvm-svn: 358964
* [NFC] Remove ASCII lines from commentsJonas Devlieghere2019-04-101-2/+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
* Promote more debug-only assertions to regular assertions.Adrian Prantl2019-03-071-2/+0
| | | | llvm-svn: 355569
* Remove redundant ::get() for smart pointer. (NFC)Jonas Devlieghere2019-02-121-1/+1
| | | | | | | | This commit removes redundant calls to smart pointer’s ::get() method. https://clang.llvm.org/extra/clang-tidy/checks/readability-redundant-smartptr-get.html llvm-svn: 353795
* Update the file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-191-4/+3
| | | | | | | | | | | | | | | | | 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
* Simplify ObjectFile::GetArchitecturePavel Labath2019-01-031-2/+1
| | | | | | | | | | | | | | | | Summary: instead of returning the architecture through by-ref argument and a boolean value indicating success, we can just return the ArchSpec directly. Since the ArchSpec already has an invalid state, it can be used to denote the failure without the additional bool. Reviewers: clayborg, zturner, espindola Subscribers: emaste, arichardson, JDevlieghere, lldb-commits Differential Revision: https://reviews.llvm.org/D56129 llvm-svn: 350291
* Simplify Boolean expressionsJonas Devlieghere2018-12-151-5/+5
| | | | | | | | | | | This patch simplifies boolean expressions acorss LLDB. It was generated using clang-tidy with the following command: run-clang-tidy.py -checks='-*,readability-simplify-boolean-expr' -format -fix $PWD Differential revision: https://reviews.llvm.org/D55584 llvm-svn: 349215
* Reflow paragraphs in comments.Adrian Prantl2018-04-301-110/+97
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Move ArchSpec to the Utility modulePavel Labath2017-11-131-6/+3
| | | | | | | | | | | | | The rationale here is that ArchSpec is used throughout the codebase, including in places which should not depend on the rest of the code in the Core module. This commit touches many files, but most of it is just renaming of #include lines. In a couple of cases, I removed the #include ArchSpec line altogether, as the file was not using it. In one or two places, this necessitated adding other #includes like lldb-private-defines.h. llvm-svn: 318048
* Move Timer and TraceOptions from Core to UtilityPavel Labath2017-06-291-1/+1
| | | | | | | | | | | | | | Summary: The classes have no dependencies, and they are used both by lldb and lldb-server, so it makes sense for them to live in the lowest layers. Reviewers: zturner, jingham Subscribers: emaste, mgorny, lldb-commits Differential Revision: https://reviews.llvm.org/D34746 llvm-svn: 306682
* [DWARFCallFrameInfo] Add Type enum to differentiate eh/debug_frame sectionsPavel Labath2017-06-281-18/+11
| | | | | | | | | | | | | | | | | Summary: instead of using a boolean to differentiate between the two section types, use an enum to make the intent clearer. I also remove the RegisterKind argument from the constructor, as this can be deduced from the Type argument. Reviewers: clayborg, jasonmolenda Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D34681 llvm-svn: 306521
* Add debug_frame section supportPavel Labath2017-06-271-15/+48
| | | | | | | | | | | | | | | | | | | | | | | | Summary: This is a beefed-up version of D33504, which adds support for dwarf 4 debug_frame section format. The main difference here is that the decision whether to use eh_frame or debug_frame is done on a per-function basis instead of per-object file. This is necessary because one module can contain both sections (for example, the start files added by the linker will typically pull in eh_frame), but we want to be able to access both, for maximum information. I also add unit test for parsing various CFI formats (eh_frame, debug_frame v3 and debug_frame v4). Reviewers: jasonmolenda, clayborg Subscribers: mgorny, aprantl, abidh, lldb-commits, tatyana-krasnukha Differential Revision: https://reviews.llvm.org/D34613 llvm-svn: 306397
* Revert "Fix FDE indexing while scan debug_info section."Pavel Labath2017-05-251-20/+11
| | | | | | | | | | This reverts commit r303847 as it introduces a number of regressions. Investigation has showed that we are parsing the CIE entries in the debug_frame section incorrectly -- we are parsing them the same way as eh_frame, but the entries in debug_frame have a couple of extra entries which have not been taken into account. llvm-svn: 303854
* Fix FDE indexing while scan debug_info section.Hafiz Abid Qadeer2017-05-251-11/+20
| | | | | | | | | | | | | | | | | | | | There are some differences between eh_frame and debug_frame formats that are not considered by DWARFCallFrameInfo::GetFDEIndex. An FDE entry contains CIE_pointer in debug_frame in same place as cie_id in eh_frame. As described in dwarf standard (section 6.4.1), CIE_pointer is an "offset into the .debug_frame section". So, variable cie_offset should be equal cie_id for debug_frame. FDE entries with zeroth CIE pointer (which is actually placed in cie_id variable) shouldn't be ignored also. I have also added a little change which allow to use debug_info section when eh_frame is absent. This case really can take place on some platforms. Patch from tatyana-krasnukha. https://reviews.llvm.org/D33504 llvm-svn: 303847
* Remove an expensive lock from TimerPavel Labath2017-05-151-1/+2
| | | | | | | | | | | | | The Timer destructor would grab a global mutex in order to update execution time. Add a class to define a category once, statically; the class adds itself to an atomic singly linked list, and thus subsequent updates only need to use an atomic rather than grab a lock and perform a hashtable lookup. Differential Revision: https://reviews.llvm.org/D32823 Patch by Scott Smith <scott.smith@purestorage.com>. llvm-svn: 303058
* Isolate Target-specific functionality of DataExtractor.Zachary Turner2017-03-031-16/+142
| | | | | | | | | | | | | | | | In an effort to move the various DataBuffer / DataExtractor classes from Core -> Utility, we have to separate the low-level functionality from the higher level functionality. Only a few functions required anything other than reading/writing raw bytes, so those functions are separated out into a more appropriate area. Specifically, Dump() and DumpHexBytes() are moved into free functions in Core/DumpDataExtractor.cpp, and GetGNUEHPointer is moved into a static function in the only file that it's referenced from. Differential Revision: https://reviews.llvm.org/D30560 llvm-svn: 296910
* Move Log from Core -> Utility.Zachary Turner2017-03-031-1/+1
| | | | | | | | | All references to Host and Core have been removed, so this class can now safely be lowered into Utility. Differential Revision: https://reviews.llvm.org/D30559 llvm-svn: 296909
* *** This commit represents a complete reformatting of the LLDB source codeKate Stone2016-09-061-825/+817
| | | | | | | | | | | | | | | | | | | | | | | *** to conform to clang-format’s LLVM style. This kind of mass change has *** two obvious implications: Firstly, merging this particular commit into a downstream fork may be a huge effort. Alternatively, it may be worth merging all changes up to this commit, performing the same reformatting operation locally, and then discarding the merge for this particular commit. The commands used to accomplish this reformatting were as follows (with current working directory as the root of the repository): find . \( -iname "*.c" -or -iname "*.cpp" -or -iname "*.h" -or -iname "*.mm" \) -exec clang-format -i {} + find . -iname "*.py" -exec autopep8 --in-place --aggressive --aggressive {} + ; The version of clang-format used was 3.9.0, and autopep8 was 1.2.4. Secondly, “blame” style tools will generally point to this commit instead of a meaningful prior commit. There are alternatives available that will attempt to look through this change and find the appropriate prior commit. YMMV. llvm-svn: 280751
* Delete Host/windows/win32.hZachary Turner2016-08-091-1/+1
| | | | | | | | | | | | | | | | | | | It's always hard to remember when to include this file, and when you do include it it's hard to remember what preprocessor check it needs to be behind, and then you further have to remember whether it's windows.h or win32.h which you need to include. This patch changes the name to PosixApi.h, which is more appropriately named, and makes it independent of any preprocessor setting. There's still the issue of people not knowing when to include this, because there's not a well-defined set of things it exposes other than "whatever is missing on Windows", but at least this should make it less painful to fix when problems arise. This patch depends on LLVM revision r278170. llvm-svn: 278177
* Add missing break stmt to DW_CFA_GNU_args_size case.Jason Molenda2016-07-171-0/+1
| | | | llvm-svn: 275729
* Add "support" for DW_CFA_GNU_args_size to the unwinderPavel Labath2016-07-131-0/+20
| | | | | | | | | | | | | | | | | | | Summary: This adds the knowledge of the DW_CFA_GNU_args_size instruction to the eh_frame parsing code. Right now it is ignored as I am unsure how is it supposed to be handled, but now we are at least able to parse the rest of the FDE containing this instruction. I also add a fix for a bug which was exposed by this instruction. Namely, a mismatched sequence of remember/restore instructions in the input could cause us to pop an empty stack and crash. Now we just log the error and ignore the offending instruction. Reviewers: jasonmolenda Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D22266 llvm-svn: 275260
* Add support for using armv7 compact unwind informationJason Molenda2016-06-071-0/+11
| | | | | | | | | | | | | | | as an asynchronous unwind plan source. Two small fixes to the compact unwind dumper tool for armv7 encodings. A change to DWARFCallFrameInfo to strip the 0th bit on addresses in eh_frame sections when armv7. In the clang generated examples I have, the 0th bit is set for thumb functions and that's causing the unwinder to pick the wrong function for eh_frame info. llvm-svn: 271970
* second pass over removal of Mutex and ConditionSaleem Abdulrasool2016-05-191-3/+3
| | | | llvm-svn: 270024
* Improve the handling of missing elf symtab and missing symbol sizesTamas Berghammer2016-02-181-0/+14
| | | | | | | | | | | | | | | * Generate artificial symbol names from eh_fame during symbol parsing so these symbols are already present when we calcualte the size of the symbols where 0 is specified. * Fix symbol size calculation for the last symbol in the file where it have to last until the end of the parent section. This is the re-commit of the original change after fixing some test failures on OSX. Differential revision: http://reviews.llvm.org/D16996 llvm-svn: 261205
* Revert "Improve the handling of missing elf symtab and missing symbol sizes"Tamas Berghammer2016-02-101-14/+0
| | | | | | | | This reverts commit 252dda67782f2cbf838e375bce21ed4191f6d9ce. The commit caused several test failure on the OSX build bot. llvm-svn: 260377
* Improve the handling of missing elf symtab and missing symbol sizesTamas Berghammer2016-02-101-0/+14
| | | | | | | | | | | | * Generate artificial symbol names from eh_fame during symbol parsing so these symbols are already present when we calcualte the size of the symbols where 0 is specified. * Fix symbol size calculation for the last symbol in the file where it have to last until the end of the parent section. Differential revision: http://reviews.llvm.org/D16996 llvm-svn: 260369
* Clean up register naming conventions inside lldb. Jason Molenda2015-09-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "gcc" register numbers are now correctly referred to as "ehframe" register numbers. In almost all cases, ehframe and dwarf register numbers are identical (the one exception is i386 darwin where ehframe regnums were incorrect). The old "gdb" register numbers, which I incorrectly thought were stabs register numbers, are now referred to as "Process Plugin" register numbers. This is the register numbering scheme that the remote process controller stub (lldb-server, gdbserver, core file support, kdp server, remote jtag devices, etc) uses to refer to the registers. The process plugin register numbers may not be contiguous - there are remote jtag devices that have gaps in their register numbering schemes. I removed all of the enums for "gdb" register numbers that we had in lldb - these were meaningless - and I put LLDB_INVALID_REGNUM in all of the register tables for the Process Plugin regnum slot. This change is almost entirely mechnical; the one actual change in here is to ProcessGDBRemote.cpp's ParseRegisters() which parses the qXfer:features:read:target.xml response. As it parses register definitions from the xml, it will assign sequential numbers as the eRegisterKindLLDB numbers (the lldb register numberings must be sequential, without any gaps) and if the xml file specifies register numbers, those will be used as the eRegisterKindProcessPlugin register numbers (and those may have gaps). A J-Link jtag device's target.xml does contain a gap in register numbers, and it only specifies the register numbers for the registers after that gap. The device supports many different ARM boards and probably selects different part of its register file as appropriate. http://reviews.llvm.org/D12791 <rdar://problem/22623262> llvm-svn: 247741
* Fix typos.Bruce Mitchener2015-07-221-2/+2
| | | | | | | | | | | | Summary: Fix a bunch of typos. Reviewers: clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D11386 llvm-svn: 242856
* Improve DWARF CFI CIE parsing and remove duplicated codeTamas Berghammer2015-07-031-297/+279
| | | | | | | | | | Previously we handled only a few opcode DWARF CFI opcode when we were parsing the CIE. With this change we use mostly the same code what we use for parsing the PDE which cover more opcode. Differential revision: http://reviews.llvm.org/D10866 llvm-svn: 241332
* Fix handling of DW_CFA_restore_stateTamas Berghammer2015-07-031-0/+2
| | | | | | | | | The CFA offset shouldn't be irestored to the saved value in case of a DW_CFA_restore_state opcode. Differential revision: http://reviews.llvm.org/D10843 llvm-svn: 241331
* Fix a variety of typos.Bruce Mitchener2015-06-181-1/+1
| | | | | | No functional change. llvm-svn: 239995
* Fixed a ton of gcc compile warningsVince Harron2015-05-131-2/+2
| | | | | | | | | | Removed some unused variables, added some consts, changed some casts to const_cast. I don't think any of these changes are very controversial. Differential Revision: http://reviews.llvm.org/D9674 llvm-svn: 237218
* [DWARF CFI] Add support for DW_CFA_def_cfa_sf when parsing CIEPavel Labath2015-04-221-0/+13
| | | | | | | | | | | | Summary: Just what it says on the box. Reviewers: jasonmolenda Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D9150 llvm-svn: 235493
* Add a tiny bit of hardening to the eh_frame and compact unwind parsing.Jason Molenda2015-04-021-0/+25
| | | | | | | | When we're seeing offsets that exceed the size of our section, don't try to use that unwind info. <rdar://problem/20113673> llvm-svn: 233886
* Support evaluation of DWARF expressions setting CFAPavel Labath2015-02-231-1/+3
| | | | | | | | | | | | | | | | | | | | | Summary: This patch enables evaluation of DWARF expressions setting the CFA during stack unwinding. This makes TestSigtrampUnwind "almost" pass on linux. I am not enabling the test yet since the symbol name for the signal trampoline does not get resolved properly due to a different bug, but apart from that, the backtrace is sane. I am unsure how this change affects Mac. I think it makes the unwinder prefer the DWARF unwind plan instead of some custom platform-dependant plan. However, it does not affect the end result - the stack unwinding works as expected. Reviewers: jasonmolenda Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D7792 llvm-svn: 230211
* UnwindPlan::Row refactor -- add support for CFA set by a DWARF expressionPavel Labath2015-02-231-9/+9
| | | | | | | | | | | | | | | | | | | Summary: This change refactors UnwindPlan::Row to be able to store the fact that the CFA is value is set by evaluating a dwarf expression (DW_CFA_def_cfa_expression). This is achieved by creating a new class CFAValue and moving all CFA setting/getting code there. Note that code using the new CFAValue::isDWARFExpression is not yet present and will be added in a follow-up patch. Therefore, this patch should not change the functionality in any way. Test Plan: Ran tests on Mac and Linux. No regressions detected. Reviewers: jasonmolenda, clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D7755 llvm-svn: 230210
* Read the LSDA and Personality Routine function address out of theJason Molenda2014-11-181-3/+38
| | | | | | | | | | | | | | | | | | | | | eh_frame data. These two pieces of information are used in the process of exception handler unwinding on SysV ABI systems. This patch reads the data from the eh_frame section (DWARFCallFrameInfo.cpp), allows for it to be saved & read out of a given UnwindPlan (UnwindPlan.h, UnwindPlan.cpp) - as well as printing the information in the UnwindPlan::Dump method - and adds methods to the FuncUnwinders object so that higher levels can query if a given function has an LSDA / personality routine defined. It's only lightly tested, but seems to be working correctly as long as your have this information in eh_frame. Does not address getting this information from compact unwind yet on Darwin systems. <rdar://problem/18742797> llvm-svn: 222214
* Add 64-bit eh_frame section CFI support.Todd Fiala2014-08-251-9/+33
| | | | | | | | | | In practice, 64bit eh_frame is not used even for x86_64 binaries. The main reason is in eh_frame we almost always use pc-relative addressing, so addresses are within 32bits and gcc just sticks to 32bit eh_frame. I generated 64bit eh_frame for Android Java runtime and unwind successfully in gdb, and in lldb with this patch. Patch by Tong Shen. llvm-svn: 216409
* Switch NULL to C++11 nullptr in source/Symbol and source/UtilityEd Maste2014-04-201-10/+10
| | | | | | Patch by Robert Matusewicz llvm-svn: 206713
* Fixed a bug where CFI data would become corrupted when using ↵Richard Mitton2013-09-121-2/+5
| | | | | | | | remember/restore state instructions. This would prevent system calls on Linux from being able to backtrace correctly. llvm-svn: 190642
* Fix DWARF for 0-length CIE (data after the length should not be read if ↵Virgile Bello2013-08-251-1/+1
| | | | | | length is 0). llvm-svn: 189191
* Adds a DW_OP_call_frame_cfa handler when evaluating DWARF 3/4 expressionsAshok Thirumurthi2013-07-291-1/+2
| | | | | | | | | | | | | | in LLDB that load the canonical frame address rather than a location list. - Handles the simple case where a CFA can be pulled from the current stack frame. - Fixes more than one hundred failing tests with gcc 4.8! TODO: Use UnwindPlan::GetRowForFunctionOffset if the DWARFExpression needs to be evaluated in a context analogous to a virtual unwind (perhaps using RegisterContextLLDB). - Also adds some comments to DWARFCallFrameInfo whenever I got confused. llvm-svn: 187361
* <rdar://problem/13521159>Greg Clayton2013-03-271-2/+2
| | | | | | | | LLDB is crashing when logging is enabled from lldb-perf-clang. This has to do with the global destructor chain as the process and its threads are being torn down. All logging channels now make one and only one instance that is kept in a global pointer which is never freed. This guarantees that logging can correctly continue as the process tears itself down. llvm-svn: 178191
* Don't bother calling Reserve on the vector unless we have entries to be added.Jason Molenda2013-03-221-1/+2
| | | | llvm-svn: 177776
* Add a Reserve method to RangeVector and RangeDataVector. Have theJason Molenda2013-03-221-0/+2
| | | | | | | | DWARFCallFrameInfo method which returns a RangeVector pre-size the vector based on the number of entries it will be adding insted of growing the vector as items are added. llvm-svn: 177773
* Add a new method GetFunctionAddressAndSizeVector to DWARFCallFrameInfo.Jason Molenda2013-03-211-0/+16
| | | | | | | | | | | | | | | | | | | | | | | This returns a vector of <file address, size> entries for all of the functions in the module that have an eh_frame FDE. Update ObjectFileMachO to use the eh_frame FDE function addresses if the LC_FUNCTION_STARTS section is missing, to fill in the start addresses of any symbols that have been stripped from the binary. Generally speaking, lldb works best if it knows the actual start address of every function in a module - it's especially important for unwinding, where lldb inspects the instructions in the prologue of the function. In a stripped binary, it is deprived of this information and it reduces the quality of our unwinds and saved register retrieval. Other ObjectFile users may want to use the function addresses from DWARFCallFrameInfo to fill in any stripped symbols like ObjectFileMachO does already. <rdar://problem/13365659> llvm-svn: 177624
* Change DWARFCallFrameInfo from using a vector of AddressRanges toJason Molenda2013-03-201-35/+42
| | | | | | | | | | track the EH FDEs for the functions in a module to using a RangeDataVector, a more light-weight data structure that only refers to File addresses. Makes the initial FDE scan about 3x faster, uses less memory. <rdar://problem/13465650> llvm-svn: 177585
OpenPOWER on IntegriCloud