Skip to content

Commit 08c38f7

Browse files
committed
Revert "Implement xfer:libraries-svr4:read packet"
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
1 parent 33c8c0e commit 08c38f7

16 files changed

+5
-366
lines changed

lldb/include/lldb/Host/common/NativeProcessProtocol.h

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,6 @@ namespace lldb_private {
3232
class MemoryRegionInfo;
3333
class ResumeActionList;
3434

35-
struct SVR4LibraryInfo {
36-
std::string name;
37-
lldb::addr_t link_map;
38-
lldb::addr_t base_addr;
39-
lldb::addr_t ld_addr;
40-
lldb::addr_t next;
41-
};
42-
4335
// NativeProcessProtocol
4436
class NativeProcessProtocol {
4537
public:
@@ -94,12 +86,6 @@ class NativeProcessProtocol {
9486

9587
virtual lldb::addr_t GetSharedLibraryInfoAddress() = 0;
9688

97-
virtual llvm::Expected<std::vector<SVR4LibraryInfo>>
98-
GetLoadedSVR4Libraries() {
99-
return llvm::createStringError(llvm::inconvertibleErrorCode(),
100-
"Not implemented");
101-
}
102-
10389
virtual bool IsAlive() const;
10490

10591
virtual size_t UpdateThreads() = 0;

lldb/packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py

Lines changed: 1 addition & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -513,8 +513,7 @@ def prep_debug_monitor_and_inferior(
513513
self,
514514
inferior_args=None,
515515
inferior_sleep_seconds=3,
516-
inferior_exe_path=None,
517-
inferior_env=None):
516+
inferior_exe_path=None):
518517
"""Prep the debug monitor, the inferior, and the expected packet stream.
519518
520519
Handle the separate cases of using the debug monitor in attach-to-inferior mode
@@ -577,9 +576,6 @@ def prep_debug_monitor_and_inferior(
577576

578577
# Build the expected protocol stream
579578
self.add_no_ack_remote_stream()
580-
if inferior_env:
581-
for name, value in inferior_env.items():
582-
self.add_set_environment_packets(name, value)
583579
if self._inferior_startup == self._STARTUP_LAUNCH:
584580
self.add_verified_launch_packets(launch_args)
585581

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

663-
def add_set_environment_packets(self, name, value):
664-
self.test_sequence.add_log_lines(
665-
["read packet: $QEnvironment:" + name + "=" + value + "#00",
666-
"send packet: $OK#00",
667-
], True)
668-
669659
_KNOWN_PROCESS_INFO_KEYS = [
670660
"pid",
671661
"parent-pid",
@@ -826,7 +816,6 @@ def parse_memory_region_packet(self, context):
826816
"error"])
827817
self.assertIsNotNone(val)
828818

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

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

10121001
return context
10131002

1014-
def continue_process_and_wait_for_stop(self):
1015-
self.test_sequence.add_log_lines(
1016-
[
1017-
"read packet: $vCont;c#a8",
1018-
{
1019-
"direction": "send",
1020-
"regex": r"^\$T([0-9a-fA-F]{2})(.*)#[0-9a-fA-F]{2}$",
1021-
"capture": {1: "stop_signo", 2: "stop_key_val_text"},
1022-
},
1023-
],
1024-
True,
1025-
)
1026-
context = self.expect_gdbremote_sequence()
1027-
self.assertIsNotNone(context)
1028-
return self.parse_interrupt_packets(context)
1029-
10301003
def select_modifiable_register(self, reg_infos):
10311004
"""Find a register that can be read/written freely."""
10321005
PREFERRED_REGISTER_NAMES = set(["rax", ])

lldb/packages/Python/lldbsuite/test/tools/lldb-server/libraries-svr4/Makefile

Lines changed: 0 additions & 17 deletions
This file was deleted.

lldb/packages/Python/lldbsuite/test/tools/lldb-server/libraries-svr4/TestGdbRemoteLibrariesSvr4Support.py

Lines changed: 0 additions & 130 deletions
This file was deleted.

lldb/packages/Python/lldbsuite/test/tools/lldb-server/libraries-svr4/main.cpp

Lines changed: 0 additions & 15 deletions
This file was deleted.

lldb/packages/Python/lldbsuite/test/tools/lldb-server/libraries-svr4/svr4lib_a.cpp

Lines changed: 0 additions & 9 deletions
This file was deleted.

lldb/packages/Python/lldbsuite/test/tools/lldb-server/libraries-svr4/svr4lib_a.mk

Lines changed: 0 additions & 9 deletions
This file was deleted.

lldb/packages/Python/lldbsuite/test/tools/lldb-server/libraries-svr4/svr4lib_b_quote.cpp

Lines changed: 0 additions & 9 deletions
This file was deleted.

lldb/packages/Python/lldbsuite/test/tools/lldb-server/libraries-svr4/svr4lib_b_quote.mk

Lines changed: 0 additions & 9 deletions
This file was deleted.

lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2076,4 +2076,4 @@ Status NativeProcessLinux::StopProcessorTracingOnThread(lldb::user_id_t traceid,
20762076
m_processor_trace_monitor.erase(iter);
20772077

20782078
return error;
2079-
}
2079+
}

0 commit comments

Comments
 (0)