Commit Graph

8005 Commits

Author SHA1 Message Date
Enrico Granata 90a8db30de Renaming the setting to enable/disable automatic one-lining of summaries as auto-one-line-summaries
llvm-svn: 193801
2013-10-31 21:01:07 +00:00
Ed Maste 1c09d4a537 Migrate DWARFDebugLine to DWARFDataExtractor 64-bit DWARF support
llvm-svn: 193794
2013-10-31 19:51:53 +00:00
Andrew Kaylor 7268e6ef9d Fix dynamic value test to build correctly on Linux with C++11 features.
llvm-svn: 193793
2013-10-31 19:42:35 +00:00
Ed Maste d8f57278b8 Remove unused DWARFDebugLine length functions
llvm-svn: 193792
2013-10-31 19:31:16 +00:00
Enrico Granata d7373f69cf SBValue::GetValueAsUnsigned()/GetValueAsSigned() should not replicate the Scalar manipulation logic found in ValueObject, but rather just call down to it
llvm-svn: 193786
2013-10-31 18:57:50 +00:00
Greg Clayton a1e0318c42 Added more details on the exact version of the cxa_demangle.cpp file for the built in demangler. This will help us track when we need to update this file.
llvm-svn: 193784
2013-10-31 18:41:50 +00:00
Ed Maste 3606da2614 Use inlined demangler on FreeBSD
FreeBSD includes the elftoolchain project's demangler in the base system.
It does not handle some unusual mangled names, so use the inlined
libcxxabi one.

llvm-svn: 193776
2013-10-31 17:42:32 +00:00
Ed Maste fb15ba6879 Tls test fails on FreeBSD due to llvm.org/pr16696
(Threaded inferior debugging not yet available on FreeBSD.)

llvm-svn: 193771
2013-10-31 17:21:15 +00:00
Greg Clayton dc25a0bc64 <rdar://problem/14496092>
Fixes from code review by Jim Ingham that reinstate preferring an external vs non-external symbol when finding function addresses.

llvm-svn: 193761
2013-10-31 16:59:47 +00:00
Enrico Granata 686f3deb44 This checkin introduces the notion of hardcoded formatters, which LLDB can bind to a ValueObject internally depending on any criteria
User-vended by-type formatters still would prevail on these hardcoded ones

For the time being, while the infrastructure is there, no such formatters exist

This can be useful for cases such as expanding vtables for C++ class pointers, when there is no clear cut notion of a typename matching, and the feature is low-level enough that it makes sense for the debugger core to be vending it

llvm-svn: 193724
2013-10-30 23:46:27 +00:00
Greg Clayton f32db51c50 <rdar://problem/14496092>
Fixed the expression parser to be able to iterate across all function name matches that it finds when it is looking for the address of a function that the IR is looking for. Also taught it to deal with reexported symbols.

llvm-svn: 193716
2013-10-30 21:37:46 +00:00
Andrew Kaylor ba8ce0414e Removing expected failure decorator for a test that's passing.
llvm-svn: 193715
2013-10-30 21:05:36 +00:00
Greg Clayton 19c8e78b86 <rdar://problem/15201312>
Inlined a copy of cxa_demangle.cpp from:

http://llvm.org/svn/llvm-project/libcxxabi/trunk/src/cxa_demangle.cpp

For systems that don't have demangling built into the system, and for systems that don't want to use the version that is installed. Defining LLDB_USE_BUILTIN_DEMANGLER in your build system allows you to use the built in demangler. This setting is curently automatically enabled for Windows builds.

llvm-svn: 193708
2013-10-30 18:42:59 +00:00
Greg Clayton c1ae724757 Fixed a warning in PlatformiOSSimulator where GetSDKDirectory was hiding recently added virtual function. Renamed GetSDKDirectory to GetSDKsDirectory to fix the issue. GetSDKsDirectory is a better fit because it finds the directory that contains all SDKs, not the current one.
llvm-svn: 193707
2013-10-30 18:40:41 +00:00
Enrico Granata 5e1480c5dc <rdar://problem/13308704>
Fixing a problem where ValueObject::GetPointeeData() would not accept "partial" valid reads (i.e. asking for 10 items and getting only 5 back)
While suboptimal, this situation is not a flat-out failure and could well be caused by legit scenarios, such as hitting a page boundary

Among others, this allows data formatters to print char* buffers allocated under libgmalloc

llvm-svn: 193704
2013-10-30 17:52:44 +00:00
Enrico Granata 34b6671ca3 <rdar://problem/15143022>
CFNumberRef is toll-free bridged to NSNumber
We can use the same summary formatter for both types

llvm-svn: 193666
2013-10-30 00:17:52 +00:00
Enrico Granata 38c546320c <rdar://problem/15045059>
One of the things that dynamic typing affects is the count of children a type has
Clear out the flag that makes us blindly believe the children count when a dynamic type change is detected

