| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
| |
llvm-svn: 195664
|
|
|
|
|
|
|
| |
These were previously missing in g_register_infos_x86_64 and so arg
lookup failed on FreeBSD and Linux after r194035.
llvm-svn: 194392
|
|
|
|
| |
llvm-svn: 193052
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
the __thread modifier.
To make this work this patch extends LLDB to:
- Explicitly track the link_map address for each module. This is effectively the module handle, not sure why it wasn't already being stored off anywhere. As an extension later, it would be nice if someone were to add support for printing this as part of the modules list.
- Allow reading the per-thread data pointer via ptrace. I have added support for Linux here. I'll be happy to add support for FreeBSD once this is reviewed. OS X does not appear to have __thread variables, so maybe we don't need it there. Windows support should eventually be workable along the same lines.
- Make DWARF expressions track which module they originated from.
- Add support for the DW_OP_GNU_push_tls_address DWARF opcode, as generated by gcc and recent versions of clang. Earlier versions of clang (such as 3.2, which is default on Ubuntu right now) do not generate TLS debug info correctly so can not be supported here.
- Understand the format of the pthread DTV block. This is where it gets tricky. We have three basic options here:
1) Call "dlinfo" or "__tls_get_addr" on the inferior and ask it directly. However this won't work on core dumps, and generally speaking it's not a good idea for the debugger to call functions itself, as it has the potential to not work depending on the state of the target.
2) Use libthread_db. This is what GDB does. However this option requires having a version of libthread_db on the host cross-compiled for each potential target. This places a large burden on the user, and would make it very hard to cross-debug from Windows to Linux, for example. Trying to build a library intended exclusively for one OS on a different one is not pleasant. GDB sidesteps the problem and asks the user to figure it out.
3) Parse the DTV structure ourselves. On initial inspection this seems to be a bad option, as the DTV structure (the format used by the runtime to manage TLS data) is not in fact a kernel data structure, it is implemented entirely in useerland in libc. Therefore the layout of it's fields are version and OS dependent, and are not standardized.
However, it turns out not to be such a problem. All OSes use basically the same algorithm (a per-module lookup table) as detailed in Ulrich Drepper's TLS ELF ABI document, so we can easily write code to decode it ourselves. The only question therefore is the exact field layouts required. Happily, the implementors of libpthread expose the structure of the DTV via metadata exported as symbols from the .so itself, designed exactly for this kind of thing. So this patch simply reads that metadata in, and re-implements libthread_db's algorithm itself. We thereby get cross-platform TLS lookup without either requiring third-party libraries, while still being independent of the version of libpthread being used.
Test case included.
llvm-svn: 192922
|
|
|
|
|
|
| |
offsetof.
llvm-svn: 192578
|
|
|
|
|
|
|
|
|
| |
Just pass a Target* into ObjectFileELF::GetImageInfoAddress so that
it can do the extra dereference necessary on MIPS, instead of passing
a flag back to the caller.
Review: http://llvm-reviews.chandlerc.com/D1899
llvm-svn: 192469
|
|
|
|
|
|
|
|
|
|
| |
MIPS's .dyanamic section is read-only. Instead of using DT_DEBUG for
the pointer to dyld information it uses a separate tag DT_MIPS_RLD_MAP
which points to storage in the read-write .rld_map section, which in
turn points to the dyld information.
Review: http://llvm-reviews.chandlerc.com/D1890
llvm-svn: 192408
|
|
|
|
|
|
|
| |
Committing early to ease tracking other ongoing POSIX changes.
Review: http://llvm-reviews.chandlerc.com/D1886
llvm-svn: 192387
|
|
|
|
|
|
|
|
|
| |
Based on the POSIX x86_64 register context. This is sufficient for opening
a mips64 (big endian) core file. Subsequent changes will connect the
disassembler, dynamic loader support, ABI, etc.
Review: http://llvm-reviews.chandlerc.com/D1873
llvm-svn: 192335
|
|
|
|
|
|
| |
RegisterContextPOSIX_x86
llvm-svn: 192332
|
|
|
|
| |
llvm-svn: 192319
|
|
|
|
| |
llvm-svn: 192307
|
|
|
|
| |
llvm-svn: 192296
|
|
|
|
|
|
|
|
|
|
|
| |
Use 32-bit register enums without gaps on 64-bit hosts.
Don't show 64-bit registers when debugging 32-bit targets.
Add psuedo gpr registers (ax, ah, al, etc.)
Add mmx registers.
Fix TestRegisters.py to not read ymm15 register on 32-bit targets.
Fill out and move gcc/dwarf/gdb register enums to RegisterContext_x86.h
llvm-svn: 192263
|
|
|
|
|
|
| |
breakpoint isn't valid for the current thread but specify should stop to false. Also remove selecting a thread on a breakpoint hit.
llvm-svn: 191110
|
|
|
|
| |
llvm-svn: 190831
|
|
|
|
|
|
| |
Will clean up header files and m_register_infos shortly.
llvm-svn: 190757
|
|
|
|
| |
llvm-svn: 190647
|
|
|
|
|
|
|
|
| |
Instead of directly manipulating the thread list in Launch and Attach,
just rely on RefreshStateAfterStop to populate the initial list.
Review: http://llvm-reviews.chandlerc.com/D1565
llvm-svn: 189889
|
|
|
|
|
|
|
|
|
| |
On Linux there is no separate notion of a process (vs. a thread) for
ptrace(); each thread needs to be individually detached. On FreeBSD
we have a separate process context, and we detach just it.
Review: http://llvm-reviews.chandlerc.com/D1418
llvm-svn: 189666
|
|
|
|
|
|
| |
This fixes a crash on FreeBSD
llvm-svn: 189607
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This merge brings in the improved 'platform' command that knows how to
interface with remote machines; that is, query OS/kernel information, push
and pull files, run shell commands, etc... and implementation for the new
communication packets that back that interface, at least on Darwin based
operating systems via the POSIXPlatform class. Linux support is coming soon.
Verified the test suite runs cleanly on Linux (x86_64), build OK on Mac OS
X Mountain Lion.
Additional improvements (not in the source SVN branch 'lldb-platform-work'):
- cmake build scripts for lldb-platform
- cleanup test suite
- documentation stub for qPlatform_RunCommand
- use log class instead of printf() directly
- reverted work-in-progress-looking changes from test/types/TestAbstract.py that work towards running the test suite remotely.
- add new logging category 'platform'
Reviewers: Matt Kopec, Greg Clayton
Review: http://llvm-reviews.chandlerc.com/D1493
llvm-svn: 189295
|
|
|
|
| |
llvm-svn: 187995
|
|
|
|
|
|
|
|
|
|
|
| |
always now.
Created new LinuxThread class inherited from POSIXThread and removed linux / freebsd ifdefs
Removed several un-needed set thread name calls
CR (and multiple suggestions): mkopec
llvm-svn: 187545
|
|
|
|
|
|
|
|
|
|
|
|
| |
Instantiate RegisterContext... based on getOS() instead of with
compile-time #ifdef-ery.
The assert() here is unfortunate, but better than crashing with no
explanation.
This change is equivalent to r186865 for elf-core.
llvm-svn: 187422
|
|
|
|
|
|
| |
- should resolve (at least some) of the spurious crashes we are seeing in multithreaded tests on Linux (and likely FreeBSD)
llvm-svn: 187081
|
|
|
|
| |
llvm-svn: 186822
|
|
|
|
|
|
|
|
|
|
| |
Usage: 'lldb a.out -c core'.
TODO: FreeBSD support.
TODO: Support for AVX registers.
TODO: Refactor so that RegisterContextCore* don't inherit from classes that use ProcessMonitor
to fix the build on OS/X.
llvm-svn: 186516
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
RegisterContextCoreLinux_x86_64 inherits from RegisterContextLinux_x86_64 which inherits from RegisterContext_x86_64 which uses has:
ProcessMonitor &GetMonitor();
This register context used by the core file can't use this since the process plug-in will be ProcessElfCore and the implementation of GetMonitor() does:
ProcessMonitor &
RegisterContext_x86_64::GetMonitor()
{
ProcessSP base = CalculateProcess();
ProcessPOSIX *process = static_cast<ProcessPOSIX*>(base.get());
return process->GetMonitor();
}
ProcessELFCore doesn't, nor should it inherit from ProcessPOSIX and any call to GetMonitor() will fail for ELF core files.
Suggested cleanups:
- Make a register context class that is a base class that doesn't have any reading smarts, then make one that uses ProcessPOSIX and the has the GetMonitor() call, and one that gets its data straight from the core file.
llvm-svn: 186223
|
|
|
|
|
|
|
|
| |
TODO: Support for RegisterContext_x86_64::ReadFPR.
Patch by Samuel Jacob!
llvm-svn: 186207
|
|
|
|
|
|
|
|
|
| |
BreakpointSite
to avoid asserts when stepping in a multi-threaded application.
Note: Test to follow shortly.
llvm-svn: 186190
|
|
|
|
| |
llvm-svn: 186039
|
|
|
|
| |
llvm-svn: 186033
|
|
|
|
| |
llvm-svn: 185981
|
|
|
|
| |
llvm-svn: 185946
|
|
|
|
|
|
|
|
| |
multi-threaded programs.
Also fix a related issue where if a thread exits after a thread continue, lldb would hang.
llvm-svn: 185944
|
|
|
|
| |
llvm-svn: 185661
|
|
|
|
| |
llvm-svn: 185549
|
|
|
|
| |
llvm-svn: 185366
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The build system is currently miss-identifying GNU/kFreeBSD as FreeBSD.
This kind of simplification is sometimes useful, but in general it's not correct.
As GNU/kFreeBSD is an hybrid system, for kernel-related issues we want to match the
build definitions used for FreeBSD, whereas for userland-related issues we want to
match the definitions used for other systems with Glibc.
The current modification adjusts the build system so that they can be distinguished,
and explicitly adds GNU/kFreeBSD to the build checks in which it belongs.
Fixes bug #16446.
Patch by Robert Millan in the context of Debian.
llvm-svn: 185313
|
|
|
|
| |
llvm-svn: 185010
|
|
|
|
| |
llvm-svn: 184850
|
|
|
|
|
|
|
| |
Revision r147613 (2341d35) renamed this file with s/Linux/POSIX/, but
header guards and comments were not updated to match.
llvm-svn: 184741
|
|
|
|
|
|
| |
to avoid compiler warnings.
llvm-svn: 184738
|
|
|
|
| |
llvm-svn: 184342
|
|
|
|
|
|
| |
llvm_unreachable.
llvm-svn: 184334
|
|
|
|
|
|
| |
Also, ensure x86_64 watchpoint registers are initialized before they are accessed on the POSIX side.
llvm-svn: 184246
|
|
|
|
|
|
| |
Patch from Ed Maste.
llvm-svn: 184241
|
|
|
|
| |
llvm-svn: 183701
|
|
|
|
|
|
|
|
|
|
|
|
| |
register context.
- Ensures that this container is populated once for the lifetime of lldb
--- In particular, static methods can query this data even after the first RegisterContext has been destroyed.
- Uses a singleton function to avoid global constructors.
Thanks to Greg Clayton for the suggestion!
llvm-svn: 183313
|