Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

2007-10-29 Martin Baulig <martin@ximian.com>

	* classes/TargetInfo.cs: New file.
	(TargetInfo): Moved here from TargetBinaryAccess.cs.
	(TargetMemoryInfo): New public class, derives from `TargetInfo'.
	(TargetInfo.AddressDomain): Moved this into `TargetMemoryInfo'.


svn path=/trunk/debugger/; revision=88416
  • Loading branch information...
commit 72da29e5f457d6396dfd04233439dc2f7c924313 1 parent a686257
Martin Baulig authored
Showing with 221 additions and 201 deletions.
  1. +7 −0 ChangeLog
  2. +6 −6 backend/Inferior.cs
  3. +1 −1  backend/MonoThreadManager.cs
  4. +3 −3 backend/ProcessServant.cs
  5. +4 −4 backend/SingleSteppingEngine.cs
  6. +0 −8 backend/TargetAccess.cs
  7. +5 −1 backend/TargetMemoryAccess.cs
  8. +3 −3 backend/TargetReader.cs
  9. +1 −1  backend/ThreadDB.cs
  10. +5 −5 backend/ThreadServant.cs
  11. +0 −4 backend/arch/Architecture.cs
  12. +6 −6 backend/arch/Architecture_I386.cs
  13. +9 −9 backend/arch/Architecture_X86_64.cs
  14. +3 −3 backend/arch/Bfd.cs
  15. +1 −1  backend/arch/BfdContainer.cs
  16. +3 −3 backend/arch/BfdDisassembler.cs
  17. +7 −7 backend/arch/CoreFile.cs
  18. +6 −6 backend/arch/DwarfFrameReader.cs
  19. +9 −9 backend/arch/DwarfReader.cs
  20. +2 −2 backend/arch/X86_Instruction.cs
  21. +1 −1  classes/StackFrame.cs
  22. +9 −60 classes/TargetBinaryAccess.cs
  23. +2 −2 classes/TargetBinaryReader.cs
  24. +1 −1  classes/TargetBinaryWriter.cs
  25. +69 −0 classes/TargetInfo.cs
  26. +9 −9 classes/Thread.cs
  27. +1 −1  languages/BitfieldTargetLocation.cs
  28. +1 −1  languages/ClientSuppliedTargetLocation.cs
  29. +1 −1  languages/TargetArrayObject.cs
  30. +1 −1  languages/TargetFundamentalType.cs
  31. +4 −4 languages/mono/MonoArrayObject.cs
  32. +7 −6 languages/mono/MonoClassInfo.cs
  33. +1 −1  languages/mono/MonoClassType.cs
  34. +1 −1  languages/mono/MonoFunctionType.cs
  35. +3 −3 languages/mono/MonoFundamentalType.cs
  36. +8 −8 languages/mono/MonoLanguageBackend.cs
  37. +1 −1  languages/mono/MonoObjectType.cs
  38. +3 −2 languages/mono/MonoRuntime.cs
  39. +1 −1  languages/mono/MonoStringType.cs
  40. +11 −10 languages/mono/MonoSymbolFile.cs
  41. +5 −5 languages/mono/MonoVariableLocation.cs
