Commit Graph

1705 Commits

Author SHA1 Message Date
Johnny Chen 9864b5ec5f Add emulate_add_rd_sp_imm (SP plus immediate) to the g_arm_opcodes and g_thumb_opcodes tables.
Change the data type of Context.arg2 to int64_t due to possible negative values.

llvm-svn: 124343
2011-01-27 01:26:19 +00:00
Sean Callanan 3989fb9211 Added error reporting to IRForTarget so that the
user doesn't have to enable logging to see where
something went wrong.

llvm-svn: 124342
2011-01-27 01:07:04 +00:00
Greg Clayton 645bf5420d Added support for some new environment variables within LLDB to enable some
extra launch options:

LLDB_LAUNCH_FLAG_DISABLE_ASLR disables ASLR for all launched processes

LLDB_LAUNCH_FLAG_DISABLE_STDIO will disable STDIO (reroute to "/dev/null")
for all launched processes

LLDB_LAUNCH_FLAG_LAUNCH_IN_TTY will force all launched processes to be
launched in new terminal windows.

Also, don't init python if we never create a script interpreter.

llvm-svn: 124341
2011-01-27 01:01:10 +00:00
Greg Clayton 385d603825 Fixed a crasher when there is no log in Process::SetExitStatus (...).
llvm-svn: 124338
2011-01-26 23:47:29 +00:00
Johnny Chen 9c40302b3b Add emulate_vpush (stores multiple consecutive extension registers to the stack) entries
to both the g_arm_opcodes and g_thumb_opcodes tables.

llvm-svn: 124333
2011-01-26 23:14:33 +00:00
Jim Ingham 2c36439cb0 Make sure that if a CallFunction thread plan crashes while running in the "run to address" mode, and it
is an auto-discard thread plan, the plan stack unwinds properly.

llvm-svn: 124306
2011-01-26 19:13:09 +00:00
Jim Ingham 4bf570d618 Typo in looking up the stored address breakpoints, could cause us to look too far for breakpoints.
llvm-svn: 124305
2011-01-26 19:10:34 +00:00
Jim Ingham 9b23df5903 Initialize an uninitialized variable. I don't think this is ever used, but just to be sure...
llvm-svn: 124304
2011-01-26 19:09:39 +00:00
Johnny Chen 4f7370f7ae Add "-A arch_spec" and "-C compiler_spec" options to the test driver. Example:
$ ./dotest.py -A i386 -C clang -v -w -t -p TestObjCMethods.py
$ ./dotest.py -A x86_64 -C gcc -v -w types

llvm-svn: 124303
2011-01-26 19:07:42 +00:00
Johnny Chen f6aaf31103 Remove duplicated comments.
llvm-svn: 124262
2011-01-26 01:24:45 +00:00
Johnny Chen 832d3137df Move #define's out of ARMUtils.h and into a newly created file ARMDefines.h.
llvm-svn: 124261
2011-01-26 01:18:52 +00:00
Johnny Chen 74889b29a8 Move the generic instruction bits manipulation routines into a newly created file
named InstructionUtils.h and modify some existing code to use them.

llvm-svn: 124259
2011-01-26 01:00:55 +00:00
Johnny Chen 3fde51b820 Add Encoding T1 entry of emulate_sub_sp_imm to the g_thumb_opcodes table.
Update emulate_sub_sp_imm to handle Encoding T1.

llvm-svn: 124253
2011-01-26 00:08:59 +00:00
Greg Clayton 1a65ae11bd Enabled extra warnings and fixed a bunch of small issues.
llvm-svn: 124250
2011-01-25 23:55:37 +00:00
Johnny Chen d5cd645c74 Add Encoding T2 & T3 entries of emulate_sub_sp_imm to the g_thumb_opcodes table.
Update emulate_sub_sp_imm to handle Encoding T2 & T3.

llvm-svn: 124248
2011-01-25 23:49:39 +00:00
Stephen Wilson f3e78a3040 Simple makefile fixups.
With the current target revision of Clang libclangChecker no longer exists and
is not needed.  Update the include path so we can get at ARM_DWARF_Registers.h
and friends.

