Author: martin
Date: 2005-10-11 11:03:10 -0400 (Tue, 11 Oct 2005)
New Revision: 51577

Removed:
   trunk/debugger/classes/SimpleSymbolTableCollection.cs
Modified:
   trunk/debugger/ChangeLog
   trunk/debugger/arch/Bfd.cs
   trunk/debugger/arch/BfdDisassembler.cs
   trunk/debugger/arch/Disassembler.cs
   trunk/debugger/backends/Process.cs
   trunk/debugger/backends/SingleSteppingEngine.cs
   trunk/debugger/classes/Backtrace.cs
   trunk/debugger/classes/Module.cs
   trunk/debugger/classes/StackFrame.cs
   trunk/debugger/classes/SymbolTableManager.cs
   trunk/debugger/frontend/Command.cs
   trunk/debugger/interfaces/ISymbolTable.cs
   trunk/debugger/languages/mono/MonoSymbolFile.cs
Log:
2005-10-11  Martin Baulig  <[EMAIL PROTECTED]>

        * interfaces/ISymbolTable.cs (ISimpleSymbolTable): Removed.

        * arch/Disassembler.cs (Disassembler.SymbolTable): Removed.

        * classes/SimpleSymbolTableCollection.cs: Removed.

        * classes/Module.cs (Module.SimpleSymbolTable): Removed.
        (Module.SimpleLookup): New public abstract method.

        * classes/SymbolTableManager.cs
        (SymbolTableManager.Lookup): New public method.
        (SymbolTableManager.SimpleLookup): New public method.
        (SymbolTableManager.SimpleSymbolTable): Removed.

        * backends/Process.cs
        (Process.SimpleLookup): Made this public.
        (Process.Lookup): New public method.



Modified: trunk/debugger/ChangeLog
===================================================================
--- trunk/debugger/ChangeLog    2005-10-11 14:23:31 UTC (rev 51576)
+++ trunk/debugger/ChangeLog    2005-10-11 15:03:10 UTC (rev 51577)
@@ -1,5 +1,25 @@
 2005-10-11  Martin Baulig  <[EMAIL PROTECTED]>
 
