Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fix compiler warnings.

svn path=/trunk/debugger/; revision=119025
  • Loading branch information...
commit dbe10350c76162445f104727b26dfa99c05a4a96 1 parent 74bbfe6
authored November 17, 2008
2  backend/EventQueue.cs
@@ -39,7 +39,7 @@ protected void Debug (string format, params object[] args)
39 39
 
40 40
 	internal class DebuggerMutex : DebuggerWaitHandle
41 41
 	{
42  
-		protected new IntPtr handle;
  42
+		protected IntPtr handle;
43 43
 
44 44
 		[DllImport("monodebuggerserver")]
45 45
 		static extern IntPtr mono_debugger_mutex_new ();
1  backend/Inferior.cs
@@ -26,7 +26,6 @@ internal class Inferior : TargetAccess, ITargetNotification, IDisposable
26 26
 		protected readonly ProcessStart start;
27 27
 
28 28
 		protected readonly BfdContainer bfd_container;
29  
-		protected readonly SymbolTableCollection symtab_collection;
30 29
 		protected readonly ProcessServant process;
31 30
 		protected readonly DebuggerErrorHandler error_handler;
32 31
 		protected readonly BreakpointManager breakpoint_manager;
2  backend/MonoThreadManager.cs
@@ -453,7 +453,7 @@ public static MonoDebuggerInfo Create (TargetMemoryAccess memory, TargetAddress
453 453
 					"but expected at most {1}.", version,
454 454
 					MonoDebuggerInfo.MaxDynamicVersion);
455 455
 
456  
-			int minor_version = header.ReadInt32 ();
  456
+			header.ReadInt32 (); // minor version
457 457
 			header.ReadInt32 ();
458 458
 
459 459
 			int size = header.ReadInt32 ();
8  backend/ProcessStart.cs
@@ -30,7 +30,7 @@ static ProcessStart ()
30 30
 			MonoPath = Path.Combine (Path.Combine (prefix, "bin"), "mono");
31 31
 		}
32 32
 
33  
-		protected static bool IsMonoAssembly (string filename)
  33
