summaryrefslogtreecommitdiffstats
path: root/lldb/tools/debugserver/source/debugserver.cpp
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2011-05-23 18:04:09 +0000
committerGreg Clayton <gclayton@apple.com>2011-05-23 18:04:09 +0000
commit8d400e1750b7383422147c32e25435ed54f15290 (patch)
tree5b33a29c36f44680037cae90c6a9b4ab6f439ee0 /lldb/tools/debugserver/source/debugserver.cpp
parentfeb961b86a260009a241a2c4ff742fe8c8384bcb (diff)
downloadbcm5719-llvm-8d400e1750b7383422147c32e25435ed54f15290.tar.gz
bcm5719-llvm-8d400e1750b7383422147c32e25435ed54f15290.zip
Fixed an issue in the EmulateInstructionARM there the IT opcode was trying to
parse NOP instructions. I added the new table entries for the NOP for the plain NOP, Yield, WFE, WFI, and SEV variants. Modified the opcode emulation function EmulateInstructionARM::EmulateMOVRdSP(...) to notify us when it is creating a frame. Also added an abtract way to detect the frame pointer register for both the standard ARM ABI and for Darwin. Fixed GDBRemoteRegisterContext::WriteAllRegisterValues(...) to correctly be able to individually write register values back if case the 'G' packet is not implemented or returns an error. Modified the StopInfoMachException to "trace" stop reasons. On ARM we currently use the BVR/BCR register pairs to say "stop when the PC is not equal to the current PC value", and this results in a EXC_BREAKPOINT mach exception that has 0x102 in the code. Modified debugserver to create the short option string from long option definitions to make sure it doesn't get out of date. The short option string was missing many of the newer short option values due to a modification of the long options defs, and not modifying the short option string. llvm-svn: 131911
Diffstat (limited to 'lldb/tools/debugserver/source/debugserver.cpp')
-rw-r--r--lldb/tools/debugserver/source/debugserver.cpp31
1 files changed, 30 insertions, 1 deletions
diff --git a/lldb/tools/debugserver/source/debugserver.cpp b/lldb/tools/debugserver/source/debugserver.cpp
index 12a873ef8e3..24e33e72a0e 100644
--- a/lldb/tools/debugserver/source/debugserver.cpp
+++ b/lldb/tools/debugserver/source/debugserver.cpp
@@ -831,7 +831,36 @@ main (int argc, char *argv[])
RNBRunLoopMode start_mode = eRNBRunLoopModeExit;
- while ((ch = getopt_long(argc, argv, "a:A:d:gi:vktl:f:w:x:rs:nu:", g_long_options, &long_option_index)) != -1)
+ char short_options[512];
+ uint32_t short_options_idx = 0;
+
+ // Handle the two case that don't have short options in g_long_options
+ short_options[short_options_idx++] = 'k';
+ short_options[short_options_idx++] = 't';
+
+ for (i=0; g_long_options[i].name != NULL; ++i)
+ {
+ if (isalpha(g_long_options[i].val))
+ {
+ short_options[short_options_idx++] = g_long_options[i].val;
+ switch (g_long_options[i].has_arg)
+ {
+ default:
+ case no_argument:
+ break;
+
+ case optional_argument:
+ short_options[short_options_idx++] = ':';
+ // Fall through to required_argument case below...
+ case required_argument:
+ short_options[short_options_idx++] = ':';
+ break;
+ }
+ }
+ }
+ // NULL terminate the short option string.
+ short_options[short_options_idx++] = '\0';
+ while ((ch = getopt_long(argc, argv, short_options, g_long_options, &long_option_index)) != -1)
{
DNBLogDebug("option: ch == %c (0x%2.2x) --%s%c%s\n",
ch, (uint8_t)ch,
OpenPOWER on IntegriCloud