+       * interfaces/ISymbolTable.cs (ISimpleSymbolTable): Removed.
+
+       * arch/Disassembler.cs (Disassembler.SymbolTable): Removed.
+
+       * classes/SimpleSymbolTableCollection.cs: Removed.
+
+       * classes/Module.cs (Module.SimpleSymbolTable): Removed.
+       (Module.SimpleLookup): New public abstract method.
+
+       * classes/SymbolTableManager.cs
+       (SymbolTableManager.Lookup): New public method.
+       (SymbolTableManager.SimpleLookup): New public method.
+       (SymbolTableManager.SimpleSymbolTable): Removed.
+
+       * backends/Process.cs
+       (Process.SimpleLookup): Made this public.
+       (Process.Lookup): New public method.
+
+2005-10-11  Martin Baulig  <[EMAIL PROTECTED]>
+
        * arch/Disassembler.cs
        (Disassembler): New internal abstract class; replaces the
        `IDisassembler' interface.

Modified: trunk/debugger/arch/Bfd.cs
===================================================================
--- trunk/debugger/arch/Bfd.cs  2005-10-11 14:23:31 UTC (rev 51576)
+++ trunk/debugger/arch/Bfd.cs  2005-10-11 15:03:10 UTC (rev 51577)
@@ -30,7 +30,7 @@
                Hashtable load_handlers;
                Hashtable symbols;
                ArrayList simple_symbols;
-               ISimpleSymbolTable simple_symtab;
+               BfdSymbolTable simple_symtab;
                DwarfReader dwarf;
                DwarfFrameReader frame_reader, eh_frame_reader;
                bool dwarf_loaded;
@@ -235,7 +235,7 @@
                                        "Symbol file {0} has unknown target 
architecture {1}",
                                        filename, target);
 
-                       entry_point = SimpleLookup ("main");
+                       entry_point = this ["main"];
 
                        backend.ModuleManager.AddModule (this);
 
@@ -525,12 +525,6 @@
                        }
                }
 
-               public override ISimpleSymbolTable SimpleSymbolTable {
-                       get {
-                               return simple_symtab;
-                       }
-               }
-
                public override Language Language {
                        get {
                                return container.NativeLanguage;
@@ -569,9 +563,12 @@
                        }
                }
 
-               public override TargetAddress SimpleLookup (string name)
+               public override Symbol SimpleLookup (TargetAddress address, 
bool exact_match)
                {
-                       return this [name];
+                       if (simple_symtab != null)
+                               return simple_symtab.SimpleLookup (address, 
exact_match);
+
+                       return null;
                }
 
                public TargetAddress EntryPoint {
@@ -658,13 +655,14 @@
                        base.OnModuleChangedEvent ();
                }
 
-               public BfdDisassembler GetDisassembler (ITargetMemoryAccess 
memory)
+               internal BfdDisassembler GetDisassembler (ITargetMemoryAccess 
memory)
                {
                        IntPtr dis = disassembler (bfd);
 
                        IntPtr info = bfd_glue_init_disassembler (bfd);
 
-                       return new BfdDisassembler (memory, dis, info);
+                       return new BfdDisassembler (
+                               backend.SymbolTableManager, memory, dis, info);
                }
 
                public TargetAddress this [string name] {
@@ -1083,7 +1081,7 @@
                // The BFD symbol table.
                //
 
-               private class BfdSymbolTable : ISimpleSymbolTable
+               private class BfdSymbolTable
                {
                        Bfd bfd;
                        Symbol[] list;

Modified: trunk/debugger/arch/BfdDisassembler.cs
===================================================================
--- trunk/debugger/arch/BfdDisassembler.cs      2005-10-11 14:23:31 UTC (rev 
51576)
+++ trunk/debugger/arch/BfdDisassembler.cs      2005-10-11 15:03:10 UTC (rev 
51577)
@@ -15,7 +15,7 @@
                IntPtr info;
 
                ITargetMemoryAccess memory;
-               ISimpleSymbolTable symbol_table;
+               SymbolTableManager symtab_manager;
 
                [DllImport("monodebuggerserver")]
                extern static int bfd_glue_disassemble_insn (IntPtr dis, IntPtr 
info, long address);
@@ -30,11 +30,13 @@
                OutputHandler output_handler;
                PrintAddressHandler print_handler;
 
-               internal BfdDisassembler (ITargetMemoryAccess memory, IntPtr 
dis, IntPtr info)
+               internal BfdDisassembler (SymbolTableManager symtab_manager,
+                                         ITargetMemoryAccess memory, IntPtr 
dis, IntPtr info)
                {
                        this.dis = dis;
                        this.info = info;
                        this.memory = memory;
+                       this.symtab_manager = symtab_manager;
 
                        read_handler = new ReadMemoryHandler (read_memory_func);
                        output_handler = new OutputHandler (output_func);
@@ -78,11 +80,6 @@
 
                void print_address_func (long address)
                {
-                       if (symbol_table == null) {
-                               output_func (address);
-                               return;
-                       }
-
                        TargetAddress maddress = new TargetAddress 
(memory.GlobalAddressDomain, address);
 
                        if (current_method != null) {
@@ -98,7 +95,7 @@
                                }
                        }
 
-                       Symbol name = symbol_table.SimpleLookup (maddress, 
false);
+                       Symbol name = symtab_manager.SimpleLookup (maddress, 
false);
 
                        if (name == null)
                                output_func (address);
@@ -106,16 +103,6 @@
                                output_func (String.Format ("0x{0:x}:{1}", 
address, name.ToString ()));
                }
 
-               internal override ISimpleSymbolTable SymbolTable {
-                       get {
-                               return symbol_table;
-                       }
-
-                       set {
-                               symbol_table = value;
-                       }
-               }
-
                public override int GetInstructionSize (TargetAddress location)
                {
                        memory_exception = null;
@@ -178,8 +165,7 @@
                                }
 
                                Symbol label = null;
-                               if (SymbolTable != null)
-                                       label = SymbolTable.SimpleLookup 
(address, true);
+                               label = symtab_manager.SimpleLookup (address, 
true);
 
                                string label_name = null;
                                if (label != null)

Modified: trunk/debugger/arch/Disassembler.cs
===================================================================
--- trunk/debugger/arch/Disassembler.cs 2005-10-11 14:23:31 UTC (rev 51576)
+++ trunk/debugger/arch/Disassembler.cs 2005-10-11 15:03:10 UTC (rev 51577)
@@ -21,12 +21,5 @@
                // </summary>
                public abstract AssemblerLine DisassembleInstruction (Method 
method,
                                                                      
TargetAddress address);
-
-               // <summary>
-               //   The symbol table the disassembler uses to display symbols.
-               // </summary>
-               internal abstract ISimpleSymbolTable SymbolTable {
-                       get; set;
-               }
        }
 }

Modified: trunk/debugger/backends/Process.cs
===================================================================
--- trunk/debugger/backends/Process.cs  2005-10-11 14:23:31 UTC (rev 51576)
+++ trunk/debugger/backends/Process.cs  2005-10-11 15:03:10 UTC (rev 51577)
@@ -29,6 +29,8 @@
                        this.manager = engine.ThreadManager;
                        this.backend = manager.Debugger;
 
+                       this.symtab_manager = backend.SymbolTableManager;
+
                        this.pid = engine.PID;
                        this.tid = engine.TID;
 
@@ -45,6 +47,7 @@
                Debugger backend;
                ThreadManager manager;
                DebuggerManager debugger_manager;
+               SymbolTableManager symtab_manager;
                ManualResetEvent operation_completed_event;
                TargetState target_state = TargetState.NO_TARGET;
                ITargetInfo target_info;
@@ -237,8 +240,7 @@
                        Backtrace bt = new Backtrace (
                                this, engine.Architecture, CurrentFrame);
                        bt.GetBacktrace (
-                               target_access, engine.Architecture, 
engine.SymbolTable,
-                               SimpleSymbolTable, stack_pointer);
+                               target_access, engine.Architecture, 
stack_pointer);
                        return bt;
                }
 
@@ -260,12 +262,18 @@
                        return engine.GetMemoryMaps ();
                }
 
-               protected Symbol SimpleLookup (TargetAddress address, bool 
exact_match)
+               public Method Lookup (TargetAddress address)
                {
                        check_engine ();
-                       return engine.SimpleLookup (address, exact_match);
+                       return symtab_manager.Lookup (address);
                }
 
+               public Symbol SimpleLookup (TargetAddress address, bool 
exact_match)
+               {
+                       check_engine ();
+                       return symtab_manager.SimpleLookup (address, 
exact_match);
+               }
+
                // <summary>
                //   The current method  May only be used when the engine is 
stopped
                //   (State == TargetState.STOPPED).  The single stepping engine
@@ -483,13 +491,6 @@
                                engine.RemoveEventHandler (index);
                }
 
-               public ISimpleSymbolTable SimpleSymbolTable {
-                       get {
-                               check_engine ();
-                               return engine.SimpleSymbolTable;
-                       }
-               }
-
                public string PrintObject (Style style, TargetObject obj, 
DisplayFormat format)
                {
                        check_engine ();

Modified: trunk/debugger/backends/SingleSteppingEngine.cs
===================================================================
--- trunk/debugger/backends/SingleSteppingEngine.cs     2005-10-11 14:23:31 UTC 
(rev 51576)
+++ trunk/debugger/backends/SingleSteppingEngine.cs     2005-10-11 15:03:10 UTC 
(rev 51577)
@@ -136,13 +136,6 @@
                        arch = inferior.Architecture;
                        disassembler = inferior.Disassembler;
 
-                       disassembler.SymbolTable = 
inferior.Debugger.SymbolTableManager.SimpleSymbolTable;
-                       current_simple_symtab = 
inferior.Debugger.SymbolTableManager.SimpleSymbolTable;
-                       current_symtab = 
inferior.Debugger.SymbolTableManager.SymbolTable;
-
-                       
inferior.Debugger.SymbolTableManager.SymbolTableChangedEvent +=
-                               new SymbolTableManager.SymbolTableHandler 
(update_symtabs);
-
                        exception_handlers = new Hashtable ();
                }
 
@@ -551,56 +544,14 @@
                        operation.Execute (this);
                }
 
-               void update_symtabs (object sender, ISymbolTable symbol_table,
-                                    ISimpleSymbolTable simple_symtab)
+               protected Method Lookup (TargetAddress address)
                {
-                       disassembler.SymbolTable = simple_symtab;
-                       current_simple_symtab = simple_symtab;
-                       current_symtab = symbol_table;
-               }
-
-               public Method Lookup (TargetAddress address)
-               {
                        inferior.Debugger.UpdateSymbolTable (inferior);
 
-                       if (current_symtab == null)
-                               return null;
-
-                       return current_symtab.Lookup (address);
+                       return inferior.Debugger.SymbolTableManager.Lookup 
(address);
                }
 
-               public Symbol SimpleLookup (TargetAddress address, bool 
exact_match)
-               {
-                       if (current_simple_symtab == null)
-                               return null;
-
-                       return current_simple_symtab.SimpleLookup (address, 
exact_match);
-               }
-
 #region public properties
-               public ISimpleSymbolTable SimpleSymbolTable {
-                       get {
-                               check_inferior ();
-                               lock (disassembler) {
-                                       return disassembler.SymbolTable;
-                               }
-                       }
-
-                       set {
-                               check_inferior ();
-                               lock (disassembler) {
-                                       disassembler.SymbolTable = value;
-                               }
-                       }
-               }
-
-               public ISymbolTable SymbolTable {
-                       get {
-                               check_inferior ();
-                               return current_symtab;
-                       }
-               }
-
                internal TargetAccess TargetAccess {
                        get { return target_access; }
                }
@@ -932,8 +883,7 @@
                                SimpleStackFrame simple = new SimpleStackFrame (
                                        iframe, registers, 0);
                                current_frame = StackFrame.CreateFrame (
-                                       process, target_access, simple, 
current_symtab,
-                                       current_simple_symtab);
+                                       process, target_access, simple);
                        }
 
                        return null;
@@ -1092,9 +1042,7 @@
 
                        if (compile.IsNull) {
                                Method method = null;
-                               if (current_symtab != null) {
-                                       method = Lookup (trampoline);
-                               }
+                               method = Lookup (trampoline);
                                if (!MethodHasSource (method)) {
                                        do_next_native ();
                                        return;
@@ -1401,8 +1349,7 @@
                        current_backtrace = new Backtrace (
                                process, arch, current_frame, 
main_method_retaddr, max_frames);
 
-                       current_backtrace.GetBacktrace (
-                               target_access, arch, current_symtab, 
current_simple_symtab);
+                       current_backtrace.GetBacktrace (target_access, arch);
 
                        return current_backtrace;
                }
@@ -1607,8 +1554,6 @@
                Architecture arch;
                Disassembler disassembler;
                ProcessStart start;
-               ISymbolTable current_symtab;
-               ISimpleSymbolTable current_simple_symtab;
                Hashtable exception_handlers;
                bool engine_stopped;
                ManualResetEvent engine_stopped_event;

Modified: trunk/debugger/classes/Backtrace.cs
===================================================================
--- trunk/debugger/classes/Backtrace.cs 2005-10-11 14:23:31 UTC (rev 51576)
+++ trunk/debugger/classes/Backtrace.cs 2005-10-11 15:03:10 UTC (rev 51577)
@@ -46,17 +46,15 @@
 
                public event ObjectInvalidHandler BacktraceInvalidEvent;
 
-               public void GetBacktrace (TargetAccess target, Architecture 
arch,
-                                         ISymbolTable symtab, 
ISimpleSymbolTable simple)
+               public void GetBacktrace (TargetAccess target, Architecture 
arch)
                {
-                       while (TryUnwind (target, arch, symtab, simple)) {
+                       while (TryUnwind (target, arch)) {
                                if ((max_frames != -1) && (frames.Count > 
max_frames))
                                        break;
                        }
                }
 
                public void GetBacktrace (TargetAccess target, Architecture 
arch,
-                                         ISymbolTable symtab, 
ISimpleSymbolTable simple,
                                          TargetAddress stack)
                {
                        SimpleStackFrame new_frame = arch.UnwindStack (
@@ -65,16 +63,15 @@
                                return;
 
                        StackFrame frame = StackFrame.CreateFrame (
-                               last_frame.Process, target, new_frame, symtab, 
simple);
+                               last_frame.Process, target, new_frame);
 
                        frames.Add (frame);
                        last_frame = frame;
 
-                       GetBacktrace (target, arch, symtab, simple);
+                       GetBacktrace (target, arch);
                }
 
-               public bool TryUnwind (TargetAccess target, Architecture arch,
-                                      ISymbolTable symtab, ISimpleSymbolTable 
simple_symtab)
+               public bool TryUnwind (TargetAccess target, Architecture arch)
                {
                        if (finished)
                                return false;
@@ -94,7 +91,7 @@
                                return false;
 
                        StackFrame frame = StackFrame.CreateFrame (
-                               last_frame.Process, target, new_frame, symtab, 
simple_symtab);
+                               last_frame.Process, target, new_frame);
 
                        frames.Add (frame);
                        last_frame = frame;

Modified: trunk/debugger/classes/Module.cs
===================================================================
--- trunk/debugger/classes/Module.cs    2005-10-11 14:23:31 UTC (rev 51576)
+++ trunk/debugger/classes/Module.cs    2005-10-11 15:03:10 UTC (rev 51577)
@@ -217,7 +217,7 @@
                        return null;
                }
 
-               public abstract TargetAddress SimpleLookup (string name);
+               public abstract Symbol SimpleLookup (TargetAddress address, 
bool exact_match);
 
                // <summary>
                //   Returns the module's ISymbolTable which can be used to 
find a method
@@ -230,10 +230,6 @@
                        get;
                }
 
-               public abstract ISimpleSymbolTable SimpleSymbolTable {
-                       get;
-               }
-
                // <summary>
                //   Registers a delegate to be invoked when the method is 
loaded.
                //   This is an expensive operation and must not be used in a 
GUI to get

Deleted: trunk/debugger/classes/SimpleSymbolTableCollection.cs
===================================================================
--- trunk/debugger/classes/SimpleSymbolTableCollection.cs       2005-10-11 
14:23:31 UTC (rev 51576)
+++ trunk/debugger/classes/SimpleSymbolTableCollection.cs       2005-10-11 
15:03:10 UTC (rev 51577)
@@ -1,64 +0,0 @@
-using System;
-using System.Collections;
-
-namespace Mono.Debugger
-{
-       public class SimpleSymbolTableCollection : MarshalByRefObject, 
ISimpleSymbolTable, ICollection
-       {
-               ArrayList symtabs = new ArrayList ();
-
-               public void AddSymbolTable (ISimpleSymbolTable symtab)
-               {
-                       if (symtab == null)
-                               return;
-                       symtabs.Add (symtab);
-               }
-
-               //
-               // ISimpleSymbolTable
-               //
-
-               Symbol ISimpleSymbolTable.SimpleLookup (TargetAddress address, 
bool exact_match)
-               {
-                       foreach (ISimpleSymbolTable symtab in symtabs) {
-                               Symbol name = symtab.SimpleLookup (address, 
exact_match);
-                               if (name != null)
-                                       return name;
-                       }
-
-                       return null;
-               }
-
-               //
-               // ICollection
-               //
-
-               int ICollection.Count {
-                       get {
-                               return symtabs.Count;
-                       }
-               }
-
-               bool ICollection.IsSynchronized {
-                       get {
-                               return false;
-                       }
-               }
-
-               object ICollection.SyncRoot {
-                       get {
-                               throw new NotSupportedException ();
-                       }
-               }
-
-               void ICollection.CopyTo (Array dest, int dest_idx)
-               {
-                       symtabs.CopyTo (dest, dest_idx);
-               }
-
-               IEnumerator IEnumerable.GetEnumerator ()
-               {
-                       return symtabs.GetEnumerator ();
-               }
-       }
-}

Modified: trunk/debugger/classes/StackFrame.cs
===================================================================
--- trunk/debugger/classes/StackFrame.cs        2005-10-11 14:23:31 UTC (rev 
51576)
+++ trunk/debugger/classes/StackFrame.cs        2005-10-11 15:03:10 UTC (rev 
51577)
@@ -238,8 +238,7 @@
                }
 
                internal static StackFrame CreateFrame (Process process, 
TargetAccess target,
-                                                       SimpleStackFrame simple,
-                                                       Method method)
+                                                       SimpleStackFrame 
simple, Method method)
                {
                        SourceAddress source = null;
                        if ((method != null) && method.HasSource)
@@ -255,19 +254,15 @@
                }
 
                internal static StackFrame CreateFrame (Process process, 
TargetAccess target,
-                                                       SimpleStackFrame simple,
-                                                       ISymbolTable symtab,
-                                                       ISimpleSymbolTable 
simple_symtab)
+                                                       SimpleStackFrame simple)
                {
                        if (simple.Address.IsNull)
                                return new StackFrame (process, target, simple, 
null, null);
 
                        Method method = null;
-                       if (symtab != null) {
-                               try {
-                                       method = symtab.Lookup (simple.Address);
-                               } catch {
-                               }
+                       try {
+                               method = process.Lookup (simple.Address);
+                       } catch {
                        }
                        if (method != null) {
                                SourceAddress source = null;
@@ -276,12 +271,9 @@
                                return new StackFrame (process, target, simple, 
method, source);
                        }
 
-                       if (simple_symtab == null)
-                               return new StackFrame (process, target, simple, 
null, null);
-
                        Symbol name;
                        try {
-                               name = simple_symtab.SimpleLookup 
(simple.Address, false);
+                               name = process.SimpleLookup (simple.Address, 
false);
                        } catch {
                                name = null;
                        }

Modified: trunk/debugger/classes/SymbolTableManager.cs
===================================================================
--- trunk/debugger/classes/SymbolTableManager.cs        2005-10-11 14:23:31 UTC 
(rev 51576)
+++ trunk/debugger/classes/SymbolTableManager.cs        2005-10-11 15:03:10 UTC 
(rev 51577)
@@ -8,7 +8,7 @@
        // <summary>
        //   This class maintains the debugger's symbol tables.
        // </summary>
-       public class SymbolTableManager : IDisposable
+       public class SymbolTableManager : MarshalByRefObject, IDisposable
        {
                bool symtab_thread_exit;
 
@@ -71,8 +71,7 @@
                        }
                }
 
-               public delegate void SymbolTableHandler (object sender, 
ISymbolTable symbol_table,
-                                                        ISimpleSymbolTable 
simple_symtab);
+               public delegate void SymbolTableHandler (object sender, 
ISymbolTable symbol_table);
                public delegate void ModuleHandler (object sender, Module[] 
modules);
 
                // <summary>
@@ -95,20 +94,6 @@
                        }
                }
 
-               // <summary>
-               //   The current symbol tables.  This property may change at 
any time, so
-               //   you should use the SymbolTableChangedEvent to get a 
notification.
-               // </summary>
-               public ISimpleSymbolTable SimpleSymbolTable {
-                       get {
-                               if (symtab_thread != null)
-                                       symtabs_loaded_event.WaitOne ();
-                               lock (this) {
-                                       return current_simple_symtab;
-                               }
-                       }
-               }
-
                public void Wait ()
                {
                        if (symtab_thread != null) {
@@ -136,12 +121,34 @@
                        }
                }
 
+               public Method Lookup (TargetAddress address)
+               {
+                       return SymbolTable.Lookup (address);
+               }
+
+               public Symbol SimpleLookup (TargetAddress address, bool 
exact_match)
+               {
+                       if (symtab_thread != null) {
+                               symtabs_loaded_event.WaitOne ();
+                               modules_loaded_event.WaitOne ();
+                       }
+
+                       lock (this) {
+                               foreach (Module module in current_modules) {
+                                       Symbol name = module.SimpleLookup 
(address, exact_match);
+                                       if (name != null)
+                                               return name;
+                               }
+
+                               return null;
+                       }
+               }
+
                protected virtual void OnSymbolTableChanged ()
                {
                        lock (this) {
                                if (SymbolTableChangedEvent != null)
-                                       SymbolTableChangedEvent (
-                                               this, current_symtab, 
current_simple_symtab);
+                                       SymbolTableChangedEvent (this, 
current_symtab);
                        }
                }
 
@@ -158,7 +165,6 @@
                //
                ICollection new_modules = null;
                ISymbolTable current_symtab = null;
-               ISimpleSymbolTable current_simple_symtab = null;
                Module[] current_modules = null;
 
                // <summary>
@@ -211,12 +217,7 @@
                                SymbolTableCollection symtabs = new 
SymbolTableCollection ();
                                symtabs.Lock ();
 
-                               SimpleSymbolTableCollection simple_syms = new 
SimpleSymbolTableCollection ();
-
                                foreach (Module module in my_new_modules) {
-                                       if (module.IsLoaded)
-                                               simple_syms.AddSymbolTable 
(module.SimpleSymbolTable);
-
                                        if (!module.SymbolsLoaded || 
!module.LoadSymbols)
                                                continue;
 
@@ -228,7 +229,6 @@
 
                                lock (this) {
                                        current_symtab = symtabs;
-                                       current_simple_symtab = simple_syms;
                                        // We need to clear this event as soon 
as we're done updating
                                        // the symbol tables since the main 
thread may be waiting in
                                        // the `SymbolTable' accessor.