+		static bool IsMonoAssembly (string filename)
34 34
 		{
35 35
 			try {
36 36
 				using (FileStream stream = new FileStream (filename, FileMode.Open, FileAccess.Read)) {
@@ -246,7 +246,7 @@ void add_env_path (Hashtable hash, string name, string value)
246 246
 			}
247 247
 		}
248 248
 
249  
-		protected void SetupEnvironment ()
  249
+		void SetupEnvironment ()
250 250
 		{
251 251
 			Hashtable hash = new Hashtable ();
252 252
 			AddUserEnvironment (hash);
@@ -287,7 +287,7 @@ protected void SetupEnvironment ()
287 287
 		}
288 288
 
289 289
 
290  
-		protected string GetFullPath (string path)
  290
+		string GetFullPath (string path)
291 291
 		{
292 292
 			string full_path;
293 293
 			if (path.StartsWith ("./"))
@@ -302,7 +302,7 @@ protected string GetFullPath (string path)
302 302
 			return full_path;
303 303
 		}
304 304
 
305  
-		protected string print_argv (string[] argv)
  305
+		string print_argv (string[] argv)
306 306
 		{
307 307
 			if (argv == null)
308 308
 				return "null";
8  backend/SingleSteppingEngine.cs
@@ -95,7 +95,6 @@ internal class SingleSteppingEngine : ThreadServant
95 95
 		{
96 96
 			inferior = Inferior.CreateInferior (manager, process, start);
97 97
 
98  
-			is_main = true;
99 98
 			if (start.PID != 0) {
100 99
 				this.pid = start.PID;
101 100
 				inferior.Attach (pid);
@@ -285,7 +284,6 @@ protected void ProcessChildEvent (Inferior.ChildEvent cevent)
285 284
 					Report.Debug (DebugFlags.SSE, "{0} back in managed land: {1}",
286 285
 						      this, inferior.CurrentFrame);
287 286
 
288  
-					Inferior.StackFrame sframe = inferior.GetCurrentFrame ();
289 287
 					Method method = Lookup (inferior.CurrentFrame);
290 288
 
291 289
 					bool is_managed = (method != null) && method.Module.Language.IsManaged;
@@ -2144,7 +2142,7 @@ protected override void DoDispose ()
2144 2142
 		Hashtable exception_handlers;
2145 2143
 		bool engine_stopped;
2146 2144
 		bool stop_requested;
2147  
-		bool is_main, reached_main;
  2145
+		bool reached_main;
2148 2146
 		bool killed, dead;
2149 2147
 		long tid;
2150 2148
 		int pid;
@@ -2451,13 +2449,11 @@ public OperationStart (SingleSteppingEngine sse, CommandResult result)
2451 2449
 		protected override void DoExecute ()
2452 2450
 		{ }
2453 2451
 
2454  
-		bool initialized;
2455  
-
2456 2452
 		protected override EventResult DoProcessEvent (Inferior.ChildEvent cevent,
2457 2453
 							       out TargetEventArgs args)
2458 2454
 		{
2459 2455
 			Report.Debug (DebugFlags.SSE,
2460  
-				      "{0} start: {1} {2} {3} {4}", sse, initialized,
  2456
+				      "{0} start: {1} {2} {3}", sse,
2461 2457
 				      cevent, sse.ProcessServant.IsAttached,
2462 2458
 				      inferior.CurrentFrame);
2463 2459
 
2  backend/arch/Architecture_X86_64.cs
@@ -555,7 +555,7 @@ internal override StackFrame GetLMF (ThreadServant thread, TargetMemoryAccess me
555 555
 
556 556
 			lmf_address = reader.ReadTargetAddress (); // prev
557 557
 			reader.ReadTargetAddress ();
558  
-			TargetAddress method = reader.ReadTargetAddress (); // method
  558
+			reader.ReadTargetAddress (); // method
559 559
 			TargetAddress rip = reader.ReadTargetAddress ();
560 560
 
561 561
 			if (lmf_address.IsNull)
2  backend/arch/CoreFile.cs
@@ -89,7 +89,7 @@ void read_thread_table ()
89 89
 
90 90
 				long tid = reader.ReadLongInteger ();
91 91
 				TargetAddress lmf_addr = reader.ReadAddress ();
92  
-				TargetAddress end_stack = reader.ReadAddress ();
  92
+				reader.ReadAddress (); // end stack
93 93
 
94 94
 				ptr = reader.ReadAddress ();
95 95
 
1  backend/arch/DwarfFrameReader.cs
@@ -43,7 +43,6 @@ protected CIE find_cie (long offset)
43 43
 			DwarfBinaryReader reader = new DwarfBinaryReader (bfd, blob, false);
44 44
 
45 45
 			while (reader.Position < reader.Size) {
46  
-				long original_pos = reader.Position;
47 46
 				long length = reader.ReadInitialLength ();
48 47
 				if (length == 0)
49 48
 					break;
18  backend/arch/DwarfReader.cs
@@ -116,7 +116,7 @@ internal class DwarfReader : DebuggerMarshalByRefObject
116 116
 		DwarfSymbolTable symtab;
117 117
 		ArrayList aranges;
118 118
 		Hashtable pubnames;
119  
-		Hashtable pubtypes;
  119
+		// Hashtable pubtypes;
120 120
 		TargetMemoryInfo target_info;
121 121
 
122 122
 		public DwarfReader (Bfd bfd, Module module)
@@ -160,7 +160,7 @@ public DwarfReader (Bfd bfd, Module module)
160 160
 				aranges = ArrayList.Synchronized (read_aranges ());
161 161
 				symtab = new DwarfSymbolTable (this, aranges);
162 162
 				pubnames = read_pubnames ();
163  
-				pubtypes = read_pubtypes ();
  163
+				// pubtypes = read_pubtypes ();
164 164
 			}
165 165
 
166 166
 			long offset = 0;
@@ -180,7 +180,7 @@ public void ModuleLoaded ()
180 180
 			symtab = new DwarfSymbolTable (this, aranges);
181 181
 
182 182
 			pubnames = read_pubnames ();
183  
-			pubtypes = read_pubtypes ();
  183
+			// pubtypes = read_pubtypes ();
184 184
 		}
185 185
 
186 186
 		public static bool IsSupported (Bfd bfd)
@@ -1073,9 +1073,9 @@ protected class StatementMachine
1073 1073
 				public long end_offset;
1074 1074
 
1075 1075
 				public int start_file;
1076  
-				public int start_line, end_line;
  1076
+				public int end_line;
1077 1077
 
1078  
-				int const_add_pc_range;
  1078
+				public readonly int const_add_pc_range;
1079 1079
 
1080 1080
 				public StatementMachine (LineNumberEngine engine, long offset,
1081 1081
 							 long end_offset)
@@ -2996,7 +2996,7 @@ protected abstract class DieType : Die, ITypeEntry
2996 2996
 		{
2997 2997
 			string name;
2998 2998
 			protected long offset;
2999  
-			bool resolved, ok, type_created;
  2999
+			bool resolved, type_created;
3000 3000
 			protected readonly Language language;
3001 3001
 			TargetType type;
3002 3002
 
@@ -3058,7 +3058,7 @@ protected virtual void PopulateType ()
3058 3058
 
3059 3059
 			public bool HasType {
3060 3060
 				get {
3061  
-					if (!resolved || !ok)
  3061
+					if (!resolved)
3062 3062
 						throw new InvalidOperationException ();
3063 3063
 					return type != null;
3064 3064
 				}
@@ -3542,7 +3542,7 @@ protected class DieTypedef : DieType
3542 3542
 		{
3543 3543
 			long type_offset;
3544 3544
 			DieType reference;
3545  
-			new NativeTypeAlias type;
  3545
+			NativeTypeAlias type;
3546 3546
 
3547 3547
 			public DieTypedef (DwarfBinaryReader reader, CompilationUnit comp_unit,
3548 3548
 					   long offset, AbbrevEntry abbrev)
@@ -3672,7 +3672,7 @@ protected override void ProcessAttribute (Attribute attribute)
3672 3672
 
3673 3673
 			ArrayList members;
3674 3674
 			NativeFieldInfo[] fields;
3675  
-			new NativeStructType type;
  3675
+			NativeStructType type;
3676 3676
 
3677 3677
 			public override bool IsComplete {
3678 3678
 				get { return abbrev.HasChildren; }
9  classes/AssemblerMethod.cs
@@ -34,14 +34,15 @@ public AssemblerLine (TargetAddress address, byte size, string text)
34 34
 
35 35
 	public sealed class AssemblerMethod : MethodSource
36 36
 	{
37  
-		protected readonly Method method;
38  
-		protected readonly SourceBuffer buffer;
39  
-		protected readonly int start_row, end_row;
40  
-		protected readonly AssemblerLine[] lines;
  37
+		readonly SourceBuffer buffer;
  38
+		readonly int start_row, end_row;
  39
+		readonly AssemblerLine[] lines;
  40
+		readonly Method method;
41 41
 		ArrayList addresses;
42 42
 
43 43
 		public AssemblerMethod (Method method, AssemblerLine[] lines)
44 44
 		{
  45
+			this.method = method;
45 46
 			this.lines = lines;
46 47
 			addresses = new ArrayList ();
47 48
 
2  classes/Module.cs
@@ -395,7 +395,7 @@ internal void UnLoadModule ()
395 395
 			get { return SymbolFile.HasDebuggingInfo; }
396 396
 		}
397 397
 
398  
-		protected void OnModuleChanged ()
  398
+		void OnModuleChanged ()
399 399
 		{
400 400
 			if (symfile != null)
401 401
 				symfile.OnModuleChanged ();
5  classes/SourceLocation.cs
@@ -178,7 +178,6 @@ internal class DynamicSourceLocation
178 178
 		SourceFile file;
179 179
 		MethodSource source;
180 180
 		TargetFunctionType function;
181  
-		string method;
182 181
 		int line;
183 182
 
184 183
 		public DynamicSourceLocation (MethodSource source)
@@ -221,9 +220,7 @@ internal BreakpointHandle ResolveBreakpoint (Breakpoint breakpoint)
221 220
 				return null;
222 221
 
223 222
 			if ((function == null) && (source == null)) {
224  
-				if (method != null) {
225  
-					source = module.FindMethod (method);
226  
-				} else if (file != null) {
  223
+				if (file != null) {
227 224
 					source = file.FindMethod (line);
228 225
 				} else {
229 226
 					throw new TargetException (TargetError.LocationInvalid);
10  classes/StackFrame.cs
@@ -172,7 +172,7 @@ internal Registers (Registers old_regs)
172 172
 			}
173 173
 		}
174 174
 
175  
-		protected Register[] GetRegisters (int[] indices)
  175
+		Register[] GetRegisters (int[] indices)
176 176
 		{
177 177
 			Register[] retval = new Register [indices.Length];
178 178
 			for (int i = 0; i < indices.Length; i++)
@@ -228,10 +228,10 @@ protected Register[] GetRegisters (int[] indices)
228 228
 	[Serializable]
229 229
 	public sealed class StackFrame : DebuggerMarshalByRefObject
230 230
 	{
231  
-		protected readonly TargetAddress address;
232  
-		protected readonly TargetAddress stack_pointer;
233  
-		protected readonly TargetAddress frame_address;
234  
-		protected readonly Registers registers;
  231
+		readonly TargetAddress address;
  232
+		readonly TargetAddress stack_pointer;
  233
+		readonly TargetAddress frame_address;
  234
+		readonly Registers registers;
235 235
 
236 236
 		int level;
237 237
 		Method method;
2  classes/ThreadGroup.cs
@@ -19,7 +19,7 @@ public sealed class ThreadGroup : DebuggerMarshalByRefObject
19 19
 		static ThreadGroup global = new ThreadGroup ("global");
20 20
 		static ThreadGroup system = new ThreadGroup ("system");
21 21
 
22  
-		protected ThreadGroup (string name)
  22
+		private ThreadGroup (string name)
23 23
 		{
24 24
 			this.name = name;
25 25
 			this.threads = Hashtable.Synchronized (new Hashtable ());
2  frontend/Command.cs
@@ -2176,7 +2176,6 @@ protected override object DoExecute (ScriptingContext context)
2176 2176
 
2177 2177
 		private class ShowSourcesCommand : ThreadCommand
2178 2178
 		{
2179  
-			protected string name;
2180 2179
 			protected Module[] modules;
2181 2180
 
2182 2181
 			protected override bool DoResolve (ScriptingContext context)
@@ -2220,7 +2219,6 @@ protected override object DoExecute (ScriptingContext context)
2220 2219
 
2221 2220
 		private class ShowMethodsCommand : ThreadCommand
2222 2221
 		{
2223  
-			protected string name;
2224 2222
 			protected SourceFile[] sources;
2225 2223
 
2226 2224
 			protected override bool DoResolve (ScriptingContext context)
4  languages/mono/MonoVariableLocation.cs
@@ -17,8 +17,8 @@ internal sealed class MonoVariableLocation : TargetLocation
17 17
 
18 18
 		TargetAddress address;
19 19
 
20  
-		protected MonoVariableLocation (bool is_regoffset, Register register,
21  
-						long regoffset, bool is_byref)
  20
+		MonoVariableLocation (bool is_regoffset, Register register,
  21
+				      long regoffset, bool is_byref)
22 22
 		{
23 23
 			this.is_regoffset = is_regoffset;
24 24
 			this.register = register;
2  languages/native/NativeStructType.cs
@@ -61,7 +61,7 @@ public NativeFieldInfo (TargetType type, string name, int index, int offset)
61 61
 
62 62
 	internal class NativeMethodInfo  : TargetMethodInfo
63 63
 	{
64  
-		public new readonly NativeFunctionType FunctionType;
  64
+		public readonly NativeFunctionType FunctionType;
65 65
 
66 66
 		public NativeMethodInfo (NativeFunctionType type, string name, int index)
67 67
 			: base (type, name, index, false, TargetMemberAccessibility.Public, name)
1  test/testsuite/NUnit.cs
@@ -842,7 +842,6 @@ public void AssertTypeException (Thread thread, string expression, string exp_re
842 842
 
843 843
 		public object EvaluateExpression (Thread thread, string expression)
844 844
 		{
845  
-			string text = null;
846 845
 			try {
847 846
 				ScriptingContext context = GetContext (thread);
848 847
 				object obj = EvaluateExpression (context, expression);

0 notes on commit dbe1035

Please sign in to comment.
Something went wrong with that request. Please try again.