[Lldb-commits] [lldb] r225436 - [LLDB][MIPS] Adding SoftwareBreakpointTrapOpcode and RelocationJumpSlotType for MIPS

Vince Harron vharron at google.com
Thu Jan 8 09:18:04 PST 2015


+Petar

Hi Mohit,

I wanted to make sure you are aware of some work we're doing on Linux.
We're adding support for remote Linux (and Android) targets via
PlatformRemoteGDBServer and lldb-gdbserver.  We would also like to replace
local Linux debugging support with a connection to a local lldb-gdbserver
instance.  This way there will only be one code path for Linux local or
remote debugging.  We intend to make the remote support for Linux/Android
very good so we expect this will be a significant step forward for local
Linux debugging.

Some of our work isn't ready to upstream yet so we're working out of a
separate branch.

Here are instructions for building and running our tree.  The most
important bit is "export PLATFORM_LINUX_FORCE_LLGS_LOCAL=1"  which enables
the code paths for local debugging via a local lldb-gdbserver instance.

#!/bin/bash

ROOT_DIR=$HOME/ll/googd

mkdir -p $ROOT_DIR

cd $ROOT_DIR

git clone http://github.com/tfiala/lldb.git

(cd lldb && git checkout dev-thread-state-coordinator)

git clone http://llvm.org/git/llvm.git

(cd llvm && git checkout 7d7b761cd0f4f4d17a79324668b1ec758b7791ad)

git clone http://llvm.org/git/clang.git

(cd clang && git checkout 7894c14c006941684f6c8964ed71c9b14c3f0edb)

git clone http://github.com/tfiala/lldb-tools

cd llvm/tools

ln -s ../../clang clang

ln -s ../../lldb lldb

cd $ROOT_DIR

lldb-tools/scripts/lldb_configure.py -c -n -l -g -s -a --ccache -b build

cd build

# use lldb-gdbserver when debugging local processes

export PLATFORM_LINUX_FORCE_LLGS_LOCAL=1

ninja && ninja check-lldb

Vince


On Jan 8, 2015 1:49 AM, "Mohit K. Bhakkad" <mohit.bhakkad at imgtec.com> wrote:

> Author: mohit.bhakkad
> Date: Thu Jan  8 03:46:29 2015
> New Revision: 225436
>
> URL: http://llvm.org/viewvc/llvm-project?rev=225436&view=rev
> Log:
> [LLDB][MIPS] Adding SoftwareBreakpointTrapOpcode and
> RelocationJumpSlotType for MIPS
>
> Patch by Bhushan Attarde
>
> Reviewers: clayborg
>
> Reviewed By: clayborg
>
> Subscribers: petarj, dsanders, mohit.bhakkad, lldb-commits
>
> Differential Revision: http://reviews.llvm.org/D6861
>
> Modified:
>     lldb/trunk/source/Plugins/ObjectFile/ELF/ELFHeader.cpp
>     lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.cpp
>
> Modified: lldb/trunk/source/Plugins/ObjectFile/ELF/ELFHeader.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ObjectFile/ELF/ELFHeader.cpp?rev=225436&r1=225435&r2=225436&view=diff
>
> ==============================================================================
> --- lldb/trunk/source/Plugins/ObjectFile/ELF/ELFHeader.cpp (original)
> +++ lldb/trunk/source/Plugins/ObjectFile/ELF/ELFHeader.cpp Thu Jan  8
> 03:46:29 2015
> @@ -195,6 +195,9 @@ ELFHeader::GetRelocationJumpSlotType() c
>      case EM_AARCH64:
>          slot = R_AARCH64_JUMP_SLOT;
>          break;
> +    case EM_MIPS:
> +        slot = R_MIPS_JUMP_SLOT;
> +        break;
>      }
>
>      return slot;
>
> Modified: lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.cpp?rev=225436&r1=225435&r2=225436&view=diff
>
> ==============================================================================
> --- lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.cpp (original)
> +++ lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.cpp Thu Jan  8
> 03:46:29 2015
> @@ -583,6 +583,13 @@ PlatformLinux::GetSoftwareBreakpointTrap
>              }
>          }
>          break;
> +    case llvm::Triple::mips64:
> +        {
> +            static const uint8_t g_hex_opcode[] = { 0x00, 0x00, 0x00,
> 0x0d };
> +            trap_opcode = g_hex_opcode;
> +            trap_opcode_size = sizeof(g_hex_opcode);
> +        }
> +        break;
>      }
>
>      if (bp_site->SetTrapOpcode(trap_opcode, trap_opcode_size))
>
>
> _______________________________________________
> lldb-commits mailing list
> lldb-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20150108/0ce131ee/attachment.html>


More information about the lldb-commits mailing list