Modified: trunk/debugger/frontend/Command.cs
===================================================================
--- trunk/debugger/frontend/Command.cs  2005-10-11 14:23:31 UTC (rev 51576)
+++ trunk/debugger/frontend/Command.cs  2005-10-11 15:03:10 UTC (rev 51577)
@@ -2179,14 +2179,8 @@
 
                        TargetAddress address = pexpr.EvaluateAddress (context);
                        ProcessHandle process = new_context.CurrentProcess;
-                       ISimpleSymbolTable symtab = 
process.Process.SimpleSymbolTable;
-                       if (symtab == null) {
-                               context.Print (
-                                       "Cannot lookup address {0}: no symbol 
table loaded");
-                               return;
-                       }
 
-                       Symbol symbol = symtab.SimpleLookup (address, false);
+                       Symbol symbol = process.Process.SimpleLookup (address, 
false);
                        if (symbol == null)
                                context.Print ("No method contains address 
{0}.", address);
                        else

Modified: trunk/debugger/interfaces/ISymbolTable.cs
===================================================================
--- trunk/debugger/interfaces/ISymbolTable.cs   2005-10-11 14:23:31 UTC (rev 
51576)
+++ trunk/debugger/interfaces/ISymbolTable.cs   2005-10-11 15:03:10 UTC (rev 
51577)
@@ -145,13 +145,4 @@
                                return Name;
                }
        }