llvm-svn: 124240
2011-01-25 23:03:42 +00:00
Johnny Chen ccc9963e34 Add an entry to the g_arm_opcodes table named emulate_sub_sp_imm which corresponds
to an operation to adjust the stack pointer (allocate space for local storage).

llvm-svn: 124237
2011-01-25 22:45:28 +00:00
Greg Clayton 1ea20bf6ed http://llvm.org/bugs/show_bug.cgi?id=8260
Removed incorrect enumeration from switch.

llvm-svn: 124232
2011-01-25 21:39:46 +00:00
Greg Clayton 58f417180b http://llvm.org/bugs/show_bug.cgi?id=9053
Fixed bug reported by Ken Ryall.

llvm-svn: 124231
2011-01-25 21:32:01 +00:00
Johnny Chen 54355f7440 Variable renaming for better readability.
llvm-svn: 124208
2011-01-25 19:07:04 +00:00
Johnny Chen 93b0c8b2aa Remove the expectedFailure decorator for the fixed bug:
rdar://problem/8435794
    settings set target.process.output-path does not seem to work

Also change the test case from test_set_output_path to test_set_error_output_path
as it now exercises both setting target.process.error-path and target.process.output-path.

llvm-svn: 124198
2011-01-25 17:39:43 +00:00
Johnny Chen 109941b078 Fix wrong order of "import lldbutil" statement and its usage in the failure case.
llvm-svn: 124196
2011-01-25 17:17:45 +00:00
Johnny Chen a343545229 Trivial comment fix.
llvm-svn: 124195
2011-01-25 16:56:01 +00:00
Greg Clayton ad25145255 Bumped Xcode project versions to lldb-44 and debugserver-129.
llvm-svn: 124181
2011-01-25 07:01:26 +00:00
Greg Clayton cdc7322bb1 Reverting recent thread resume changes as it was causing testing issues.
We will need to try again soon, but this change was causing instability.

llvm-svn: 124180
2011-01-25 06:55:13 +00:00
Greg Clayton 4cd178020c Fixed an issue that was stopping LLDB from finding complete definitions for
types. What was happening was the DWARF parser was almost ignoring definitions
(DIEs with the DW_AT_declaration set to 1). It wasn't ignoring declarations
that had _some_ children. When this happened, we would treat the declaration
as a complete type. Often we would have a declaration of a type with just
some enum definitions inside and nothing else. Now we correctly ignore these
definitions, and also I added some changes to allow us to figure out what
decl context these special declarations actually point to.

llvm-svn: 124179
2011-01-25 06:17:32 +00:00
Jim Ingham b1e1112124 When we are stepping a thread, force it to resume ALL the way to 0. And of course, when we stop
if we undid some user provided suspends, we need to re-do the suspends.

llvm-svn: 124178
2011-01-25 05:26:48 +00:00
Greg Clayton 99d686d728 One more fix to ProcessGDBRemote::DoDestroy(). This one will make sure we
parse the exit status in case we send this packet while stopped.

llvm-svn: 124177
2011-01-25 04:57:42 +00:00
Jason Molenda f28ce687ac Revert one unintended change checked in to DWARFCallFrameInfo.cpp
with my last commit.

The change should be correct but it's not fixing anything important
and right now unneeded changes are not a good idea.

llvm-svn: 124173
2011-01-25 03:12:34 +00:00
Jason Molenda 8fe0c8c6c5 Use new Section::IsEncrypted() method to check if the eh_frame
section is encrypted before trying to read it.  Fixes assert / crash
when trying to unwind an executable w/ encrypted eh_frame sect.

llvm-svn: 124172
2011-01-25 03:05:13 +00:00
Greg Clayton 414f5d3fe8 Fixed ProcessGDBRemote to kill the process correctly when it is either running
or stopped. 

Added support for sections to be able to state if they are encrypted or not.