llvm-svn: 193663
2013-10-30 00:04:29 +00:00
Enrico Granata 0947a6e93b <rdar://problem/15296388>
Fix a crasher that would occur if one tried to read memory as characters of some size != 1, e.g.
x -f c -s 10  buffer

This commit tries to do the right thing and uses the byte-size as the number of elements, unless both are specified and the number of elements is != 1
In this latter case (e.g. x -f c -s 10 -c 3  buffer) one could multiply the two and read 30 characters, but it seems a stretch in mind reading.

llvm-svn: 193659
2013-10-29 23:04:29 +00:00
Enrico Granata df7c7f99ba Fixing an issue in yesterday's dynamic type changes where we would not craft a valid SBType given debug information
Added a test case to help us detect regression in this realm

llvm-svn: 193631
2013-10-29 17:42:02 +00:00
Andrew Kaylor 2c206688db Fixing TestAnonymous to build dwarf where it says it will.
llvm-svn: 193628
2013-10-29 17:09:59 +00:00
Enrico Granata dc4db5a6eb <rdar://problem/15144376>
This commit reimplements the TypeImpl class (the class that backs SBType) in terms of a static,dynamic type pair

This is useful for those cases when the dynamic type of an ObjC variable can only be obtained in terms of an "hollow" type with no ivars
In that case, we could either go with the static type (+iVar information) or with the dynamic type (+inheritance chain)

With the new TypeImpl implementation, we try to combine these two sources of information in order to extract as much information as possible
This should improve the functionality of tools that are using the SBType API to do extensive dynamic type inspection

llvm-svn: 193564
2013-10-29 00:28:35 +00:00
Jim Ingham 4396b8e618 Change the default handling for SIGALRM and SIGCHLD to not notify.
<rdar://problem/15208799>

llvm-svn: 193530
2013-10-28 19:00:42 +00:00
Jason Molenda 6a8658ad61 Fix the signed-ness of a few log printf directives in Process::RunThreadPlan.
llvm-svn: 193488
2013-10-27 02:32:23 +00:00
Enrico Granata 553fad5c9a <rdar://problem/15319880>
Introduce a new boolean setting enable-auto-oneliner
This setting if set to false will force LLDB to not use the new compact one-line display

By default, one-line mode stays on, at least until we can be confident it works.
But now if it seriously impedes your workflow while it evolves/it works wonders but you still hate it, there's a way to turn it off

llvm-svn: 193450
2013-10-25 23:09:40 +00:00
Greg Clayton bac3ff1aa7 Update the key/value documentation for the qHostInfo packet.
llvm-svn: 193426
2013-10-25 18:22:24 +00:00
Greg Clayton 9ac6d2db73 <rdar://problem/15263540>
Added a new key that we understand for the "qHostInfo" packet: "default_packet_timeout:T;" where T is a default packet timeout in seconds.

This allows GDB servers with known slow packet response times to increase the default timeout to a value that makes sense for the connection.

llvm-svn: 193425
2013-10-25 18:13:17 +00:00
Ed Maste 9204e6d8f5 Update DWARFDebugPubnamesSet 64-bit DWARF to use new DWARFDataExtractor
llvm-svn: 193407
2013-10-25 13:18:17 +00:00
Greg Clayton 9b2349888f Added the ability to get the SDK path for a target using the platform plugins. If LLDB lives inside an Xcode.app bundle, it will select the SDK in the Xcode bundle, else it will use the currently selected Xcode.
Also added the DWARFDataExtractor classes to the Xcode project file.

llvm-svn: 193380
2013-10-24 22:54:08 +00:00
Ed Maste eeae72184b Introduce DWARFDataExtractor for 64-Bit DWARF parsing
Review: http://llvm-reviews.chandlerc.com/D2007
llvm-svn: 193368
2013-10-24 20:43:47 +00:00
Greg Clayton 4598907ff8 Fixed format strings as they still must specicy a '%' prior to using PRI*64 macros.
llvm-svn: 193260
2013-10-23 18:24:30 +00:00
Ed Maste 2ea0f2cdae 64-Bit DWARF support for .debug_aranges and .debug_pubnames
llvm-svn: 193250
2013-10-23 17:24:15 +00:00
Ed Maste 726a591482 Initial DWARF64 support for .debug_line
Some versions of the GNU MIPS toolchain generate 64-Bit DWARF (even though
it isn't really necessary).  This change adds support for the 64-Bit DWARF
format, but is not actually tested with >4GB of debug data.

Similar changes are in progress for llvm's version of DWARFDebugLine, in
review D1988.

llvm-svn: 193242
2013-10-23 14:18:41 +00:00
Enrico Granata c89e4ca3c1 One should actually not do one-line printing of nested aggregates even if they are not the base class
This check was overly strict. Relax it.
While one could conceivably want nested one-lining:
(Foo) aFoo = (x = 1, y = (t = 3, q = “Hello), z = 3.14)
the spirit of this feature is mostly to make *SMALL LINEAR* structs come out more compact.
Aggregates with children and no summary for now just disable the one-lining. Define a one-liner summary to override :)