-
-       // <summary>
-       //   This is used to resolve addresses to function names in backtraces. 
 Sometimes this
-       //   simple symbol table is also available if the module has no 
debugging info.
-       // </summary>
-       public interface ISimpleSymbolTable
-       {
-               Symbol SimpleLookup (TargetAddress address, bool exact_match);
-       }
 }

Modified: trunk/debugger/languages/mono/MonoSymbolFile.cs
===================================================================
--- trunk/debugger/languages/mono/MonoSymbolFile.cs     2005-10-11 14:23:31 UTC 
(rev 51576)
+++ trunk/debugger/languages/mono/MonoSymbolFile.cs     2005-10-11 15:03:10 UTC 
(rev 51577)
@@ -198,7 +198,7 @@
                }
        }
 
-       internal class MonoSymbolFile : Module, ISymbolFile, 
ISimpleSymbolTable, IDisposable
+       internal class MonoSymbolFile : Module, ISymbolFile, IDisposable
        {
                internal readonly int Index;
                internal readonly Cecil.IAssemblyDefinition Assembly;
@@ -330,10 +330,6 @@
                        get { return File != null; }
                }
 
-               public override ISimpleSymbolTable SimpleSymbolTable {
-                       get { return this; }
-               }
-
                internal void AddRangeEntry (ITargetMemoryReader reader, byte[] 
contents)
                {
                        MethodRangeEntry range = MethodRangeEntry.Create (this, 
reader, contents);
@@ -414,13 +410,8 @@
                        }
                }
 
-               public override TargetAddress SimpleLookup (string name)
+               public override Symbol SimpleLookup (TargetAddress address, 
bool exact_match)
                {
-                       return TargetAddress.Null;
-               }
-
-               public Symbol SimpleLookup (TargetAddress address, bool 
exact_match)
-               {
                        foreach (MethodRangeEntry range in ranges) {
                                if ((address < range.StartAddress) || (address 
> range.EndAddress))
                                        continue;

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to