Skip to content

Commit

Permalink
Revert "Implement xfer:libraries-svr4:read packet"
Browse files Browse the repository at this point in the history
D62502, together with D62503 have broken the builds which have XML
support enabled. Reverting D62503 (r364355) fixed that, but has broken
has left some of the tests introduced by D62502 broken more or less
nondeternimistically (it depended on whether the system happens to place
the library list near unreadable pages of memory). I attempted to make a
partial fix for this in r364748, but Jan Kratochvil pointed out that
this reintroduces the problem which reverting D62503 was trying to
solve.

So instead, I back out the whole thing so we can get back to a clean
slate that works for everyone. We can figure out a way forward from
there.

This reverts r364748, r363772 and r363707.

llvm-svn: 364751
  • Loading branch information
labath committed Jul 1, 2019
1 parent 33c8c0e commit 08c38f7
Show file tree
Hide file tree
Showing 16 changed files with 5 additions and 366 deletions.
14 changes: 0 additions & 14 deletions lldb/include/lldb/Host/common/NativeProcessProtocol.h
Expand Up @@ -32,14 +32,6 @@ namespace lldb_private {
class MemoryRegionInfo;
class ResumeActionList;

struct SVR4LibraryInfo {
std::string name;
lldb::addr_t link_map;
lldb::addr_t base_addr;
lldb::addr_t ld_addr;
lldb::addr_t next;
};

// NativeProcessProtocol
class NativeProcessProtocol {
public:
Expand Down Expand Up @@ -94,12 +86,6 @@ class NativeProcessProtocol {

virtual lldb::addr_t GetSharedLibraryInfoAddress() = 0;

virtual llvm::Expected<std::vector<SVR4LibraryInfo>>
GetLoadedSVR4Libraries() {
return llvm::createStringError(llvm::inconvertibleErrorCode(),
"Not implemented");
}

virtual bool IsAlive() const;

virtual size_t UpdateThreads() = 0;
Expand Down
Expand Up @@ -513,8 +513,7 @@ def prep_debug_monitor_and_inferior(
self,
inferior_args=None,
inferior_sleep_seconds=3,
inferior_exe_path=None,
inferior_env=None):
inferior_exe_path=None):
"""Prep the debug monitor, the inferior, and the expected packet stream.
Handle the separate cases of using the debug monitor in attach-to-inferior mode
Expand Down Expand Up @@ -577,9 +576,6 @@ def prep_debug_monitor_and_inferior(

# Build the expected protocol stream
self.add_no_ack_remote_stream()
if inferior_env:
for name, value in inferior_env.items():
self.add_set_environment_packets(name, value)
if self._inferior_startup == self._STARTUP_LAUNCH:
self.add_verified_launch_packets(launch_args)

Expand Down Expand Up @@ -660,12 +656,6 @@ def add_process_info_collection_packets(self):
{"direction": "send", "regex": r"^\$(.+)#[0-9a-fA-F]{2}$", "capture": {1: "process_info_raw"}}],
True)

def add_set_environment_packets(self, name, value):
self.test_sequence.add_log_lines(
["read packet: $QEnvironment:" + name + "=" + value + "#00",
"send packet: $OK#00",
], True)

_KNOWN_PROCESS_INFO_KEYS = [
"pid",
"parent-pid",
Expand Down Expand Up @@ -826,7 +816,6 @@ def parse_memory_region_packet(self, context):
"error"])
self.assertIsNotNone(val)

mem_region_dict["name"] = seven.unhexlify(mem_region_dict.get("name", ""))
# Return the dictionary of key-value pairs for the memory region.
return mem_region_dict

Expand Down Expand Up @@ -1011,22 +1000,6 @@ def run_process_then_stop(self, run_seconds=1):

return context

def continue_process_and_wait_for_stop(self):
self.test_sequence.add_log_lines(
[
"read packet: $vCont;c#a8",
{
"direction": "send",
"regex": r"^\$T([0-9a-fA-F]{2})(.*)#[0-9a-fA-F]{2}$",
"capture": {1: "stop_signo", 2: "stop_key_val_text"},
},
],
True,
)
context = self.expect_gdbremote_sequence()
self.assertIsNotNone(context)
return self.parse_interrupt_packets(context)

def select_modifiable_register(self, reg_infos):
"""Find a register that can be read/written freely."""
PREFERRED_REGISTER_NAMES = set(["rax", ])
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

2 changes: 1 addition & 1 deletion lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp
Expand Up @@ -2076,4 +2076,4 @@ Status NativeProcessLinux::StopProcessorTracingOnThread(lldb::user_id_t traceid,
m_processor_trace_monitor.erase(iter);

return error;
}
}
4 changes: 2 additions & 2 deletions lldb/source/Plugins/Process/NetBSD/NativeProcessNetBSD.h
Expand Up @@ -9,12 +9,12 @@
#ifndef liblldb_NativeProcessNetBSD_H_
#define liblldb_NativeProcessNetBSD_H_

#include "Plugins/Process/POSIX/NativeProcessELF.h"
#include "lldb/Target/MemoryRegionInfo.h"
#include "lldb/Utility/ArchSpec.h"
#include "lldb/Utility/FileSpec.h"

#include "NativeThreadNetBSD.h"
#include "lldb/Host/common/NativeProcessProtocol.h"

namespace lldb_private {
namespace process_netbsd {
Expand All @@ -25,7 +25,7 @@ namespace process_netbsd {
/// for debugging.
///
/// Changes in the inferior process state are broadcasted.
class NativeProcessNetBSD : public NativeProcessELF {
class NativeProcessNetBSD : public NativeProcessProtocol {
public:
class Factory : public NativeProcessProtocol::Factory {
public:
Expand Down

0 comments on commit 08c38f7

Please sign in to comment.