and a mach kernel in all the pages of the core file. If it finds
a user-process dyld binary, assume this is a user process that had
a copy of the mach kernel in memory when it crashed (e.g. lldb doing
kernel debugging) even though we found the kernel binary first.
Also, change the error messages about sections extending past the end
of the file to be warnings and make the messages sound less severe.
Most user process core files have one section that isn't included in
the file and there's no reason to worry people about that.
<rdar://problem/14473235>
llvm-svn: 190741
-S : Specifies a command file which will get sourced after the ~/.lldbinit but before file arguments are processed
-O : Specifies a single (one-line) command that will get ditto
and
-s : Specifies a command file which will get sourced after `pwd`/.lldbinit
-o : Specifies a command file which ditto
I also changed it so that by default these sourced commands will print their command result, but there's a
-q option to change that if you wish.
llvm-svn: 190734
1. existing breakpoints weren't being re-resolved after the sections of a library were loaded (ie. through dlopen).
2. loaded sections weren't being removed after a shared library had been unloaded.
llvm-svn: 190727
I now see no unexpected failures on FreeBSD on a local run of the test
suite.
llvm.org/pr17214
llvm.org/pr17225
llvm.org/pr17231
llvm.org/pr17232
llvm.org/pr17233
llvm-svn: 190709
llvm.org/pr15261 missing size for static arrays
llvm.org/pr15278 expressions generating signals
llvm.org/pr15824 thread states aren't properly maintained
llvm.org/pr16696 threaded inferior debugging not yet on FreeBSD
llvm.org/pr17214 inline stepping fails on FreeBSD
llvm.org/pr17225 Clang assertion failure
llvm.org/pr17226 frame info lost after failed expression evaluation
llvm.org/pr17228 test timeout
The first three are existing Linux issues that also affect FreeBSD.
llvm-svn: 190698
single-quote and double-quotemarks from around file paths specified to
settings like target.expr-prefix or target.process.python-os-plugin-path.
<rdar://problem/14970457>
llvm-svn: 190654
with prefer_file_cache == false. This is what we want to do when
the user is doing a disassemble command -- show the actual memory
contents in case the memory has been corrupted or something -- but
when we're profiling functions for stepping or unwinding
(ThreadPlanStepRange::GetInstructionsForAddress,
UnwindAssemblyInstEmulation::GetNonCallSiteUnwindP) we can read
__TEXT instructions directly out of the file, if it exists.
<rdar://problem/14397491>
llvm-svn: 190638
This allows the PC to be directly changed to a different line.
It's similar to the example python script in examples/python/jump.py, except implemented as a builtin.
Also this version will track the current function correctly even if the target line resolves to multiple addresses. (e.g. debugging a templated function)
llvm-svn: 190572
communication, connection, host, module, mmap, os. Add those. Also
sort the entries so they come in alphabetical order, to make it a
little easier to scan down the list for a specific channel.
llvm-svn: 190570
SVN r189964 provided a sample Python script to inspect unordered(multi){set|map} with synthetic children, contribued by Jared Grubb
This checkin converts that sample script to a C++ provider built into LLDB
A test case is also provided
llvm-svn: 190564
setting of the environment variable COMMAND_MODE. Changed the Platform::GetResumeCountForShell
to Platform::GetResumeCountForLaunchInfo, and check both the shell and in the case of
/bin/sh the environment as well.
llvm-svn: 190538
that /bin/sh re-exec's itself to /bin/bash, so it needs one more resume when you
are using it as the shell than /bin/bash did or you will stop at the start of your
program, rather than running it.
So I added a Platform API to get the number of resumes needed when launching with
a particular shell, and set the right values for Mac OS X.
<rdar://problem/14935282>
llvm-svn: 190381
"coalesce the line ranges for a file & line breakpoint to the first range in each block". We were still setting a silly number
of independent breakpoints sometimes, and until we get a compiler that emits trustworthy is_stmt flags in the line table, we
need to do something to reduce the noise.
<rdar://problem/14920404>
llvm-svn: 190380
(I didn't take a guess at the Linux names, as these tests are currently
skipped with the comment "No standard locations for libc++ on Linux.")
llvm-svn: 190307
From Jim's post on the lldb-dev mailing list:
This code is there as a backstop for when the unwinder drops a frame at
the beginning of new function/trampoline or whatever.
In the (older_ctx_is_equivalent == false) case we will see if we are at
a trampoline function that somebody knows how to get out of, and
otherwise we will stop.
llvm-svn: 190149
- TestRegisters passes locally (llvm.org/pr16301 no longer reproduces) -- verifying this on buildbots
- TestTargetWatchAddress also passes locally, and referenced llvm.org/pr14323 which is now closed
llvm-svn: 190104
- 'run' alias no longer includes the '--' for positional arguments... does not seem like a real bug.
- 2.234f is not a great number for the float tests (due to precision/printing issues) so use 0.5f instead
llvm-svn: 190100
have a certain name, not just the first. This
is useful if a class method and an instance
method have the same name.
<rdar://problem/14872081>
llvm-svn: 190008
by appending the thread ID to the test packet when
debugserver requires it.
This allows register writing (and, by extension,
expressions) to work on Mac OS X.
llvm-svn: 190007
Added "mach_o.py" which is a mach-o parser that can dump mach-o file contents and also extract sections. It uses the "file_extract" module and the "dict_utils" module.
llvm-svn: 189959
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
/bin/sh is more portable, and all systems with /bin/bash are expected to
have /bin/sh as well, even if only a link to bash.
Review: http://llvm-reviews.chandlerc.com/D1576
llvm-svn: 189879
A FreeBSD implementation of Host::FindProcesses was added in r189295.
Contrary to my earlier report of failing tests it seems all attach by
name tests now pass.
http://www.llvm.org/pr16699
llvm-svn: 189680
A FreeBSD implementation of Host::FindProcesses was added in r189295.
Note that some tests still fail as the implementation returns a truncated
name for processes with long names.
http://www.llvm.org/pr16699
llvm-svn: 189667
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
Testing shows it works for at least trivial cases, while the
USE_STANDARD_JIT case does not even work for those. Thus, don't define
USE_STANDARD_JIT on FreeBSD.
I've left the #if block choosing the appropriate #include in case it's
useful for testing.
llvm-svn: 189611
Some stubs only support g/G packets for registers.
This change makes sure that we check if remote stub supports 'p' packet before using it.
llvm-svn: 189576
- add default timeout of 10s (unil qPlatform_RunCommand supports timeout packets and CommandObjectPlatform is updated to read a timeout flag/setting)
- add a few tests for platform shell
llvm-svn: 189405
- move LaunchProcessPosixSpawn() and Host::LaunchProcess() from freebsd host plugin to common (linux/freebsd section)
- modify MonitorChildProcessThreadFunction to use pid_t from sys/types.h to avoid Linux/FreeBSD/Mac warnings when calling waitpid()
llvm-svn: 189404
- mode_t is defined in <sys/types.h>
- reorganized S_* user rights into win32.h
- Use Host::Kill instead of kill
- Currently #ifdef functions using pread/pwrite.
llvm-svn: 189364
Since I renamed most of the LLVM Mach-O enums in r189314, I had to go fix
LLDB to use the new names. While I was here, I decided that a COFF
plugin really shouldn't be using Mach-O enums.
llvm-svn: 189316
should not split up that pathname itself or require quoting to avoid the same.
This fixing a bug where target create -c "core file" or target create -s "symbol file"
will fail with an error message that the paths haven't been properly quoted. Working
around it required target create -c "core\ file" to survive both attemps at tokenizing.
<rdar://problem/14230629>
llvm-svn: 189313
out of a binary, if the Mach-O binary is MH_PRELOAD ("standalone"), don't
let the OS be set to "ios" or "macosx" - there will be no dynamic loader
used when debugging this process.
<rdar://problem/9956443>
llvm-svn: 189305
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
live beyont parsing. This is important because
all the ClangASTImporter::Minions for a parser's
ASTContext are cleared when ClangExpressionDeclMap
is deleted.
This resolves many hard-to-reproduce crashes,
especially ones involving breakpoint conditions.
<rdar://problem/14775391>
llvm-svn: 189080
This means that "register read stmm0 --format f" actually works now.
This is a little messy but LLDB assumes 'long double' is portable, when it is not.
llvm-svn: 188698
address.
When loading a dSYM, and the file addresses of the dSYM Sections are
different than the executable binary Sections' file addresses, the
debug info won't be remapped to the actual load addresses correctly.
This only happens with binaries on the in-memory shared cache binaries
where their File addresses have been set to their actual load address
(outside an offset value) whereas the original executable and dSYM
have 0-based File addresses.
I think this patch will not be activated for other cases -- this is
the only case we know of where the dSYM and the executable's File
addresses differ -- but if this causes other problems we can restrict
it more carefully.
<rdar://problem/12335086>
llvm-svn: 188532
Improve the documentation for the new target.memory-module-load-level setting, and also return an error when there is no nlist data when appropriate.
llvm-svn: 188317
a bunch of semicolons where the IndirectFieldDecls
were. These IndirectFieldDecls should have been
implicit.
<rdar://problem/14628784>
llvm-svn: 188247
LLDB needs in memory module load level settings to control how much information is read from memory when loading in memory modules. This change adds a new setting:
(lldb) settings set target.memory-module-load-level [minimal|partial|complete]
minimal will load only sections (no symbols, or function bounds via function starts or EH frame)
partial will load sections + bounds
complete will load sections + bounds + symbols
llvm-svn: 188246
- updated RNBDefs.h to allow version numbers to be passed in via preprocessor defines
- update libdebugserver.cpp to compile against latest DNBProcessKill signature
Review: http://llvm-reviews.chandlerc.com/D1331
llvm-svn: 188078
- Immediates can be shown as hex (either Intel or MASM style)
- See TestSettings.py for usage examples
- Verified to cause no regressions on Linux x86_64 (Ubuntu 12.10)
Patch by Richard Mitton!
llvm-svn: 187921
mapping of source to assembly so that the same test script can be used
with more compilers.
Patch by Andy Kaylor!
Also marks the LLDB test of template parameters as xfail on icc.
llvm-svn: 187600
This adds a new parameter, --skip-category, that can be used to list
categories that should be skipped. For example, to run all tests except for
Objective-C ones, one can now write:
./dotest.py --skip-category objc [...]
llvm-svn: 187590
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
- this fix ensures the ThreadList mutex is always locked before the StackFrameList mutex
Situation where deadlock could occur (without this fix):
Thread 1 is in Process::WillResume and locks the ThreadList mutex (on entry), and subsequently calls StackFrameList::Clear() which locks the StackFrameList mutex.
Meanwhile, thread 2 is in Process::RunThreadPlan and calls Thread::SetSelectedFrame() (which locks the StackFrameList mutex) before calling GetSelectedThread (which attempts to lock the ThreadList mutex)
In my testing on both Linux and Mac OS X, I was unable to reproduce any hangs with this patch applied.
llvm-svn: 187522
provide more detail on compiler compatibility, and to illustrate that this is
an issue with expression evaluation.
- Note that clang doesn't emit DW_TAG_const_type, which might be okay if there's
no such thing as a non-const rvalue reference. How about foo(make_int())?
llvm-svn: 187499
the extra check introduces 22 new test failures with the LLDB clang buildbot.
Note that the unhandled DWARF_OP codes in DWARFExpression::Evaluate don't cause test failures if the check is ignored.
llvm-svn: 187480
list have a shared pointer back to their DisassemblerLLVMC. This checkin force clears the InstructionList
in all the places we use the DisassemblerSP to stop the leaking for now. I'll go back and fix this
for real when I have time to do so.
<rdar://problem/14581918>
llvm-svn: 187473
- disable some TestConcurrentEvents cases (which are affected by llvm.org/pr16714 -- watchpoints in multithreaded programs)
- relax number-of-bp-locations check in TestUniqueTypes/TestUnsignedTypes
- skip TestDataFormatterStdVector cases with GCC 4.8 (known failure due to llvm.org/pr15301)
- workaround for race condition in TestHelloWorld.py
- update TestSettings.py to work on distros (like Fedora) that have /bin/cat hardlinked to /usr/bin/cat
After these changes, the test suite should run cleanly against GCC 4.8 (with DWARF v4)!
llvm-svn: 187451
- pass through to base-class implementation when raised exception is not from an LLDBTest
- should make the test suite errors a little easier to root-cause
llvm-svn: 187450
to handle the case of an integer constant (DWARF 3 and later).
- Fixes tests that assert in RecordLayoutBuilder::updateExternalFieldOffset
because LLDB was providing an external AST source with missing member offsets.
llvm-svn: 187423
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