Skip to content

Commit b826109

Browse files
authored
Merge pull request #9871 from jasonmolenda/cp/r139804630-revert-wip-corefile-segment-combination-pass
2 parents 3f04759 + bb6efa7 commit b826109

File tree

22 files changed

+1245
-1450
lines changed

22 files changed

+1245
-1450
lines changed

lldb/bindings/python/static-binding/LLDBWrapPython.cpp

Lines changed: 1202 additions & 1133 deletions
Large diffs are not rendered by default.

lldb/bindings/python/static-binding/lldb.py

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# This file was automatically generated by SWIG (https://www.swig.org).
2-
# Version 4.2.1
2+
# Version 4.3.0
33
#
44
# Do not make changes to this file unless you know what you are doing - modify
55
# the SWIG interface file instead.
@@ -99,7 +99,7 @@ class _SwigNonDynamicMeta(type):
9999
#3.0.18.
100100
def _to_int(hex):
101101
return hex // 0x10 % 0x10 * 10 + hex % 0x10
102-
swig_version = (_to_int(0x040201 // 0x10000), _to_int(0x040201 // 0x100), _to_int(0x040201))
102+
swig_version = (_to_int(0x040300 // 0x10000), _to_int(0x040300 // 0x100), _to_int(0x040300))
103103
del _to_int
104104

105105

@@ -1679,8 +1679,6 @@ def lldb_iter(obj, getsize, getelem):
16791679

16801680
eSaveCoreStackOnly = _lldb.eSaveCoreStackOnly
16811681

1682-
eSaveCoreCustomOnly = _lldb.eSaveCoreCustomOnly
1683-
16841682
eTraceEventDisabledSW = _lldb.eTraceEventDisabledSW
16851683

16861684
eTraceEventDisabledHW = _lldb.eTraceEventDisabledHW
@@ -4196,10 +4194,6 @@ def RemoveThread(self, thread):
41964194
r"""RemoveThread(SBSaveCoreOptions self, SBThread thread) -> bool"""
41974195
return _lldb.SBSaveCoreOptions_RemoveThread(self, thread)
41984196

4199-
def AddMemoryRegionToSave(self, region):
4200-
r"""AddMemoryRegionToSave(SBSaveCoreOptions self, SBMemoryRegionInfo region) -> SBError"""
4201-
return _lldb.SBSaveCoreOptions_AddMemoryRegionToSave(self, region)
4202-
42034197
def Clear(self):
42044198
r"""Clear(SBSaveCoreOptions self)"""
42054199
return _lldb.SBSaveCoreOptions_Clear(self)
@@ -5094,6 +5088,14 @@ def SetTerminalWidth(self, term_width):
50945088
r"""SetTerminalWidth(SBDebugger self, uint32_t term_width)"""
50955089
return _lldb.SBDebugger_SetTerminalWidth(self, term_width)
50965090

5091+
def GetTerminalHeight(self):
5092+
r"""GetTerminalHeight(SBDebugger self) -> uint32_t"""
5093+
return _lldb.SBDebugger_GetTerminalHeight(self)
5094+
5095+
def SetTerminalHeight(self, term_height):
5096+
r"""SetTerminalHeight(SBDebugger self, uint32_t term_height)"""
5097+
return _lldb.SBDebugger_SetTerminalHeight(self, term_height)
5098+
50975099
def GetID(self):
50985100
r"""GetID(SBDebugger self) -> lldb::user_id_t"""
50995101
return _lldb.SBDebugger_GetID(self)

lldb/include/lldb/API/SBMemoryRegionInfo.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ class LLDB_API SBMemoryRegionInfo {
120120
private:
121121
friend class SBProcess;
122122
friend class SBMemoryRegionInfoList;
123-
friend class SBSaveCoreOptions;
123+
124124
friend class lldb_private::ScriptInterpreter;
125125

126126
lldb_private::MemoryRegionInfo &ref();

lldb/include/lldb/API/SBSaveCoreOptions.h

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -96,21 +96,6 @@ class LLDB_API SBSaveCoreOptions {
9696
/// True if the thread was removed, false if it was not in the list.
9797
bool RemoveThread(lldb::SBThread thread);
9898

99-
/// Add a memory region to save in the core file.
100-
///
101-
/// \param region
102-
/// The memory region to save.
103-
///
104-
/// \returns
105-
/// An empty SBError upon success, or an error if the region is invalid.
106-
///
107-
/// \note
108-
/// Ranges that overlapped will be unioned into a single region, this also
109-
/// supercedes stack minification. Specifying full regions and a non-custom
110-
/// core style will include the specified regions and union them with all
111-
/// style specific regions.
112-
SBError AddMemoryRegionToSave(const SBMemoryRegionInfo &region);
113-
11499
/// Reset all options.
115100
void Clear();
116101

lldb/include/lldb/Symbol/SaveCoreOptions.h

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,13 @@
1010
#define LLDB_SOURCE_PLUGINS_OBJECTFILE_SaveCoreOPTIONS_H
1111

1212
#include "lldb/Utility/FileSpec.h"
13-
#include "lldb/Utility/RangeMap.h"
13+
#include "lldb/lldb-forward.h"
14+
#include "lldb/lldb-types.h"
1415

1516
#include <optional>
16-
#include <set>
1717
#include <string>
1818
#include <unordered_set>
1919

20-
using MemoryRanges = lldb_private::RangeVector<lldb::addr_t, lldb::addr_t>;
21-
2220
namespace lldb_private {
2321

2422
class SaveCoreOptions {
@@ -40,12 +38,8 @@ class SaveCoreOptions {
4038
Status AddThread(lldb::ThreadSP thread_sp);
4139
bool RemoveThread(lldb::ThreadSP thread_sp);
4240
bool ShouldThreadBeSaved(lldb::tid_t tid) const;
43-
bool HasSpecifiedThreads() const;
4441

4542
Status EnsureValidConfiguration(lldb::ProcessSP process_sp) const;
46-
const MemoryRanges &GetCoreFileMemoryRanges() const;
47-
48-
void AddMemoryRegionToSave(const lldb_private::MemoryRegionInfo &region);
4943

5044
void Clear();
5145

@@ -57,7 +51,6 @@ class SaveCoreOptions {
5751
std::optional<lldb::SaveCoreStyle> m_style;
5852
lldb::ProcessSP m_process_sp;
5953
std::unordered_set<lldb::tid_t> m_threads_to_save;
60-
MemoryRanges m_regions_to_save;
6154
};
6255
} // namespace lldb_private
6356

lldb/include/lldb/Target/Process.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@
3535
#include "lldb/Host/ProcessLaunchInfo.h"
3636
#include "lldb/Host/ProcessRunLock.h"
3737
#include "lldb/Symbol/ObjectFile.h"
38-
#include "lldb/Symbol/SaveCoreOptions.h"
3938
#include "lldb/Target/ExecutionContextScope.h"
4039
#include "lldb/Target/InstrumentationRuntime.h"
4140
#include "lldb/Target/Memory.h"
@@ -735,9 +734,7 @@ class Process : public std::enable_shared_from_this<Process>,
735734
}
736735
};
737736

738-
using CoreFileMemoryRanges =
739-
lldb_private::RangeDataVector<lldb::addr_t, lldb::addr_t,
740-
CoreFileMemoryRange>;
737+
using CoreFileMemoryRanges = std::vector<CoreFileMemoryRange>;
741738

742739
/// Helper function for Process::SaveCore(...) that calculates the address
743740
/// ranges that should be saved. This allows all core file plug-ins to save

lldb/include/lldb/Utility/RangeMap.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -450,8 +450,6 @@ class RangeDataVector {
450450

451451
void Append(const Entry &entry) { m_entries.emplace_back(entry); }
452452

453-
void Append(B &&b, S &&s, T &&t) { m_entries.emplace_back(Entry(b, s, t)); }
454-
455453
bool Erase(uint32_t start, uint32_t end) {
456454
if (start >= end || end > m_entries.size())
457455
return false;

lldb/include/lldb/lldb-enumerations.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1253,7 +1253,6 @@ enum SaveCoreStyle {
12531253
eSaveCoreFull = 1,
12541254
eSaveCoreDirtyOnly = 2,
12551255
eSaveCoreStackOnly = 3,
1256-
eSaveCoreCustomOnly = 4,
12571256
};
12581257

12591258
/// Events that might happen during a trace session.

lldb/include/lldb/lldb-forward.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,6 @@ class StackFrameRecognizer;
206206
class StackFrameRecognizerManager;
207207
class StackID;
208208
class Status;
209-
class SaveCoreOptions;
210209
class StopInfo;
211210
class Stoppoint;
212211
class StoppointCallbackContext;

lldb/include/lldb/lldb-private-interfaces.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#ifndef LLDB_LLDB_PRIVATE_INTERFACES_H
1010
#define LLDB_LLDB_PRIVATE_INTERFACES_H
1111

12+
#include "lldb/Symbol/SaveCoreOptions.h"
1213
#include "lldb/lldb-enumerations.h"
1314
#include "lldb/lldb-forward.h"
1415
#include "lldb/lldb-private-enumerations.h"

0 commit comments

Comments
 (0)