Add ability to search backwards through command
history for a particular substring, using ctrl-r key.

llvm-svn: 130871
diff --git a/lldb/tools/driver/IOChannel.cpp b/lldb/tools/driver/IOChannel.cpp
index d2cf4ea..f989c87 100644
--- a/lldb/tools/driver/IOChannel.cpp
+++ b/lldb/tools/driver/IOChannel.cpp
@@ -185,10 +185,11 @@
     // Source $PWD/.editrc then $HOME/.editrc
     ::el_source (m_edit_line, NULL);
 
-    el_set(m_edit_line, EL_ADDFN, "lldb_complete",
+    el_set (m_edit_line, EL_ADDFN, "lldb_complete",
             "LLDB completion function",
             IOChannel::ElCompletionFn);
-    el_set(m_edit_line, EL_BIND, m_completion_key, "lldb_complete", NULL);
+    el_set (m_edit_line, EL_BIND, m_completion_key, "lldb_complete", NULL);
+    el_set (m_edit_line, EL_BIND, "^r", "em-inc-search-prev", NULL);  // Cycle through backwards search, entering string
     el_set (m_edit_line, EL_CLIENTDATA, this);
 
     assert (m_history);