llvm-svn: 124171
2011-01-25 02:58:48 +00:00
Jim Ingham 0c2706823e Check for a NULL saved stop info shared pointer.
llvm-svn: 124170
2011-01-25 02:47:23 +00:00
Johnny Chen 86b84c25d1 Add an emulate-callback function emulate_str_rt_sp() to the g_arm_opcodes table.
llvm-svn: 124165
2011-01-25 01:13:00 +00:00
Johnny Chen 175de8a1c6 Use two opcode tables g_arm_opcodes and g_thumb_opcodes, instead of lumping arm and thumb opcodes together.
llvm-svn: 124156
2011-01-24 23:40:59 +00:00
Greg Clayton aa1c587a69 Fixed a crasher due to not checking if a shared pointer (m_last_created_breakpoint)
contained a valid object pointer.

llvm-svn: 124155
2011-01-24 23:35:47 +00:00
Johnny Chen b66cdadd4a Fix typo of encoding T2 (push) in the original ARM Architecture Reference Manual,
which has been corrected in the subsequent errata.

llvm-svn: 124152
2011-01-24 22:50:16 +00:00
Johnny Chen 9397fba093 Add comment about using Encoding A1 push instruction to emulate the "stmfd sp!, reg" case,
i.e., pushing one register onto the full descending stacks.

llvm-svn: 124149
2011-01-24 22:25:48 +00:00
Johnny Chen 65b58eafbe Make the assembler mnemonic lowercase.
llvm-svn: 124147
2011-01-24 22:02:46 +00:00
Johnny Chen e74e60cd50 Add Encoding T1 of the PUSH instructions to the g_arm_opcodes table.
llvm-svn: 124144
2011-01-24 20:38:45 +00:00
Johnny Chen c053cdd03d Fix typo in the instruction descriptions for Encoding T2 and T3 of PUSH.
llvm-svn: 124143
2011-01-24 20:21:01 +00:00
Johnny Chen 44a408424f Move some #define's to the ARMUtils.h header file.
llvm-svn: 124141
2011-01-24 19:50:30 +00:00
Johnny Chen d8c2a48298 Add Encoding T2 & T3 of the PUSH instructions to the g_arm_opcodes table.
Plus add an extra field ARMInstrSize to the table entry type 'ARMOpcode'.

llvm-svn: 124140
2011-01-24 19:46:32 +00:00
Johnny Chen 91027008f1 Add an ARMUtils.h file to house utility functions for the ARM/Thumb Instruction Set Architecture.
llvm-svn: 124131
2011-01-24 18:24:53 +00:00
Sean Callanan 9d2127ad3c Fixed a bug in the expression code which caused
it to interpret a "this" variable that was merely
a pointer -- that is, not a class pointer -- as
meaning that the current context was inside a C++
method.  This bug would prevent expressions from
evaluating correctly in regular C code if there
was a pointer variable named "this" in scope.

llvm-svn: 124117
2011-01-24 08:11:45 +00:00
Greg Clayton d58ac45c92 Bumped Xcode project versions: lldb-43 and debugserver-128.
llvm-svn: 124116
2011-01-24 07:16:06 +00:00
Greg Clayton 692538db26 One more thing... Resume any threads that we discover were created while we stop as
they may be in sensitive areas and we set breakpoints on the thread creation routines
if we are running expressions, so the threads should quickly get to a safe spot.

llvm-svn: 124115
2011-01-24 07:10:48 +00:00
Jim Ingham b3413c8a82 Remember to turn off the debugserver.txt hard-coded emission.
llvm-svn: 124114
2011-01-24 06:35:54 +00:00
Jim Ingham 444586b5d2 More useful STEP logging.
Be sure to clear out the base plan's m_report_run and m_report_stop each time we resume so we don't use stale values.

llvm-svn: 124113
2011-01-24 06:34:17 +00:00
Greg Clayton 2ad6670ef1 Make the logging come out all lined up and such.
llvm-svn: 124112
2011-01-24 06:30:45 +00:00
Greg Clayton 050f33cee8 Discover new threads right before we continue a process since libdispatch has
been known to make threads for us while our process/task is suspended.

llvm-svn: 124111
2011-01-24 06:22:23 +00:00