7 ChangeLog
View
@@ -1,3 +1,10 @@
+2007-10-29 Martin Baulig <martin@ximian.com>
+
+ * classes/TargetInfo.cs: New file.
+ (TargetInfo): Moved here from TargetBinaryAccess.cs.
+ (TargetMemoryInfo): New public class, derives from `TargetInfo'.
+ (TargetInfo.AddressDomain): Moved this into `TargetMemoryInfo'.
+
2007-10-15 Martin Baulig <martin@ximian.com>
HEADS UP: The debugger currently doesn't work with the latest mono
12 backend/Inferior.cs
View
@@ -41,7 +41,7 @@ internal class Inferior : TargetMemoryAccess, ITargetNotification, IDisposable
bool has_target;
bool pushed_regs;
- TargetInfo target_info;
+ TargetMemoryInfo target_info;
Architecture arch;
bool has_signals;
@@ -631,14 +631,14 @@ public ChildEvent ProcessEvent (int status)
return new ChildEvent (message, arg, data1, data2);
}
- public static TargetInfo GetTargetInfo (AddressDomain domain)
+ public static TargetMemoryInfo GetTargetInfo (AddressDomain domain)
{
int target_int_size, target_long_size, target_addr_size, is_bigendian;
check_error (mono_debugger_server_get_target_info
(out target_int_size, out target_long_size,
out target_addr_size, out is_bigendian));
- return new TargetInfo (target_int_size, target_long_size,
+ return new TargetMemoryInfo (target_int_size, target_long_size,
target_addr_size, is_bigendian != 0, domain);
}
@@ -767,13 +767,13 @@ void inferior_stderr_handler (string line)
// TargetMemoryAccess
//
- public AddressDomain AddressDomain {
+ public override AddressDomain AddressDomain {
get {
return address_domain;
}
}
- public override TargetInfo TargetInfo {
+ public override TargetMemoryInfo TargetMemoryInfo {
get {
return target_info;
}
@@ -1295,7 +1295,7 @@ internal class StackFrame
{
TargetAddress address, stack, frame;
- internal StackFrame (TargetInfo info, ServerStackFrame frame)
+ internal StackFrame (TargetMemoryInfo info, ServerStackFrame frame)
{
this.address = new TargetAddress (info.AddressDomain, frame.Address);
this.stack = new TargetAddress (info.AddressDomain, frame.StackPointer);
2  backend/MonoThreadManager.cs
View
@@ -439,7 +439,7 @@ public MonoMetadataInfo (TargetMemoryAccess memory, TargetAddress address)
MonoDefaultsSize = reader.ReadInt32 ();
MonoDefaultsAddress = new TargetAddress (
- memory.TargetInfo.AddressDomain, reader.ReadAddress ());
+ memory.AddressDomain, reader.ReadAddress ());
TypeSize = reader.ReadInt32 ();
ArrayTypeSize = reader.ReadInt32 ();
6 backend/ProcessServant.cs
View
@@ -338,14 +338,14 @@ void read_thread_table (Inferior inferior)
{
TargetAddress ptr = inferior.ReadAddress (mono_manager.MonoDebuggerInfo.ThreadTable);
while (!ptr.IsNull) {
- int size = 24 + inferior.TargetInfo.TargetAddressSize;
+ int size = 24 + inferior.TargetMemoryInfo.TargetAddressSize;
TargetReader reader = new TargetReader (inferior.ReadMemory (ptr, size));
long tid = reader.ReadLongInteger ();
TargetAddress lmf_addr = reader.ReadAddress ();
TargetAddress end_stack = reader.ReadAddress ();
- if (inferior.TargetInfo.TargetAddressSize == 4)
+ if (inferior.TargetMemoryInfo.TargetAddressSize == 4)
tid &= 0x00000000ffffffffL;
ptr = reader.ReadAddress ();
@@ -460,7 +460,7 @@ public void LoadLibrary (Thread thread, string filename)
filename);
if (!mono_language.TryFindImage (thread, filename))
- bfd_container.AddFile (thread.TargetInfo, filename,
+ bfd_container.AddFile (thread.TargetMemoryInfo, filename,
TargetAddress.Null, true, false);
}
8 backend/SingleSteppingEngine.cs
View
@@ -755,10 +755,10 @@ public override Symbol SimpleLookup (TargetAddress address, bool exact_match)
get { return end_stack_address; }
}
- public override TargetInfo TargetInfo {
+ public override TargetMemoryInfo TargetMemoryInfo {
get {
check_inferior ();
- return inferior.TargetInfo;
+ return inferior.TargetMemoryInfo;
}
}
@@ -1734,7 +1734,7 @@ public override byte[] ReadBuffer (TargetAddress address, int size)
public override TargetBlob ReadMemory (TargetAddress address, int size)
{
- return new TargetBlob (ReadBuffer (address, size), TargetInfo);
+ return new TargetBlob (ReadBuffer (address, size), TargetMemoryInfo);
}
public override byte ReadByte (TargetAddress address)
@@ -3173,7 +3173,7 @@ protected override EventResult CallbackCompleted (long data1, long data2)
if (!class_type.IsByRef) {
TargetLocation new_loc = instance.Location.GetLocationAtOffset (
- 2 * inferior.TargetInfo.TargetAddressSize);
+ 2 * inferior.TargetMemoryInfo.TargetAddressSize);
instance = (TargetClassObject) class_type.GetObject (
inferior, new_loc);
}
8 backend/TargetAccess.cs
View
@@ -60,14 +60,6 @@ public abstract class TargetAccess : TargetMemoryAccess
}
//
- // ITargetMemoryInfo
- //
-
- public abstract AddressDomain AddressDomain {
- get;
- }
-
- //
// TargetMemoryAccess
//
6 backend/TargetMemoryAccess.cs
View
@@ -6,7 +6,11 @@ namespace Mono.Debugger
{
public abstract class TargetMemoryAccess : DebuggerMarshalByRefObject
{
- public abstract TargetInfo TargetInfo {
+ public abstract TargetMemoryInfo TargetMemoryInfo {
+ get;
+ }
+
+ public abstract AddressDomain AddressDomain {
get;
}
6 backend/TargetReader.cs
View
@@ -11,9 +11,9 @@ internal class TargetReader
{
byte[] data;
TargetBinaryReader reader;
- TargetInfo info;
+ TargetMemoryInfo info;
- internal TargetReader (byte[] data, TargetInfo info)
+ internal TargetReader (byte[] data, TargetMemoryInfo info)
{
if ((info == null) || (data == null))
throw new ArgumentNullException ();
@@ -23,7 +23,7 @@ internal TargetReader (byte[] data, TargetInfo info)
}
internal TargetReader (TargetBlob data)
- : this (data.Contents, data.TargetInfo)
+ : this (data.Contents, data.TargetMemoryInfo)
{ }
public long Offset {
2  backend/ThreadDB.cs
View
@@ -116,7 +116,7 @@ PsErr global_lookup (string obj_name, string sym_name, out long sym_addr)
TargetAddress create_address (long address)
{
- return new TargetAddress (target.TargetInfo.AddressDomain, address);
+ return new TargetAddress (target.AddressDomain, address);
}
PsErr read_memory (long address, IntPtr ptr, int size)
10 backend/ThreadServant.cs
View
@@ -242,23 +242,23 @@ public string PrintRegisters (StackFrame frame)
}
public override int TargetAddressSize {
- get { return TargetInfo.TargetAddressSize; }
+ get { return TargetMemoryInfo.TargetAddressSize; }
}
public override int TargetIntegerSize {
- get { return TargetInfo.TargetIntegerSize; }
+ get { return TargetMemoryInfo.TargetIntegerSize; }
}
public override int TargetLongIntegerSize {
- get { return TargetInfo.TargetLongIntegerSize; }
+ get { return TargetMemoryInfo.TargetLongIntegerSize; }
}
public override bool IsBigEndian {
- get { return TargetInfo.IsBigEndian; }
+ get { return TargetMemoryInfo.IsBigEndian; }
}
public override AddressDomain AddressDomain {
- get { return TargetInfo.AddressDomain; }
+ get { return TargetMemoryInfo.AddressDomain; }
}
#region IDisposable implementation
4 backend/arch/Architecture.cs
View
@@ -27,10 +27,6 @@ protected Architecture (ProcessServant process, TargetInfo info)
this.TargetInfo = info;
}
- public AddressDomain AddressDomain {
- get { return TargetInfo.AddressDomain; }
- }
-
public int TargetAddressSize {
get { return TargetInfo.TargetAddressSize; }
}
12 backend/arch/Architecture_I386.cs
View
@@ -81,7 +81,7 @@ internal Architecture_I386 (ProcessServant process, TargetInfo info)
foreach (TargetAddress address in process.MonoLanguage.Trampolines) {
if (call_target + call_disp + 10 == address) {
- trampoline = new TargetAddress (AddressDomain, method_info);
+ trampoline = new TargetAddress (memory.AddressDomain, method_info);
return true;
}
}
@@ -272,7 +272,7 @@ public override string PrintRegisters (StackFrame frame)
Registers regs = new Registers (old_regs);
TargetAddress ebp = new TargetAddress (
- AddressDomain, old_regs [(int) I386Register.EBP].GetValue ());
+ memory.AddressDomain, old_regs [(int) I386Register.EBP].GetValue ());
int addr_size = TargetAddressSize;
TargetAddress new_ebp = memory.ReadAddress (ebp);
@@ -558,7 +558,7 @@ internal override void Hack_ReturnNull (Inferior inferior)
{
Registers regs = inferior.GetRegisters ();
TargetAddress esp = new TargetAddress (
- AddressDomain, regs [(int) I386Register.ESP].GetValue ());
+ inferior.AddressDomain, regs [(int) I386Register.ESP].GetValue ());
TargetAddress eip = inferior.ReadAddress (esp);
esp += TargetAddressSize;
@@ -598,11 +598,11 @@ internal override void Hack_ReturnNull (Inferior inferior)
bool adjust_retaddr)
{
TargetAddress address = new TargetAddress (
- AddressDomain, regs [(int) I386Register.EIP].GetValue ());
+ thread.AddressDomain, regs [(int) I386Register.EIP].GetValue ());
TargetAddress stack_pointer = new TargetAddress (
- AddressDomain, regs [(int) I386Register.ESP].GetValue ());
+ thread.AddressDomain, regs [(int) I386Register.ESP].GetValue ());
TargetAddress frame_pointer = new TargetAddress (
- AddressDomain, regs [(int) I386Register.EBP].GetValue ());
+ thread.AddressDomain, regs [(int) I386Register.EBP].GetValue ());
return CreateFrame (thread, address, stack_pointer, frame_pointer, regs,
adjust_retaddr);
18 backend/arch/Architecture_X86_64.cs
View
@@ -88,7 +88,7 @@ internal Architecture_X86_64 (ProcessServant process, TargetInfo info)
int call_disp = reader.ReadInt32 ();
foreach (TargetAddress address in process.MonoLanguage.Trampolines) {
if (call_target + call_disp + 19 == address) {
- trampoline = new TargetAddress (AddressDomain, method_info);
+ trampoline = new TargetAddress (memory.AddressDomain, method_info);
return true;
}
}
@@ -337,7 +337,7 @@ internal override Registers CopyRegisters (Registers old_regs)
return null;
TargetAddress rbp = new TargetAddress (
- AddressDomain, old_regs [(int) X86_64_Register.RBP].Value);
+ memory.AddressDomain, old_regs [(int) X86_64_Register.RBP].Value);
int addr_size = TargetAddressSize;
TargetAddress new_rbp = memory.ReadAddress (rbp);
@@ -577,11 +577,11 @@ StackFrame try_unwind_sigreturn (StackFrame frame, TargetMemoryAccess memory)
}
TargetAddress rip = new TargetAddress (
- AddressDomain, regs [(int) X86_64_Register.RIP].GetValue ());
+ memory.AddressDomain, regs [(int) X86_64_Register.RIP].GetValue ());
TargetAddress rsp = new TargetAddress (
- AddressDomain, regs [(int) X86_64_Register.RSP].GetValue ());
+ memory.AddressDomain, regs [(int) X86_64_Register.RSP].GetValue ());
TargetAddress rbp = new TargetAddress (
- AddressDomain, regs [(int) X86_64_Register.RBP].GetValue ());
+ memory.AddressDomain, regs [(int) X86_64_Register.RBP].GetValue ());
Symbol name = new Symbol ("<signal handler>", rip, 0);
@@ -603,7 +603,7 @@ internal override void Hack_ReturnNull (Inferior inferior)
{
Registers regs = inferior.GetRegisters ();
TargetAddress rsp = new TargetAddress (
- AddressDomain, regs [(int) X86_64_Register.RSP].GetValue ());
+ inferior.AddressDomain, regs [(int) X86_64_Register.RSP].GetValue ());
TargetAddress rip = inferior.ReadAddress (rsp);
rsp += TargetAddressSize;
@@ -643,11 +643,11 @@ internal override void Hack_ReturnNull (Inferior inferior)
bool adjust_retaddr)
{
TargetAddress address = new TargetAddress (
- AddressDomain, regs [(int) X86_64_Register.RIP].GetValue ());
+ thread.AddressDomain, regs [(int) X86_64_Register.RIP].GetValue ());
TargetAddress stack_pointer = new TargetAddress (
- AddressDomain, regs [(int) X86_64_Register.RSP].GetValue ());
+ thread.AddressDomain, regs [(int) X86_64_Register.RSP].GetValue ());
TargetAddress frame_pointer = new TargetAddress (
- AddressDomain, regs [(int) X86_64_Register.RBP].GetValue ());
+ thread.AddressDomain, regs [(int) X86_64_Register.RBP].GetValue ());
return CreateFrame (thread, address, stack_pointer, frame_pointer, regs,
adjust_retaddr);
6 backend/arch/Bfd.cs
View
@@ -17,7 +17,7 @@ internal class Bfd : SymbolFile, ISymbolContainer
IntPtr bfd;
protected Module module;
protected BfdContainer container;
- protected TargetInfo info;
+ protected TargetMemoryInfo info;
protected Bfd main_bfd;
protected Architecture arch;
TargetAddress first_link_map = TargetAddress.Null;
@@ -170,7 +170,7 @@ static Bfd ()
bfd_init ();
}
- public Bfd (BfdContainer container, TargetInfo info, string filename,
+ public Bfd (BfdContainer container, TargetMemoryInfo info, string filename,
Bfd main_bfd, TargetAddress base_address, bool is_loaded)
{
this.container = container;
@@ -480,7 +480,7 @@ public TargetAddress GetAddress (long address)
info.AddressDomain, BaseAddress.Address + address);
}
- public TargetInfo TargetInfo {
+ public TargetMemoryInfo TargetMemoryInfo {
get {
return info;
}
2  backend/arch/BfdContainer.cs
View
@@ -58,7 +58,7 @@ internal void SetupInferior (TargetInfo info, Bfd main_bfd)
language = new NativeLanguage (this, info);
}
- public Bfd AddFile (TargetInfo memory, string filename,
+ public Bfd AddFile (TargetMemoryInfo memory, string filename,
TargetAddress base_address, bool step_info, bool is_loaded)
{
check_disposed ();
6 backend/arch/BfdDisassembler.cs
View
@@ -55,7 +55,7 @@ int read_memory_func (long address, IntPtr data, int size)
{
try {
TargetAddress location = new TargetAddress (
- memory.TargetInfo.AddressDomain, address);
+ memory.AddressDomain, address);
byte[] buffer = memory.ReadBuffer (location, size);
Marshal.Copy (buffer, 0, data, size);
} catch (Exception e) {
@@ -82,7 +82,7 @@ void output_func (long address)
void print_address_func (long address)
{
TargetAddress maddress = new TargetAddress (
- memory.TargetInfo.AddressDomain, address);
+ memory.AddressDomain, address);
if (current_method != null) {
try {
@@ -148,7 +148,7 @@ public override AssemblerMethod DisassembleMethod (Method method)
sb = new StringBuilder ();
address = new TargetAddress (
- memory.TargetInfo.AddressDomain, address.Address);
+ memory.AddressDomain, address.Address);
string insn;
int insn_size;
14 backend/arch/CoreFile.cs
View
@@ -9,7 +9,7 @@ namespace Mono.Debugger.Backends
{
internal class CoreFile : ProcessServant
{
- TargetInfo info;
+ TargetMemoryInfo info;
Bfd bfd, core_bfd;
string core_file;
string application;
@@ -86,7 +86,7 @@ void read_thread_table ()
TargetAddress ptr = main_thread.ReadAddress (debugger_info.ThreadTable);
Console.WriteLine ("READ THREAD TABLE: {0}", ptr);
while (!ptr.IsNull) {
- int size = 56 + main_thread.TargetInfo.TargetAddressSize;
+ int size = 56 + main_thread.TargetMemoryInfo.TargetAddressSize;
TargetReader reader = new TargetReader (main_thread.ReadMemory (ptr, size));
long tid = reader.ReadLongInteger ();
@@ -199,7 +199,7 @@ void read_note_section ()
get { return bfd.Architecture; }
}
- public TargetInfo TargetInfo {
+ public TargetMemoryInfo TargetMemoryInfo {
get { return info; }
}
@@ -266,8 +266,8 @@ internal void SetLMFAddress (long tid, TargetAddress lmf)
get { throw new InvalidOperationException (); }
}
- public override TargetInfo TargetInfo {
- get { return CoreFile.TargetInfo; }
+ public override TargetMemoryInfo TargetMemoryInfo {
+ get { return CoreFile.TargetMemoryInfo; }
}
public override int PID {
@@ -400,7 +400,7 @@ internal override void ReleaseThreadLockDone ()
//
public override AddressDomain AddressDomain {
- get { return CoreFile.TargetInfo.AddressDomain; }
+ get { return CoreFile.TargetMemoryInfo.AddressDomain; }
}
internal override Architecture Architecture {
@@ -434,7 +434,7 @@ public override string ReadString (TargetAddress address)
public override TargetBlob ReadMemory (TargetAddress address, int size)
{
- return new TargetBlob (ReadBuffer (address, size), TargetInfo);
+ return new TargetBlob (ReadBuffer (address, size), TargetMemoryInfo);
}
public override byte[] ReadBuffer (TargetAddress address, int size)
12 backend/arch/DwarfFrameReader.cs
View
@@ -62,7 +62,7 @@ protected CIE find_cie (long offset)
if (is_ehframe)
cie_pointer = reader.Position - cie_pointer -
- target.TargetInfo.TargetAddressSize;
+ target.TargetMemoryInfo.TargetAddressSize;
CIE cie = find_cie (cie_pointer);
@@ -70,7 +70,7 @@ protected CIE find_cie (long offset)
long range = reader.ReadAddress ();
TargetAddress start = new TargetAddress (
- target.TargetInfo.AddressDomain, initial);
+ target.AddressDomain, initial);
if ((address < start) || (address > start + range)) {
reader.Position = end_pos;
@@ -326,7 +326,7 @@ long GetRegisterValue (Registers regs, int reg, Column column)
{
long cfa_addr = GetRegisterValue (regs, 1, columns [0]);
TargetAddress cfa = new TargetAddress (
- arch.AddressDomain, cfa_addr);
+ target.AddressDomain, cfa_addr);
for (int i = 1; i < columns.Length; i++) {
GetValue (target, regs, cfa, i+2, columns [i]);
@@ -350,14 +350,14 @@ long GetRegisterValue (Registers regs, int reg, Column column)
return null;
TargetAddress address = new TargetAddress (
- arch.AddressDomain, eip.Value);
+ target.AddressDomain, eip.Value);
TargetAddress stack = new TargetAddress (
- arch.AddressDomain, esp.Value);
+ target.AddressDomain, esp.Value);
TargetAddress frame_addr = TargetAddress.Null;
if (ebp.Valid)
frame_addr = new TargetAddress (
- arch.AddressDomain, ebp.Value);
+ target.AddressDomain, ebp.Value);
return arch.CreateFrame (
frame.Thread, address, stack, frame_addr, regs, true);
18 backend/arch/DwarfReader.cs
View
@@ -116,14 +116,14 @@ internal class DwarfReader : DebuggerMarshalByRefObject
ArrayList aranges;
Hashtable pubnames;
Hashtable pubtypes;
- TargetInfo target_info;
+ TargetMemoryInfo target_info;
public DwarfReader (Bfd bfd, Module module)
{
this.bfd = bfd;
this.module = module;
this.filename = bfd.FileName;
- this.target_info = bfd.TargetInfo;
+ this.target_info = bfd.TargetMemoryInfo;
debug_info_reader = create_reader (".debug_info");
@@ -190,7 +190,7 @@ public static bool IsSupported (Bfd bfd)
return false;
}
- public TargetInfo TargetInfo {
+ public TargetMemoryInfo TargetMemoryInfo {
get {
return target_info;
}
@@ -701,7 +701,7 @@ object create_reader_func (object user_data)
{
try {
byte[] contents = bfd.GetSectionContents ((string) user_data);
- return new TargetBlob (contents, bfd.TargetInfo);
+ return new TargetBlob (contents, bfd.TargetMemoryInfo);
} catch {
Report.Debug (DebugFlags.DwarfReader,
"{1} Can't find DWARF 2 debugging info in section `{0}'",
@@ -2782,7 +2782,7 @@ public DwarfLocation (DieSubprogram subprog, Attribute attribute, bool is_byref)
TargetLocation GetLocation (StackFrame frame, byte[] data)
{
TargetBinaryReader locreader = new TargetBinaryReader (
- data, subprog.dwarf.TargetInfo);
+ data, subprog.dwarf.TargetMemoryInfo);
byte opcode = locreader.ReadByte ();
bool is_regoffset;
@@ -3804,7 +3804,7 @@ protected abstract class DieMethodVariable : DieVariableBase
bool is_local)
: base (reader, comp_unit, abbrev)
{
- this.target_info = reader.TargetInfo;
+ this.target_info = reader.TargetMemoryInfo;
this.subprog = subprog;
if (subprog != null) {
@@ -3830,7 +3830,7 @@ protected override void ProcessAttribute (Attribute attribute)
Attribute location_attr;
TargetVariable variable;
- TargetInfo target_info;
+ TargetMemoryInfo target_info;
DieSubprogram subprog;
bool resolved;
@@ -3887,7 +3887,7 @@ protected class DieMember : DieVariableBase
AbbrevEntry abbrev)
: base (reader, comp_unit, abbrev)
{
- this.target_info = reader.TargetInfo;
+ this.target_info = reader.TargetMemoryInfo;
}
protected override void ProcessAttribute (Attribute attribute)
@@ -3915,7 +3915,7 @@ protected override void ProcessAttribute (Attribute attribute)
bool resolved, ok;
DieType type_die;
TargetType type;
- TargetInfo target_info;
+ TargetMemoryInfo target_info;
int bit_offset, bit_size;
int offset;
4 backend/arch/X86_Instruction.cs
View
@@ -486,7 +486,7 @@ public override TargetAddress GetEffectiveAddress (TargetMemoryAccess memory)
}
TargetAddress effective_address = new TargetAddress (
- memory.TargetInfo.AddressDomain, regs [Register].GetValue ());
+ memory.AddressDomain, regs [Register].GetValue ());
effective_address += effective_displacement;
if (DereferenceAddress)
@@ -502,7 +502,7 @@ public override TargetAddress GetEffectiveAddress (TargetMemoryAccess memory)
TargetReader reader = new TargetReader (
memory.ReadMemory (address, MaxInstructionLength));
- bool is_64bit_mode = memory.TargetInfo.TargetAddressSize == 8;
+ bool is_64bit_mode = memory.TargetMemoryInfo.TargetAddressSize == 8;
X86_Instruction insn = new X86_Instruction (address, is_64bit_mode);
insn.DecodeInstruction (reader);
return insn;
2  classes/StackFrame.cs
View
@@ -79,7 +79,7 @@ public void WriteRegister (TargetAccess target, long value)
if (addr_on_stack.IsNull)
target.SetRegisters (registers);
- else if (Size == target.TargetInfo.TargetIntegerSize)
+ else if (Size == target.TargetMemoryInfo.TargetIntegerSize)
target.WriteInteger (addr_on_stack, (int) value);
else
target.WriteLongInteger (addr_on_stack, value);
69 classes/TargetBinaryAccess.cs
View
@@ -4,72 +4,21 @@
namespace Mono.Debugger
{
[Serializable]
- public sealed class TargetInfo
- {
- int target_int_size;
- int target_long_size;
- int target_address_size;
- bool is_bigendian;
- AddressDomain address_domain;
-
- internal TargetInfo (int target_int_size, int target_long_size,
- int target_address_size, bool is_bigendian,
- AddressDomain domain)
- {
- this.target_int_size = target_int_size;
- this.target_long_size = target_long_size;
- this.target_address_size = target_address_size;
- this.is_bigendian = is_bigendian;
- this.address_domain = domain;
- }
-
- public int TargetIntegerSize {
- get {
- return target_int_size;
- }
- }
-
- public int TargetLongIntegerSize {
- get {
- return target_long_size;
- }
- }
-
- public int TargetAddressSize {
- get {
- return target_address_size;
- }
- }
-
- public bool IsBigEndian {
- get {
- return is_bigendian;
- }
- }
-
- public AddressDomain AddressDomain {
- get {
- return address_domain;
- }
- }
- }
-
- [Serializable]
public sealed class TargetBlob
{
public readonly byte[] Contents;
- public readonly TargetInfo TargetInfo;
+ public readonly TargetMemoryInfo TargetMemoryInfo;
- public TargetBlob (byte[] contents, TargetInfo target_info)
+ public TargetBlob (byte[] contents, TargetMemoryInfo target_info)
{
this.Contents = contents;
- this.TargetInfo = target_info;
+ this.TargetMemoryInfo = target_info;
}
- public TargetBlob (int size, TargetInfo target_info)
+ public TargetBlob (int size, TargetMemoryInfo target_info)
{
this.Contents = new byte [size];
- this.TargetInfo = target_info;
+ this.TargetMemoryInfo = target_info;
}
public int Size {
@@ -92,12 +41,12 @@ public class TargetBinaryAccess
public TargetBinaryAccess (TargetBlob blob)
{
this.blob = blob;
- this.swap = blob.TargetInfo.IsBigEndian;
+ this.swap = blob.TargetMemoryInfo.IsBigEndian;
}
public int AddressSize {
get {
- int address_size = blob.TargetInfo.TargetAddressSize;
+ int address_size = blob.TargetMemoryInfo.TargetAddressSize;
if ((address_size != 4) && (address_size != 8))
throw new TargetMemoryException (
"Unknown target address size " + address_size);
@@ -106,9 +55,9 @@ public TargetBinaryAccess (TargetBlob blob)
}
}
- public TargetInfo TargetInfo {
+ public TargetMemoryInfo TargetMemoryInfo {
get {
- return blob.TargetInfo;
+ return blob.TargetMemoryInfo;
}
}
4 classes/TargetBinaryReader.cs
View
@@ -8,7 +8,7 @@ namespace Mono.Debugger
[Serializable]
public class TargetBinaryReader : TargetBinaryAccess
{
- public TargetBinaryReader (byte[] contents, TargetInfo target_info)
+ public TargetBinaryReader (byte[] contents, TargetMemoryInfo target_info)
: base (new TargetBlob (contents, target_info))
{ }
@@ -166,7 +166,7 @@ public long ReadAddress ()
public TargetAddress ReadTargetAddress ()
{
- return new TargetAddress (TargetInfo.AddressDomain, ReadAddress ());
+ return new TargetAddress (TargetMemoryInfo.AddressDomain, ReadAddress ());
}
public string PeekString (long pos)
2  classes/TargetBinaryWriter.cs
View
@@ -5,7 +5,7 @@ namespace Mono.Debugger
{
public class TargetBinaryWriter : TargetBinaryAccess
{
- public TargetBinaryWriter (int size, TargetInfo target_info)
+ public TargetBinaryWriter (int size, TargetMemoryInfo target_info)
: base (new TargetBlob (size, target_info))
{ }
69 classes/TargetInfo.cs
View
@@ -0,0 +1,69 @@
+using System;
+using System.Text;
+
+namespace Mono.Debugger
+{
+ [Serializable]
+ public class TargetInfo
+ {
+ int target_int_size;
+ int target_long_size;
+ int target_address_size;
+ bool is_bigendian;
+
+ internal TargetInfo (int target_int_size, int target_long_size,
+ int target_address_size, bool is_bigendian)
+ {
+ this.target_int_size = target_int_size;
+ this.target_long_size = target_long_size;
+ this.target_address_size = target_address_size;
+ this.is_bigendian = is_bigendian;
+ }
+
+ public int TargetIntegerSize {
+ get {
+ return target_int_size;
+ }
+ }
+
+ public int TargetLongIntegerSize {
+ get {
+ return target_long_size;
+ }
+ }
+
+ public int TargetAddressSize {
+ get {
+ return target_address_size;
+ }
+ }
+
+ public bool IsBigEndian {
+ get {
+ return is_bigendian;
+ }
+ }
+ }
+
+ [Serializable]
+ public class TargetMemoryInfo : TargetInfo
+ {
+ internal TargetMemoryInfo (int target_int_size, int target_long_size,
+ int target_address_size, bool is_bigendian,
+ AddressDomain domain)
+ : base (target_int_size, target_long_size, target_address_size,
+ is_bigendian)
+ {
+ this.address_domain = domain;
+ }
+
+ AddressDomain address_domain;
+
+
+ public AddressDomain AddressDomain {
+ get {
+ return address_domain;
+ }
+ }
+ }
+}
18 classes/Thread.cs
View
@@ -642,28 +642,28 @@ public string PrintRegisters (StackFrame frame)
get { return (servant != null) && servant.IsStopped; }
}
- public override TargetInfo TargetInfo {
+ public override TargetMemoryInfo TargetMemoryInfo {
get {
check_servant ();
- return servant.TargetInfo;
+ return servant.TargetMemoryInfo;
}
}
#region ITargetInfo implementation
public override int TargetAddressSize {
- get { return TargetInfo.TargetAddressSize; }
+ get { return TargetMemoryInfo.TargetAddressSize; }
}
public override int TargetIntegerSize {
- get { return TargetInfo.TargetIntegerSize; }
+ get { return TargetMemoryInfo.TargetIntegerSize; }
}
public override int TargetLongIntegerSize {
- get { return TargetInfo.TargetLongIntegerSize; }
+ get { return TargetMemoryInfo.TargetLongIntegerSize; }
}
public override bool IsBigEndian {
- get { return TargetInfo.IsBigEndian; }
+ get { return TargetMemoryInfo.IsBigEndian; }
}
#endregion
@@ -676,7 +676,7 @@ void write_memory (TargetAddress address, byte[] buffer)
public override AddressDomain AddressDomain {
get {
- return TargetInfo.AddressDomain;
+ return TargetMemoryInfo.AddressDomain;
}
}
@@ -714,7 +714,7 @@ public override TargetBlob ReadMemory (TargetAddress address, int size)
{
check_alive ();
byte[] buffer = servant.ReadBuffer (address, size);
- return new TargetBlob (buffer, TargetInfo);
+ return new TargetBlob (buffer, TargetMemoryInfo);
}
public override byte[] ReadBuffer (TargetAddress address, int size)
@@ -754,7 +754,7 @@ public override void WriteAddress (TargetAddress address, TargetAddress value)
{
check_alive ();
TargetBinaryWriter writer = new TargetBinaryWriter (
- TargetInfo.TargetAddressSize, TargetInfo);
+ TargetMemoryInfo.TargetAddressSize, TargetMemoryInfo);
writer.WriteAddress (value);
write_memory (address, writer.Contents);
}
2  languages/BitfieldTargetLocation.cs
View
@@ -72,7 +72,7 @@ internal override TargetBlob ReadMemory (TargetMemoryAccess target, int size)
blob [i] = (byte) current;
}
- return new TargetBlob (blob, target.TargetInfo);
+ return new TargetBlob (blob, target.TargetMemoryInfo);
}
public override string Print ()
2  languages/ClientSuppliedTargetLocation.cs
View
@@ -31,7 +31,7 @@ internal override TargetBlob ReadMemory (TargetMemoryAccess target, int size)
byte[] data = new byte [size];
Array.Copy (blob.Contents, 0, data, 0, size);
- return new TargetBlob (data, blob.TargetInfo);
+ return new TargetBlob (data, blob.TargetMemoryInfo);
}
internal override void WriteBuffer (TargetAccess target, byte[] data)
2  languages/TargetArrayObject.cs
View
@@ -80,7 +80,7 @@ protected int GetArrayOffset (TargetMemoryAccess target, int[] indices)
index = index * bounds [i].Length + indices [i];
if (Type.ElementType.IsByRef)
- return index * target.TargetInfo.TargetAddressSize;
+ return index * target.TargetMemoryInfo.TargetAddressSize;
else if (Type.ElementType.HasFixedSize)
return index * Type.ElementType.Size;
else
2  languages/TargetFundamentalType.cs
View
@@ -116,7 +116,7 @@ public virtual byte[] CreateObject (object obj)
internal virtual TargetFundamentalObject CreateInstance (Thread target, object obj)
{
- TargetBlob blob = new TargetBlob (CreateObject (obj), target.TargetInfo);
+ TargetBlob blob = new TargetBlob (CreateObject (obj), target.TargetMemoryInfo);
TargetLocation location = new ClientSuppliedTargetLocation (blob);
return new TargetFundamentalObject (this, location);
}
8 languages/mono/MonoArrayObject.cs
View
@@ -12,7 +12,7 @@ protected override void DoGetArrayBounds (TargetMemoryAccess target)
{
TargetBinaryReader reader = Location.ReadMemory (target, type.Size).GetReader ();
- reader.Position = 3 * reader.TargetInfo.TargetAddressSize;
+ reader.Position = 3 * reader.TargetMemoryInfo.TargetAddressSize;
int length = reader.ReadInt32 ();
if (Rank == 1) {
@@ -21,9 +21,9 @@ protected override void DoGetArrayBounds (TargetMemoryAccess target)
return;
}
- reader.Position = 2 * reader.TargetInfo.TargetAddressSize;
+ reader.Position = 2 * reader.TargetMemoryInfo.TargetAddressSize;
TargetAddress bounds_address = new TargetAddress (
- target.TargetInfo.AddressDomain, reader.ReadAddress ());
+ target.AddressDomain, reader.ReadAddress ());
TargetBinaryReader breader = target.ReadMemory (
bounds_address, 8 * Rank).GetReader ();
@@ -93,7 +93,7 @@ int GetElementSize (TargetInfo info)
TargetLocation location,
out TargetLocation dynamic_location)
{
- int element_size = GetElementSize (blob.TargetInfo);
+ int element_size = GetElementSize (blob.TargetMemoryInfo);
dynamic_location = location.GetLocationAtOffset (Type.Size);
return element_size * GetLength (target);
}
13 languages/mono/MonoClassInfo.cs
View
@@ -75,7 +75,7 @@ internal class MonoClassInfo : DebuggerMarshalByRefObject
this.KlassAddress = klass;
this.CecilType = typedef;
- int address_size = target.TargetInfo.TargetAddressSize;
+ int address_size = target.TargetMemoryInfo.TargetAddressSize;
MonoMetadataInfo info = file.MonoLanguage.MonoMetadataInfo;
reader.Offset = info.KlassByValArgOffset;
@@ -100,7 +100,7 @@ void get_field_offsets (TargetMemoryAccess target)
if (field_offsets != null)
return;
- int address_size = target.TargetInfo.TargetAddressSize;
+ int address_size = target.TargetMemoryInfo.TargetAddressSize;
MonoMetadataInfo metadata = SymbolFile.MonoLanguage.MonoMetadataInfo;
TargetAddress field_info = target.ReadAddress (
@@ -135,7 +135,7 @@ void get_field_offsets (TargetMemoryAccess target)
TargetType type = field_types [field.Position];
if (!ClassType.IsByRef)
- offset -= 2 * target.TargetInfo.TargetAddressSize;
+ offset -= 2 * target.TargetMemoryInfo.TargetAddressSize;
TargetLocation field_loc = location.GetLocationAtOffset (offset);
if (type.IsByRef)
@@ -156,7 +156,7 @@ void get_field_offsets (TargetMemoryAccess target)
TargetType type = field_types [field.Position];
if (!ClassType.IsByRef)
- offset -= 2 * target.TargetInfo.TargetAddressSize;
+ offset -= 2 * target.TargetMemoryInfo.TargetAddressSize;
TargetLocation field_loc = location.GetLocationAtOffset (offset);
if (type.IsByRef)
@@ -211,7 +211,7 @@ void get_methods (TargetMemoryAccess target)
if (methods != null)
return;
- int address_size = target.TargetInfo.TargetAddressSize;
+ int address_size = target.TargetMemoryInfo.TargetAddressSize;
MonoMetadataInfo metadata = SymbolFile.MonoLanguage.MonoMetadataInfo;
TargetAddress method_info = target.ReadAddress (
@@ -222,7 +222,8 @@ void get_methods (TargetMemoryAccess target)
TargetBlob blob = target.ReadMemory (method_info, method_count * address_size);
methods = new Hashtable ();
- TargetReader method_reader = new TargetReader (blob.Contents, target.TargetInfo);
+ TargetReader method_reader = new TargetReader (
+ blob.Contents, target.TargetMemoryInfo);
for (int i = 0; i < method_count; i++) {
TargetAddress address = method_reader.ReadAddress ();
2  languages/mono/MonoClassType.cs
View
@@ -461,7 +461,7 @@ internal MonoClassObject GetCurrentObject (TargetMemoryAccess target, TargetLoca
if (IsByRef && !current.IsByRef) // Unbox
location = location.GetLocationAtOffset (
- 2 * target.TargetInfo.TargetAddressSize);
+ 2 * target.TargetMemoryInfo.TargetAddressSize);
return (MonoClassObject) current.GetObject (target, location);
}
2  languages/mono/MonoFunctionType.cs
View
@@ -130,7 +130,7 @@ internal static string GetMethodName (Cecil.MethodDefinition mdef)
}
public override int Size {
- get { return klass.File.TargetInfo.TargetAddressSize; }
+ get { return klass.File.TargetMemoryInfo.TargetAddressSize; }
}
public override bool HasSourceCode {
6 languages/mono/MonoFundamentalType.cs
View
@@ -25,7 +25,7 @@ internal class MonoFundamentalType : TargetFundamentalType
MonoFundamentalType fundamental;
int offset;
- int address_size = memory.TargetInfo.TargetAddressSize;
+ int address_size = memory.TargetMemoryInfo.TargetAddressSize;
MonoMetadataInfo metadata = corlib.MonoLanguage.MonoMetadataInfo;
switch (kind) {
@@ -117,14 +117,14 @@ internal class MonoFundamentalType : TargetFundamentalType
offset = metadata.MonoDefaultsIntOffset;
fundamental = new MonoFundamentalType (
corlib, corlib.ModuleDefinition.Types ["System.IntPtr"],
- "System.IntPtr", kind, memory.TargetInfo.TargetAddressSize);
+ "System.IntPtr", kind, memory.TargetMemoryInfo.TargetAddressSize);
break;
case FundamentalKind.UIntPtr:
offset = metadata.MonoDefaultsUIntOffset;
fundamental = new MonoFundamentalType (
corlib, corlib.ModuleDefinition.Types ["System.UIntPtr"],
- "System.UIntPtr", kind, memory.TargetInfo.TargetAddressSize);
+ "System.UIntPtr", kind, memory.TargetMemoryInfo.TargetAddressSize);
break;
default:
16 languages/mono/MonoLanguageBackend.cs
View
@@ -122,7 +122,7 @@ protected MonoDataTable (TargetAddress address, TargetAddress first_chunk)
public void Read (TargetMemoryAccess memory)
{
- int header_size = 16 + memory.TargetInfo.TargetAddressSize;
+ int header_size = 16 + memory.TargetMemoryInfo.TargetAddressSize;
again:
TargetReader reader = new TargetReader (
@@ -248,7 +248,7 @@ public MonoLanguageBackend (ProcessServant process, MonoDebuggerInfo info)
}
public override TargetInfo TargetInfo {
- get { return corlib.TargetInfo; }
+ get { return corlib.TargetMemoryInfo; }
}
internal TargetAddress[] Trampolines {
@@ -377,11 +377,11 @@ void read_mono_debugger_info (TargetMemoryAccess memory)
trampolines = new TargetAddress [4];
TargetAddress address = info.MonoTrampolineCode;
trampolines [0] = memory.ReadAddress (address);
- address += memory.TargetInfo.TargetAddressSize;
+ address += memory.TargetMemoryInfo.TargetAddressSize;
trampolines [1] = memory.ReadAddress (address);
- address += memory.TargetInfo.TargetAddressSize;
+ address += memory.TargetMemoryInfo.TargetAddressSize;
trampolines [2] = memory.ReadAddress (address);
- address += 2 * memory.TargetInfo.TargetAddressSize;
+ address += 2 * memory.TargetMemoryInfo.TargetAddressSize;
trampolines [3] = memory.ReadAddress (address);
symfile_by_index = new Hashtable ();
@@ -537,7 +537,7 @@ void do_read_symbol_table (TargetMemoryAccess memory)
while (!ptr.IsNull) {
TargetAddress next_ptr = memory.ReadAddress (ptr);
TargetAddress address = memory.ReadAddress (
- ptr + memory.TargetInfo.TargetAddressSize);
+ ptr + memory.TargetMemoryInfo.TargetAddressSize);
ptr = next_ptr;
load_symfile (memory, address);
@@ -547,7 +547,7 @@ void do_read_symbol_table (TargetMemoryAccess memory)
while (!ptr.IsNull) {
TargetAddress next_ptr = memory.ReadAddress (ptr);
TargetAddress address = memory.ReadAddress (
- ptr + memory.TargetInfo.TargetAddressSize);
+ ptr + memory.TargetMemoryInfo.TargetAddressSize);
ptr = next_ptr;
add_data_table (memory, address);
@@ -556,7 +556,7 @@ void do_read_symbol_table (TargetMemoryAccess memory)
void add_data_table (TargetMemoryAccess memory, TargetAddress ptr)
{
- int table_size = 8 + 2 * memory.TargetInfo.TargetAddressSize;
+ int table_size = 8 + 2 * memory.TargetMemoryInfo.TargetAddressSize;
TargetReader reader = new TargetReader (memory.ReadMemory (ptr, table_size));
2  languages/mono/MonoObjectType.cs
View
@@ -20,7 +20,7 @@ protected MonoObjectType (MonoSymbolFile file, Cecil.TypeDefinition typedef, int
public static MonoObjectType Create (MonoSymbolFile corlib, TargetMemoryAccess memory,
TargetReader mono_defaults)
{
- int object_size = 2 * memory.TargetInfo.TargetAddressSize;
+ int object_size = 2 * memory.TargetMemoryInfo.TargetAddressSize;
MonoObjectType type = new MonoObjectType (
corlib, corlib.ModuleDefinition.Types ["System.Object"],
5 languages/mono/MonoRuntime.cs
View
@@ -60,7 +60,8 @@ internal static class MonoRuntime
TargetAddress address)
{
TargetAddress data = memory.ReadAddress (address);
- uint flags = (uint) memory.ReadInteger (address + memory.TargetInfo.TargetAddressSize);
+ uint flags = (uint) memory.ReadInteger (
+ address + memory.TargetMemoryInfo.TargetAddressSize);
MonoTypeEnum type = (MonoTypeEnum) ((flags & 0x00ff0000) >> 16);
bool byref = (int) ((flags & 0x40000000) >> 30) != 0;
@@ -132,7 +133,7 @@ internal static class MonoRuntime
case MonoTypeEnum.MONO_TYPE_ARRAY: {
TargetReader reader = new TargetReader (memory.ReadMemory (
- data, 4 * memory.TargetInfo.TargetAddressSize));
+ data, 4 * memory.TargetMemoryInfo.TargetAddressSize));
TargetAddress klass = reader.ReadAddress ();
int rank = reader.ReadByte ();
int numsizes = reader.ReadByte ();
2  languages/mono/MonoStringType.cs
View
@@ -22,7 +22,7 @@ internal class MonoStringType : MonoFundamentalType
public static MonoStringType Create (MonoSymbolFile corlib, TargetMemoryAccess memory,
TargetReader mono_defaults)
{
- int object_size = 2 * memory.TargetInfo.TargetAddressSize;
+ int object_size = 2 * memory.TargetMemoryInfo.TargetAddressSize;
MonoStringType type = new MonoStringType (
corlib, corlib.ModuleDefinition.Types ["System.String"],
21 languages/mono/MonoSymbolFile.cs
View
@@ -36,7 +36,8 @@ public VariableInfo (Architecture arch, TargetBinaryReader reader)
BeginLiveness = reader.ReadLeb128 ();
EndLiveness = reader.ReadLeb128 ();
- MonoType = new TargetAddress (arch.AddressDomain, reader.ReadAddress ());
+ MonoType = new TargetAddress (
+ reader.TargetMemoryInfo.AddressDomain, reader.ReadAddress ());
Mode = (AddressMode) (Index & AddressModeFlags);
Index = (int) ((long) Index & ~AddressModeFlags);
@@ -211,7 +212,7 @@ internal class MonoSymbolFile : SymbolFile
internal readonly string ImageFile;
internal readonly C.MonoSymbolFile File;
internal readonly ThreadManager ThreadManager;
- internal readonly TargetInfo TargetInfo;
+ internal readonly TargetMemoryInfo TargetMemoryInfo;
internal readonly MonoLanguageBackend MonoLanguage;
internal readonly Architecture Architecture;
protected readonly ProcessServant process;
@@ -233,14 +234,14 @@ internal class MonoSymbolFile : SymbolFile
TargetMemoryAccess memory, TargetAddress address)
{
this.MonoLanguage = language;
- this.TargetInfo = memory.TargetInfo;
+ this.TargetMemoryInfo = memory.TargetMemoryInfo;
this.Architecture = memory.Architecture;
this.process = process;
ThreadManager = process.ThreadManager;
- int address_size = TargetInfo.TargetAddressSize;
- int int_size = TargetInfo.TargetIntegerSize;
+ int address_size = TargetMemoryInfo.TargetAddressSize;
+ int int_size = TargetMemoryInfo.TargetIntegerSize;
ranges = ArrayList.Synchronized (new ArrayList ());
range_hash = Hashtable.Synchronized (new Hashtable ());
@@ -691,8 +692,8 @@ protected MonoMethod GetMonoMethod (MethodHashEntry hash, int index, byte[] cont
}
if (!method.IsLoaded) {
- TargetBinaryReader reader = new TargetBinaryReader (contents, TargetInfo);
- method.Load (reader, TargetInfo.AddressDomain);
+ TargetBinaryReader reader = new TargetBinaryReader (contents, TargetMemoryInfo);
+ method.Load (reader, TargetMemoryInfo.AddressDomain);
}
return method;
@@ -708,8 +709,8 @@ protected MonoMethod GetMonoMethod (MethodHashEntry hash, int index, byte[] cont
}
if (!method.IsLoaded) {
- TargetBinaryReader reader = new TargetBinaryReader (contents, TargetInfo);
- method.Load (reader, TargetInfo.AddressDomain);
+ TargetBinaryReader reader = new TargetBinaryReader (contents, TargetMemoryInfo);
+ method.Load (reader, TargetMemoryInfo.AddressDomain);
}
return method;
@@ -1386,7 +1387,7 @@ private class RangeEntry : SymbolRangeEntry
WrapperEntry wrapper = null;
if (!wrapper_data.IsNull) {
- int wrapper_size = 4 + 3 * memory.TargetInfo.TargetAddressSize;
+ int wrapper_size = 4 + 3 * memory.TargetMemoryInfo.TargetAddressSize;
TargetReader wrapper_reader = new TargetReader (
memory.ReadMemory (wrapper_data, wrapper_size));
10 languages/mono/MonoVariableLocation.cs
View
@@ -94,7 +94,7 @@ internal override TargetBlob ReadMemory (TargetMemoryAccess target, int size)
else
throw new ArgumentException ();
- return new TargetBlob (buffer, target.TargetInfo);
+ return new TargetBlob (buffer, target.TargetMemoryInfo);
}
internal override void WriteBuffer (TargetAccess target, byte[] data)
@@ -109,10 +109,10 @@ internal override void WriteBuffer (TargetAccess target, byte[] data)
long contents;
- if (data.Length > target.TargetInfo.TargetIntegerSize)
+ if (data.Length > target.TargetMemoryInfo.TargetIntegerSize)
throw new InternalError ();
- if (data.Length < target.TargetInfo.TargetIntegerSize) {
+ if (data.Length < target.TargetMemoryInfo.TargetIntegerSize) {
switch (data.Length) {
case 1: contents = data[0]; break;
case 2: contents = BitConverter.ToInt16 (data, 0); break;
@@ -121,9 +121,9 @@ internal override void WriteBuffer (TargetAccess target, byte[] data)
throw new InternalError ();
}
}
- else if (target.TargetInfo.TargetIntegerSize == 4)
+ else if (target.TargetMemoryInfo.TargetIntegerSize == 4)
contents = BitConverter.ToInt32 (data, 0);
- else if (target.TargetInfo.TargetIntegerSize == 8)
+ else if (target.TargetMemoryInfo.TargetIntegerSize == 8)
contents = BitConverter.ToInt64 (data, 0);
else
throw new InternalError ();
Please sign in to comment.
Something went wrong with that request. Please try again.