llvm-svn: 193218
2013-10-23 01:34:31 +00:00
Wei Pan 133ac8714d LUI: Fix some issues causing crashes in the source view
llvm-svn: 193217
2013-10-23 01:18:21 +00:00
Enrico Granata 106260c574 Improvements to the ValueObjectPrinter to behave correctly in more dynamic value cases
llvm-svn: 193204
2013-10-22 22:42:14 +00:00
Sean Callanan 13b4ef2dba Simplified the code that materializes a variable,
obviating the need to create a new ValueObject.

llvm-svn: 193191
2013-10-22 20:01:17 +00:00
Deepak Panickal d66b50c96c Fixes to get LLDB building on Windows again.
llvm-svn: 193159
2013-10-22 12:27:43 +00:00
Jason Molenda 12075f71f9 Update ResolveFunctionPointers to build after the changes
of llvm r193091.  Thanks to Ed Maste for narrowing it down.

llvm-svn: 193140
2013-10-22 03:11:55 +00:00
Jason Molenda 5e873dbc40 Fix for a mistake spotted by Enrico with the SBThread::queue_id accessor.
llvm-svn: 193136
2013-10-22 01:37:18 +00:00
Jason Molenda 4fdb5863b9 Expose the Thread::GetQueueID() method through the SBThread API, similar to
the existing SBThread::GetQueueName() method.

llvm-svn: 193132
2013-10-21 23:52:54 +00:00
Greg Clayton d65ef14df3 Fixed breakpoints to be able to be set on eSymbolTypeReExported symbols and resolve to the correct function. This allows setting a breakpoint on "memset" for iOS simulator binaries and the correct breakpoint will be set on "__platform_memset".
llvm-svn: 193114
2013-10-21 20:04:47 +00:00
Greg Clayton 9191db47da <rdar://problem/14496092>
Fixed an issue with reexported symbols on MacOSX by adding support for symbols re-exporting symbols. There is now a new symbol type eSymbolTypeReExported which contains a new name for the re-exported symbol and the new shared library. These symbols are only used when a symbol is re-exported as a symbol under a different name.

Modified the expression parser to be able to deal with finding the re-exported symbols and track down the actual symbol it refers to.

llvm-svn: 193101
2013-10-21 18:40:51 +00:00
Enrico Granata aff6565f85 Get rid of the FooStructSynth, it was a testing thing I put in and forgot to remove
Hopefully nobody had a struct Foo in their app:-)

llvm-svn: 193092
2013-10-21 17:29:51 +00:00
Joerg Sonnenberger e77b0424fd Fix python-free build.
llvm-svn: 193053
2013-10-20 17:36:05 +00:00
Joerg Sonnenberger c5e53bd14a Make sure switch covers all values.
llvm-svn: 193052
2013-10-20 17:35:46 +00:00
Jim Ingham be40554915 ValueObject and SBValue's GetChildMemberWithName should look through anonymous structs
and unions the same way that C would.

<rdar://problem/11987906>

llvm-svn: 193016
2013-10-18 23:53:55 +00:00
Ed Maste f7920c8798 Fix build failure on FreeBSD/clang by using auto iterator type
llvm-svn: 192999
2013-10-18 20:32:25 +00:00
Ed Maste 68f517938a Add stub FreeBSD ProcessMonitor::ReadThreadPointer
llvm-svn: 192994
2013-10-18 19:16:44 +00:00
Enrico Granata fcb37ae365 <rdar://problem/15182550>
Removing Host/Atomic.h
This header file was not being copied as part of our public API headers and this in turn was causing any plugin to link against LLDB.framework, since SharingPtr.h depends on it

Out of several possible options to fix this issue, the cleanest one is to revert LLDB to use std::atomic<>, as we are a C++11 project and should take advantage of it

The original rationale for going from std::atomic to Host/Atomic.h was that MSVC++ fails to link in CLR mode when std::atomic is used
This is a very Visual Studio/.net specific issue, which hopefully will be fixed
Until them, to allow Windows development to proceed, we are going with a targeted solution where we #ifdef include the Windows specific calls, and let everyone else use the
proper atomic support, as should be

If there is an unavoidable need for a LLDB-specific atomic header, the right way to go at it would be to make an API/lldb-atomic.h header and #ifdef the Windows dependency there

The FormatManager should not need to conditionalize use of std::atomic<>, as other parts of the LLDB internals are successfully using atomic (Address and IRExecutionUnit), so this
Win-specific hack is limited to SharingPtr

llvm-svn: 192993
2013-10-18 18:57:49 +00:00
Jim Ingham 8ec10efc5d Mark the selected frame of the selected thread in backtraces.
<rdar://problem/15252474>

llvm-svn: 192989
2013-10-18 17:38:31 +00:00