summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2011-03-19 01:12:21 +0000
committerGreg Clayton <gclayton@apple.com>2011-03-19 01:12:21 +0000
commitded470d31aa3a3b1c6b06fc8ae191d210ae089d5 (patch)
tree57af3b30c78261da0625d9ed4def8ccb212dc078 /lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
parent5366ff18659c58ac54ab55db5c6f3cf5d0e01034 (diff)
downloadbcm5719-llvm-ded470d31aa3a3b1c6b06fc8ae191d210ae089d5.tar.gz
bcm5719-llvm-ded470d31aa3a3b1c6b06fc8ae191d210ae089d5.zip
Added more platform support. There are now some new commands:
platform status -- gets status information for the selected platform platform create <platform-name> -- creates a new instance of a remote platform platform list -- list all available platforms platform select -- select a platform instance as the current platform (not working yet) When using "platform create" it will create a remote platform and make it the selected platform. For instances for iPhone OS debugging on Mac OS X one can do: (lldb) platform create remote-ios --sdk-version=4.0 Remote platform: iOS platform SDK version: 4.0 SDK path: "/Developer/Platforms/iPhoneOS.platform/DeviceSupport/4.0" Not connected to a remote device. (lldb) file ~/Documents/a.out Current executable set to '~/Documents/a.out' (armv6). (lldb) image list [ 0] /Volumes/work/gclayton/Documents/devb/attach/a.out [ 1] /Developer/Platforms/iPhoneOS.platform/DeviceSupport/4.0/Symbols/usr/lib/dyld [ 2] /Developer/Platforms/iPhoneOS.platform/DeviceSupport/4.0/Symbols/usr/lib/libSystem.B.dylib Note that this is all happening prior to running _or_ connecting to a remote platform. Once connected to a remote platform the OS version might change which means we will need to update our dependecies. Also once we run, we will need to match up the actualy binaries with the actualy UUID's to files in the SDK, or download and cache them locally. This is just the start of the remote platforms, but this modification is the first iteration in getting the platforms really doing something. llvm-svn: 127934
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp')
-rw-r--r--lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp49
1 files changed, 1 insertions, 48 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
index 2ae589d551c..d88c240f30c 100644
--- a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
@@ -63,7 +63,7 @@ get_random_port ()
const char *
ProcessGDBRemote::GetPluginNameStatic()
{
- return "process.gdb-remote";
+ return "gdb-remote";
}
const char *
@@ -1025,53 +1025,6 @@ ProcessGDBRemote::DoResume ()
return error;
}
-size_t
-ProcessGDBRemote::GetSoftwareBreakpointTrapOpcode (BreakpointSite* bp_site)
-{
- const uint8_t *trap_opcode = NULL;
- uint32_t trap_opcode_size = 0;
-
- static const uint8_t g_arm_breakpoint_opcode[] = { 0xFE, 0xDE, 0xFF, 0xE7 };
- //static const uint8_t g_thumb_breakpooint_opcode[] = { 0xFE, 0xDE };
- static const uint8_t g_ppc_breakpoint_opcode[] = { 0x7F, 0xC0, 0x00, 0x08 };
- static const uint8_t g_i386_breakpoint_opcode[] = { 0xCC };
-
- const llvm::Triple::ArchType machine = GetTarget().GetArchitecture().GetMachine();
- switch (machine)
- {
- case llvm::Triple::x86:
- case llvm::Triple::x86_64:
- trap_opcode = g_i386_breakpoint_opcode;
- trap_opcode_size = sizeof(g_i386_breakpoint_opcode);
- break;
-
- case llvm::Triple::arm:
- // TODO: fill this in for ARM. We need to dig up the symbol for
- // the address in the breakpoint locaiton and figure out if it is
- // an ARM or Thumb breakpoint.
- trap_opcode = g_arm_breakpoint_opcode;
- trap_opcode_size = sizeof(g_arm_breakpoint_opcode);
- break;
-
- case llvm::Triple::ppc:
- case llvm::Triple::ppc64:
- trap_opcode = g_ppc_breakpoint_opcode;
- trap_opcode_size = sizeof(g_ppc_breakpoint_opcode);
- break;
-
- default:
- assert(!"Unhandled architecture in ProcessMacOSX::GetSoftwareBreakpointTrapOpcode()");
- break;
- }
-
- if (trap_opcode && trap_opcode_size)
- {
- if (bp_site->SetTrapOpcode(trap_opcode, trap_opcode_size))
- return trap_opcode_size;
- }
- return 0;
-}
-
uint32_t
ProcessGDBRemote::UpdateThreadListIfNeeded ()
{
OpenPOWER on IntegriCloud