forked from mono/debugger
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathChangeLog
17040 lines (11475 loc) · 545 KB
/
ChangeLog
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
2010-07-31 Martin Baulig <martin@ximian.com>
Welcome to GitHub :-)
2010-06-09 Martin Baulig <martin@ximian.com>
* backend/ProcessServant.cs: When attaching, compute initial
stackframe for all threads.
2010-06-07 Martin Baulig <martin@ximian.com>
* backend/server/x86-linux-ptrace.c: Use
mono_debugger_get_thread_abort_signal() instead of
mono_thread_get_abort_signal().
* backend/server/darwin-ptrace.c: Likewise.
2010-06-07 Martin Baulig <martin@ximian.com>
* configure.in: Require `mono-2', not `mono'.
2010-07-15 Martin Baulig <martin@ximian.com>
* configure.in: Support both 2.6 and trunk.
* backend/EventQueue.cs: Use the managed Monitor class instead of
glib's threading functions.
* backend/server/mutex.[ch]: Removed.
2010-03-03 Miguel de Icaza <miguel@novell.com>
* Apply patch from Priit Laes <plaes@plaes.org> to build with make -j
2010-02-23 Martin Baulig <martin@ximian.com>
* backend/SingleSteppingEngine.cs
(SSE.DoAbortInvocation): Use Thread.Abort() to abort the
invocation if we have runtime support for it.
2010-02-24 Martin Baulig <martin@ximian.com>
* frontend/Main.cs: Don't deadlock when leaving a nested
break state.
* backend/SingleSteppingEngine.cs
(SSE.ProcessEvent): On `ChildEventType.RUNTIME_INVOKE_DONE':
terminate the current operation if it's different from the rti.
* classes/Operation.cs
(OperationCommandResult.Completed): Send the result before
signalling the wait handle.
2010-02-24 Martin Baulig <martin@ximian.com>
* backend/server/x86_64-arch.c
(server_ptrace_call_method_invoke): Set correct return address to
make this work even if the stack is executable.
2010-02-23 Martin Baulig <martin@ximian.com>
* backend/SingleSteppingEngine.cs
(SSE.DoAbortInvocation): Disallow aborting if there are any
non-managed frames on the stack.
2010-02-23 Martin Baulig <martin@ximian.com>
* languages/TargetNullObject.cs: New file.
(TargetNullObject): New public class.
* languages/mono/MonoNullObject.cs: Removed.
(MonoNullObject): Removed; use `TargetNullObject' instead.
2010-02-23 Martin Baulig <martin@ximian.com>
* backend/os/DwarfReader.cs
(DwarfReader): Don't crash, if the .debug_aranges,
.debug_pubnames, .debug_pubtypes or .debug_str section is
missing.
2010-01-08 Martin Baulig <martin@ximian.com>
Fix #559045.
* languages/mono/MonoArrayType.cs
(MonoArrayType.GetElementSize): Add support for enums.
* languages/mono/MonoArrayObject.cs
(MonoArrayObject.GetDynamicSize): Use
MonoArrayTpe.GetElementSize().
2010-01-08 Martin Baulig <martin@ximian.com>
Fix #510995.
* frontend/Expression.cs
(CastExpression.DoCast): Allow `object' -> 'object'.
(Convert.ImplicitConversion): Allow `string' -> `object'.
2009-12-04 Martin Baulig <martin@ximian.com>
* backend/BreakpointHandle.cs
(FunctionBreakpointHandle): Make this class abstract.
* languages/TargetFunctionType.cs
(TargetFunctionType): Replace InsertBreakpoint() and
RemoveBreakpoint() with a new GetBreakpointHandle() API which
returns a `FunctionBreakpointHandle'.
2009-11-29 Martin Baulig <martin@ximian.com>
* classes/DebuggerConfiguration.cs
(DebuggerConfiguration.LoadConfigurationFromStream): Use
Report.Error() to report errors instead of throwing an exception.
(DebuggerConfiguration.UserNotifications): New public property.
(DebuggerConfiguration.NotifyUser_ThreadCreation): Mark as obsolete.
(DebuggerConfiguration.UserNotificationType): New public enum.
* frontend/Command.cs
(ConfigCommand): Add `user-notifications' option to modify the new
`DebuggerConfiguration.UserNotifications'.
2009-11-25 Martin Baulig <martin@ximian.com>
* classes/DebuggerConfiguration.cs
(DebuggerConfiguration.IsCLI): New public property to check
whether we're running the CLI or a GUI.
* classes/DebuggerSession.cs
(DebuggerSession.ctor): Only auto-insert the
`MainMethodBreakpoint' in the CLI.
2009-11-25 Martin Baulig <martin@ximian.com>
* classes/DebuggerSession.cs
(DebuggerSession.GetEvent): Return null if the event doesn't
exist, don't throw any exception.
* frontend/ScriptingContext.cs
(ScriptingContext.ActivatePendingBreakpoint): New internal method;
activate pending breakpoints and wait for its completion.
* frontend/Command.cs
(BreakpointDeleteCommand.ActionDone): Call it here ...
(BreakCommand.DoExecute): ... and here.
* test/testsuite/TestMethodLookup.cs: This fixes a race condition here.
2009-11-25 Martin Baulig <martin@ximian.com>
Hardware breakpoints are per-thread and not per-process; allow
having both a hardware and a regular breakpoint on the same
instruction.
* backend/server/x86_64-arch.c
(ArchInfo): Add `BreakpointManager *hw_bpm'.
(server_ptrace_current_insn_is_bpt): Check both `arch->hw_bpm' and
`handle->bpm'; we may now have both a hardware and a regular
breakpoint on the same instruction.
(lookup_breakpoint): New static function to look in both
`arch->hw_bpm' and `handle->bpm'; use this everywhere instead of
calling mono_debugger_breakpoint_manager_lookup_by_id() directly.
2009-11-25 Martin Baulig <martin@ximian.com>
Don't activate address breakpoints twice.
* classes/AddressBreakpoint.cs
(AddressBreakpoint.NeedsActivation): Overwrite and return `false'.
* frontend/Command.cs
(BreakCommand.DoExecute): Check `Breakpoint.NeedsActivation' before
calling Activate() on it.
2009-10-19 Martin Baulig <martin@ximian.com>
* backend/Inferior.cs
(Inferior.SignalInfo): Add `SIGWINCH'.
(Inferior.Has_SIGWINCH): New public property.
(Inferior.SIGWINCH): New public property.
* backend/server.h
(SignalInfo): Add `sigwinch'.
* backend/ThreadManager.cs
(ThreadManager.HandleChildEvent): Ignore `SIGWINCH'.
2009-10-19 Martin Baulig <martin@ximian.com>
Detach after exec() if we don't have permission to debug the
child; this happens if the exec()d binary is setuid/setgid.
* backend/Inferior.cs
(Inferior.ProcessEvent): Removed child_execd().
(Inferior.InitializeAfterExec): Call GetApplication() and
start.SetupApplication() here.
* backend/ProcessServant.cs
(ProcessServant.ChildExecd): Catch `TargetError.PermissionDenied'
and detach from the process; this happens when exec()ing
setuid/setgid applications.
* classes/TargetException.cs
(TargetError): Add `PermissionDenied'.
* backend/server/x86-linux-ptrace.c
(_server_ptrace_setup_inferior): Check `EACCES' and return
`COMMAND_ERROR_PERMISSION_DENIED'.
2009-10-14 Martin Baulig <martin@ximian.com>
* backend/SingleSteppingEngine.cs
(SSE.OperationMonoTrampoline): Fix bug #544935; the runtime now
supports a new trampoline notification which also gives us the
address of the callsite, so we can detect recursive invocations of
mono_generic_trampoline().
2009-11-05 Martin Baulig <martin@ximian.com>
* languages/mono/MonoLanguageBackend.cs
(MonoLanguageBackend.Notification): On `LoadModule': don't crash
if load_symfile() failed.
2009-10-08 Martin Baulig <martin@ximian.com>
* build/mdb: Use the full pathname to invoke mono.
* build/mdb-symbolreader: Likewise.
* backend/ProcessStart.cs
(ProcessStart.SetupEnvironment): Don't set `MONO_GAC_PREFIX',
`MONO_PATH', `LD_LIBRARY_PATH' and `PATH'.
2009-10-08 Martin Baulig <martin@ximian.com>
Improve follow-fork(), allow following exec() without fork()ing
first; shell scripts, for instance, use this technique.
* classes/Thread.cs
(ThreadCommandResult): Use a private `ManualResetEvent'.
* classes/Operation.cs
(OperationCommandResult): Make this class abstract.
(OperationCommandResult.Host): Make this property abstract.
(OperationCommandResult.OnExecd): New internal abstract method.
* backend/Inferior.cs
(Inferior.SetupInferior): Call GetApplication() instead of using
`start.TargetApplication'.
* backend/ProcessStart.cs
(ProcessStart.StopInMain): Add internal setter.
(ProcessStart.SetupApplication): Don't set StopInMain to false.
* backend/ProcessServant.cs
(ProcessServant.ChildForked): Set `StopInMain' to false here ...
(ProcessServant.ChildExecd): ... but not here.
(ProcessServant.ChildExecd): Don't clone the session and reuse the
`OperationCommandResult', only call OnExecd() on it to change its
`Host' if necessary.
* classes/DebuggerSession.cs
(DebuggerSession.OnProcessExecd): New internal method.
(DebuggerSession.OnProcessExited): Unload all modules if we're the
main process.
* backend/ProcessServant.cs
(ProcessServant.ProcessCommandResult): New protected class.
* backend/DebuggerServant.cs
(DebuggerServant.GlobalCommandResult): New protected class.
* test/testsuite/testnativenoforkexec.cs: New test.
* test/src/testnativenoforkexec.c: New test.
* test/testsuite/TestDontFollowFork.cs: Increase timeout.
* test/testsuite/testnativefork.cs: Remove "NotWorking".
2009-10-01 Martin Baulig <martin@ximian.com>
* classes/ProcessStart.cs
(ProcessStart.cctor): Use `BuildInfo.mono' to set `MonoPath'
instead of computing it here.
2009-09-29 Martin Baulig <martin@ximian.com>
* classes/DebuggerSession.cs
(DebuggerSession.GetPendingBreakpoints): Small fix; make this work
for native applications.
2009-09-23 Martin Baulig <martin@ximian.com>
* classes/ExpressionEvaluator.cs
(EE.EvaluationResult): Add `NotInitialized'.
* classes/Thread.cs
(RuntimeInvokeResult): Add `TargetException'.
* backend/SingleSteppingEngine.cs
(OperationRuntimeInvoke): Set 'RuntimeInvokeResult.TargetException'
on error.
2009-09-24 Martin Baulig <martin@ximian.com>
* classes/DebuggerSession.cs
(DebuggerSession.ctor): Always insert the `MainMethodBreakpoint';
we need it to correctly set the stack pointer.
* backend/SingleSteppingEngine.cs
(SSE.child_breakpoint): Set `main_retaddr' if we're the
`MainMethodBreakpoint'.
2009-09-22 Martin Baulig <martin@ximian.com>
* languages/TargetStructType.cs
(TargetStructType.IsClassInitialized): New public property.
2009-09-22 Martin Baulig <martin@ximian.com>
Fix #528160.
* backend/ThreadManager.cs
(ThreadManager.HasPendingSigstopForNewThread): New internal method.
* backend/Inferior.cs
(Inferior.InitializeThread): Call it here to see whether we
already received the SIGSTOP for the new thread.
2009-09-22 Martin Baulig <martin@ximian.com>
* frontend/ScriptingContext.cs: Some more `TargetClassType' ->
`TargetStructType'.
* frontend/Expression.cs: Likewise.
2009-09-17 Martin Baulig <martin@ximian.com>
* languages/TargetClassType.cs: Renamed `TargetClassType' into
`TargetStructType' and add a new empty `TargetClassType'.
* languages/TargetClassObject.cs: Renamed `TargetClassObject' into
`TargetStructObject' and add a new empty `TargetClassObject'.
2009-09-15 Martin Baulig <martin@ximian.com>
* backend/mono/MonoRuntime.cs: Renamed into MetadataHelper.cs.
(MonoRuntime): Renamed into `MetadataHelper'.
2009-09-15 Martin Baulig <martin@ximian.com>
* backend/mono/: Moved all the Mono Runtime code here.
* backend/MonoThreadManager.cs: Moved to backend/mono/.
* languages/mono/MonoLanguageBackend.cs: Likewise.
* languages/mono/MonoRuntime.cs: Likewise.
2009-09-15 Martin Baulig <martin@ximian.com>
* languages/TargetStructType.cs: Removed.
(TargetStructType): Moved everything into `TargetClassType'.
* languages/TargetStructObject.cs: Removed.
(TargetStructObject): Moved everything into `TargetClassObject'.
* languages/mono/MonoStructType: New file.
2009-09-08 Jonathan Chambers <joncham@gmail.com>
* backend/server/i386-arch.h: Define register access for CONTEXT on Windows.
* backend/server/server.h: Add SERVER_TYPE_WIN32.
* backend/server/x86-windows.c: Merge of work from Unity.
Unity is releasing all the sourcecode that Friedrich Dominicus has
done on the mono debugger, as part of a contracting agreement with
Unity, under the MIT-X11 license.
Joachim Ante, CTO Unity
2009-09-26 Jonathan Chambers <joncham@gmail.com>
* build/mdb.csproj: Add ExpressionParser.cs.
* build/Mono.Debugger.Frontend.csproj: Add ExpressionParser.cs.
Contributed under MIT/X11 license.
2009-08-18 Martin Baulig <martin@ximian.com>
Fix #531062; correctly handle methods in compiler-generated files.
* languages/mono/MonoSymbolFile.cs
(MonoSymbolFile.GetMethods): Use the compilation unit from the
symbol file as the method's source file.
* classes/SourceInfo.cs
(SourceFile.GetMethod): Check whether the method is in the correct
source file.
2009-08-12 Martin Baulig <martin@ximian.com>
* doc/README.breakpoints: Add documentation about the new
breakpoint API.
2009-08-06 Martin Baulig <martin@ximian.com>
* classes/DebuggerSession.cs
(DebuggerSession.ActivateEventAsync): New public method.
(DebuggerSession.DeactivateEventAsync): New public method.
2009-08-06 Martin Baulig <martin@ximian.com>
Don't require the target to be stopped to detach; allow detaching
from any target on Linux.
* backend/server/server.h
(ServerCapabilities): Add `SERVER_CAPABILITIES_CAN_DETACH_ANY'.
* backend/server/x86-linux-ptrace.c
(server_ptrace_get_capabilities): ... and add it here.
* backend/Inferior.cs
(Inferior.CanDetachAny): New public static property.
* backend/ProcessServant.cs
(ProcessServant.CanDetach): New property.
(ProcessServant.Detach): Can `CanDetach', not `IsAttach'.
* backend/SingleSteppingEngine.cs
(SSE.Detach): Don't require the target to be stopped.
* classes/Debugger.cs
(Debugger.CanDetach): New public property.
2009-08-06 Martin Baulig <martin@ximian.com>
* frontend/Command.cs:
(ConfigCommand): Add "redirect-output" here, this was missing.
2009-08-05 Martin Baulig <martin@ximian.com>
* backend/SingleSteppingEngine.cs
(SSE.ManagedCallback): If we found a managed frame, check whether
we can do all the work immediately or whether we need to start an
operation for it.
2009-08-05 Martin Baulig <martin@ximian.com>
Support removing breakpoints while the target is running.
* backend/ProcessServant.cs
(ProcessServant.ExceptionCatchPoints): Removed; the session now
maintains exception catchpoints.
* backend/SingleSteppingEngine.cs
(SSE.ActivatePendingBreakpoints): We now also handle removals.
(SSE.OperationRemoveBreakpoint): New operation to remove a managed
breakpoint.
* classes/Breakpoint.cs
(Breakpoint.NeedsActivation): New public property; event handlers
don't need any activation.
* classes/DebuggerSession.cs
(DebuggerSession.InsertExceptionCatchPoint): Exception catchpoints
don't need to be activated.
(DebuggerSession.ExceptionCatchPoints): The session now maintains
all exception catchpoints; moved here from `ProcessServant'.
(DebuggerSession.RemoveBreakpoint): Immediately remove the
breakpoint from our list, but don't actually delete it - the
target doesn't need to be stopped to call this method, the method
is queued for removal during Process.ActivatePendingBreakpoints().
* classes/Process.cs
(Process.ActivatePendingBreakpoints): Don't block, return a
`CommandResult' you can wait on.
2009-08-05 Martin Baulig <martin@ximian.com>
* backend/server/x86_64-arch.c
(find_code_buffer_slot): Return a different slot each time we're
called until we iterated over the entire buffer; it looks like
there's a very weird race condition somewhere in the kernel which
doesn't always flush the cpu's instruction cache when modifying
the current instruction and then immediately executing it.
(x86_arch_child_stopped): Return `STOP_ACTION_INTERNAL_ERROR' if
we stopped at an unexpected location inside the code buffer.
* backend/server/i386-arch.c
(find_code_buffer_slot): No idea whether we need this here as
well, but it doesn't hurt doing it here as well.
* backend/server/x86-arch.h
(ChildStoppedAction): Added `STOP_ACTION_INTERNAL_ERROR'.
* backend/server/server.h
(ServerStatusMessageType): Added `MESSAGE_INTERNAL_ERROR'.
* backend/Inferior.cs
(Inferior.ChildEventType): Added `INTERNAL_ERROR'.
2009-08-05 Martin Baulig <martin@ximian.com>
Add error checks to enforce managed context for func-eval.
NOTE: This patch intentionally ``breaks'' breakpoints in
MonoDevelop; func-eval cannot be allowed when stopped at random
locations in unmanaged code, the result would be completely
unpredictable.
It looks like there were some misunderstandings about the
debugger's breakpoint API:
-> DebuggerSession.AddEvent() adds an event / breakpoint to the
session, but does not activate it.
-> Event.Activate() activates the event / breakpoint and requires
you to be stopped *in managed code* (the only exception is address
breakpoints which work everywhere).
-> Process.ActivatePendingBreakpoints() is the correct API to
activate breakpoints while the target is running. This is an
expensive operation, so if you have multiple breakpoints, you
should DebuggerSession.AddEvent() them all then then call
Process.ActivatePendingBreakpoints() only once when done.
* classes/TargetException.cs
(TargetError): Added `InvalidContext'.
* backend/SingleSteppingEngine.cs
(SSE): Add enforce_managed_context() calls to all CallMethod()
overloads and to RuntimeInvoke().
2009-08-04 Martin Baulig <martin@ximian.com>
* frontend/ExpressionParser.cs
(ExpressionParser): Rename `MyExpression' -> `Expression' and make
it public; rename `MyExpressionWrapper' -> `ExpressionWrapper' and
make it public; rename `MyAsycResult' -> `AsyncResult' and make it
public.
2009-08-04 Martin Baulig <martin@ximian.com>
* frontend/ExpressionParser.cs: New file.
(ExpressionParser): Moved here from Expression.cs.
(ExpressionParser.GetVariableAccessExpression): Added.
(ExpressionParser.GetMemberAccessExpression): Added.
* frontend/Expression.cs
(StructAccessExpression): Made the .ctor public.
* classes/ExpressionEvaluator.cs
(EE.IExpression): Renamed `EvaluateAsync' -> `Evaluate'.
(EE.IExpression): Added `Assign'.
2009-08-04 Martin Baulig <martin@ximian.com>
* backend/SingleSteppingEngine.cs
(SSE.OperationRuntimeInvokeHelper): Improve error handling.
2009-07-08 Martin Baulig <martin@ximian.com>
Martin's new Threading Model.
* classes/GUIManager.cs
(GUIManager): Made this obsolete, it's now just a tiny wrapper
around the new API.
* classes/Operation.cs: New file.
(ThreadingModel): New public enum.
(CommandResult): New public abstract class.
(OperationHost): New internal interface.
(OperationCommandResult): New public class.
* backend/ThreadServant.cs
(ThreadServant.StepInstruction): Removed, use the new Step() API.
(ThreadServant.StepNativeInstruction): Likewise.
(ThreadServant.NextInstruction): Likewise.
(ThreadServant.StepLine): Likewise.
(ThreadServant.NextLine): Likewise.
(ThreadServant.Finish): Removed, use the new Step() API.
* backend/SingleSteppingEngine.cs
(SSE.OperationStep): Add support for `StepMode.Run'; this
obsoletes `OperationRun'.
(SSE.OperationRun): Removed; use `OperationStep' with `StepMode.Run'.
(SSE.OperationFinish): Removed; use `OperationStep' with
`StepMode.Finish' or `StepMode.FinishNative'.
* backend/StepFrame.cs: Moved to ../classes/StepFrame.cs.
* classes/StepFrame.cs
(StepMode): Made this public.
(StepFrame): Make this public and [Serializable].
(StepMode.Run): Added.
(StepMode.FinishNative): Added.
(StepFrame.Until): New public property; only valid in`
StepMode.Run'.
* classes/Thread.cs
(Thread.Step): New public function.
(Thread.StepInstruction): Obsolete, use the new Step() API.
(Thread.StepNativeInstruction): Likewise.
(Thread.NextInstruction): Likewise.
(Thread.StepLine): Likewise.
(Thread.NextLine): Likewise.
(Thread.Continue): Use `Step (StepMode.Run)'.
(Thread.Background): Obsolete; this was never implemented and
always the same as Continue().
(Thread.Finish): Obsolete, use the new Step() API.
* backend/ThreadServant.cs
(ThreadServant.Step): New public function.
2009-07-13 Jonathan Chambers <joncham@gmail.com>
* backend/Inferior.cs: Add and handle WINDOWS server type.
2009-07-13 Jonathan Chambers <joncham@gmail.com>
* backend/os/PEReader.cs: Add.
* backend/os/WindowsOperatingSystem.cs: Add.
Contributed under MIT/X11 license.
2009-07-03 Jonathan Chambers <joncham@gmail.com>
* build/Mono.Debugger.csproj: Add backend/os directory.
* frontend/CSharpExpressionParser.cs.win: Update.
2009-07-07 Martin Baulig <martin@ximian.com>
* backend/SingleSteppingEngine.cs
(SSE.TargetState): Return `TargetState.Busy' while being thread-locked.
(SSE.StartOperation): Disallow starting any new operation while
being thread-locked.
2009-07-07 Martin Baulig <martin@ximian.com>
Make exception catchpoints per-process and not per-thread.
* classes/Process.cs
(Process.AddExceptionCatchPoint): New public method.
(Process.RemoveExceptionCatchPoint): Likewise.
* classes/Thread.cs
(Thread.AddEventHandler): Removed.
(Thread.RemoveEventHandler): Removed.
* backend/ProcessServant.cs
(ProcessServant.AddExceptionCatchPoint): New internal method.
(ProcessServant.RemoveExceptionCatchPoint): Likewise.
(ProcessServant.ExceptionCatchPoints): New internal property.
* backend/ThreadServant.cs
(ThreadServant.AddEventHandler): Removed.
(ThreadServant.RemoveEventHandler): Removed.
2009-07-01 Martin Baulig <martin@ximian.com>
* languages/mono/MonoRuntime.cs
(MonoRuntime.GetGenericParameter): Check whether the name field is
non-null and use `!0' etc. otherwise.
2009-06-30 Martin Baulig <martin@ximian.com>
* backend/SingleSteppingEngine.cs
(SSE.Kill): Stop the target before killing it; for some reason,
`ptrace (PTRACE_KILL)' doens't work while the target is running.
2009-06-30 Martin Baulig <martin@ximian.com>
* backend/MonoThreadManager.cs
(MonoThreadManager.HandleChildEvent): In
`NotificationType.GcThreadExited', resume the target and ignore
any errors; for some reason, the thread may have died already by
the time we get the notification.
2009-06-30 Martin Baulig <martin@ximian.com>
* classes/Debugger.cs
(Debugger.HasTarget): New public property.
* frontend/Interpreter.cs
(Interpreter.HasTarget): Also check 'debugger.HasTarget'.
2009-06-30 Martin Baulig <martin@ximian.com>
* backend/server/x86-linux-ptrace.c
(server_ptrace_kill): Don't call kill(), `ptrace (PTRACE_KILL)'
should be enough.
2009-06-30 Martin Baulig <martin@ximian.com>
* test/testsuite/TestAttach.cs: Removed the `MARTIN_PRIVATE'
conditional for this test and increased the timeout to 10 seconds.
* test/testsuite/testnativeattach.cs: Likewise.
2009-06-30 Martin Baulig <martin@ximian.com>
Officially enable attaching again - we check whether the target
runtime actually supports it and attach in native mode if not.
* configure.in: Check whether the current runtime supports
attaching and enable the attaching tests; note that the check is
only used to determine whether or not to run the tests, not
whether the feature as such is included.
* classes/DebuggerConfiguration.cs: Removed the private
configuration option to enable attaching; attaching is now enabled
by default if the target runtime supports it.
* test/testsuite/TestAttach.cs: Start the child process with
`-O=-gshared'.
* backend/MonoThreadManager.cs
(MonoThreadManager.ctor): Don't call read_thread_table().
(MonoThreadManager.read_thread_table): Renamed into
InitializeThreads() and made it internal.
* backend/ProcessServant.cs
(ProcessServant.InitializeMono): Call
`MonoThreadManager.InitializeThreads()' after our
InitializeThreads().
2009-06-30 Martin Baulig <martin@ximian.com>
Run each test in a separate process to reduce memory requirements
and also be more robust against crashes.
* test/framework/DebuggerTextFixture.cs: Formerly known as
../testsuite/NUnit.cs.
* test/framework/LibGTop.cs: Formerly known as ../misc/LibGTop.cs.
* test/framework/DebuggerTestFixtureAttribute.cs: New file.
* test/framework/DebuggerTestHost.cs: New file.
* test/framework/DebuggerTestServer.cs: New file.
* test/framework/ProxyListener.cs: New file.
* test/framework/RemotingContract.cs: New file.
* test/testsuite/NUnitAddIn.cs: New file; this is an add-in for
nunit which takes care of running the tests.
* test/testsuite/*.cs: Use [DebuggerTestFixture] instead of
[TestSuite]; the attribute takes optional `Timeout' and `Repeat'
arguments.
* build/Makefile.am: Build Mono.Debugger.Test.Framework.dll to
contain the test framework; Mono.Debugger.Test.dll now only
contains the actual test cases.
2009-06-29 Martin Baulig <martin@ximian.com>
* languages/mono/MonoClassInfo.cs
(MonoClassInfo.GetFields): Don't throw an exception if the class
doesn't have any fields.
2009-06-25 jonas echterhoff <jonas@unity3d.com>
* backend/os/DarwinOperatingSystem.cs
Add support for detecting dynamic library loads on OS X,
will detect dynamically linked libmono.
* backend/os/bfd/mach-o.c
Don't give errors on some load symbols common for OS X
dynamic libraries
2009-06-29 Martin Baulig <martin@ximian.com>
* languages/mono/MonoClassInfo.cs
(MonoClassInfo.GetFields): Don't throw an exception if the class
doesn't have any fields.
2009-06-22 Martin Baulig <martin@ximian.com>
* languages/mono/MonoClassInfo.cs
(MonoClassInfo.GetFields): Check whether the class is already
initialized and throw an exception on error.
2009-06-20 Martin Baulig <martin@ximian.com>
* classes/Debugger.cs
(Debugger.ManagedThreadCreatedEvent): New public event.
* frontend/Interpreter.cs
(Interpreter.WaitAll): Wait on all the threads we auto-stopped.
(Interpreter.InterpreterEventSink): Also listen for
`ManagedThreadCreatedEvents'; 'ThreadCreatedEvent' is emitted for
any thread, including native deamon threads.
2009-06-20 Martin Baulig <martin@ximian.com>
* backend/SingleSteppingEngine.cs
(SSE.StartOperation): Fix a regression introduced in r135640:
reset `operation_completed_event' when starting a new operation.
2009-06-20 Martin Baulig <martin@ximian.com>
* backend/MonoThreadManager.cs: Reflect latest runtime changes; if
the target runtime is at least 81.3, check the new 'thread_flags'
field in the 'MonoDebuggerThreadInfo' to detect daemon threads.
2009-06-20 Martin Baulig <martin@ximian.com>
Fix attaching support.
* backend/MonoThreadManager.cs
(MonoThreadManager.Initialize): New public static method to create
a new `MonoThreadManager' instance, we do some error checking here
and return null on failure; the .ctor is now private.
(MonoThreadManager.read_thread_table): Moved here from
ProcessServant.cs.
(MonoThreadManager.MonoDebuggerInfo.Create): Return null on
failure instead of throwing an exception.
(MonoThreadManager.MonoDebuggerInfo.CheckRuntimeVersion): New
public method.
* backend/ProcessServant.cs
(ProcessServant.MonoRuntimeFound): New internal property; returns
whether we already found a mono runtime, even if we could not use
this runtime for some reason and are thus running in native mode.
(ProcessServant.ThreadCreated): Added `bool resume_thread'
argument to specify whether the new thread should be resumed or
remain stopped.
(ProcessServant.InitializeMono): Improve error handling.
(ProcessServant.InitializeThreads): This may now be called
multiple times.
(ProcessServant.DropGlobalThreadLock): New internal method;
release the `thread_lock' mutex in SSE.Detach() since disposing
the still-locked mutex would throw an exception.
* backend/SingleSteppingEngine.cs
(SSE.StartThread): Add `bool resume_thread' argument to specify
whether the new thread should be resumed or remain stopped.
(SSE.Detach): Call `process.DropGlobalThreadLock()'.
2009-06-20 Martin Baulig <martin@ximian.com>
* classes/Backtrace.cs
(Backtrace.IsFrameOkForMode): `Mode.Default' defaults to native
unless we're debugging a managed application.
2009-06-18 Martin Baulig <martin@ximian.com>
* backend/os/Bfd.cs
(Bfd.ctor): Fix #510031, don't crash when some native library
doesn't contain a '.text' or '.bfd' section.
2009-06-18 Martin Baulig <martin@ximian.com>
* backend/server/x86-ptrace.c
(server_ptrace_step): Moved into x86-linux-ptrace.c.
(server_ptrace_continue): Likewise.
(server_ptrace_kill): Likewise.
(server_ptrace_write_memory): Likewise.
(server_ptrace_poke_word): Likewise.
2009-06-18 Martin Baulig <martin@ximian.com>
* backend/server/server.h
(ServerType): New public enum typedef.
(mono_debugger_server_get_server_type): New global function.
(InferiorVTable): Add `get_server_type'.
* backend/Inferior.cs
(Inferior.CreateOperatingSystemBackend): New public static method;
calls mono_debugger_server_get_type() and creates the appropriate
`OperatingSystemBackend'.
2009-06-18 Martin Baulig <martin@ximian.com>
* backend/server/x86-ptrace.c: Moved some linux-specific code into
x86-linux-ptrace.c.
* backend/server/darwin-ptrace.c: Moved os-specific stuff from
`InferiorHandle' into `OSData'.
2009-06-18 Martin Baulig <martin@ximian.com>
Mac OS X patches from jonas echterhoff <jonas@unity3d.com>.
* backend/ProcessServant.cs: Detect threads on OS X.
* backend/ThreadManager.cs: Detect threads on OS X.
* backend/SingleSteppingEngine.cs
(SSE.SetMainReturnAddress): Reset this when we exit.
* backend/os/Bfd.cs: `LinuxOperatingSystem' -> `OperatingSystemBackend'.
* backend/os/DarwinOperatingSystem.cs: New file.
* backend/server/darwin-ptrace.c
(server_ptrace_get_threads): Implemented.
2009-06-16 Martin Baulig <martin@ximian.com>
* classes/ExpressionEvaluator.cs
(ExpressionParsingException): Removed `ErrorOutput'.
* frontend/CSharpTokenizer.cs
(SyntaxError): Removed.
(Tokenizer): Throw a `yyParser.yyException' instead of returning
`Token.ERROR'; killed `Error'.
* frontend/jay/skeleton.cs: Killed `ErrorOutput', yyerror() now
throws a `yyParser.yyException'.
* frontend/CSharpExpressionParser.jay: Improved error handling.
* frontend/skeleton: Removed.
* frontend/jay/skeleton: Removed.
2009-06-15 Martin Baulig <martin@ximian.com>
* classes/GUIManager.cs
(GUIManager.EvaluationDone): Invoke the callback directly, don't
queue it as an event - it must be called before signalling the
AsyncResult.
2009-06-10 Martin Baulig <martin@ximian.com>
* frontend/Expression.cs
(ExpressionParser.EvaluateAsync): Invoke the callback before
signalling the wait handle.
2009-06-10 Martin Baulig <martin@ximian.com>
* classes/GUIManager.cs
(GUIManager.EvaluateExpressionAsync): Return an
`ExpressionEvaluator.AsyncResult'.
2009-06-08 Martin Baulig <martin@ximian.com>
* backend/ThreadServant.cs
(ThreadServant.WaitHandle): New public abstract property.
* classes/Thread.cs
(Thread.WaitHandle): Use `servant.WaitHandle'.
(Thread.operation_completed_event): Removed; use the SSE's
wait handle instead.
(CommandResult.Completed): Make this internal, not public.
(OperationCommandResult): New public class; derives from
`ThreadCommandResult', but has its own wait handle. This is set
when the operation is completed, which is not necessarily when the
target is stopped.
(RuntimeInvokeResult): Derive from `OperationCommandResult'.
2009-06-08 Martin Baulig <martin@ximian.com>
* backend/ThreadServant.cs
(ThreadServant.GetRuntimeInvokedFunction): New internal function.
* classes/Backtrace.cs
(Backtrace.TryCallback): Print the name of the runtime-invoke'd
function int the backtrace.
* test/testsuite/NUnit/NUnit.cs
(TestSuite.AssertRuntimeInvokeFrame): New public method.
2009-06-08 Martin Baulig <martin@ximian.com>
* test/{testsuite|src}/TestNestedBreakStates.cs: Add new testcase.
2009-06-08 Martin Baulig <martin@ximian.com>
* classes/Process.cs
(ExceptionAction): Make this enum public.
(ExceptionCatchPointHandler): Replaced `out bool stopped' with
`out ExceptionAction action'.
(Process.GenericExceptionCatchPoint): Likewise.
* frontend/Expression.cs
(ExpressionParser.EvaluateAsync): Check the flags and set
`ScriptingFlags.NestedBreakStates' if requested.
(ExpressionParser.DoEvaluate): Catch `InvocationException' here as
well and report `EvaluationResult.Exception'.
(InvocationExpression.DoInvoke): Throw an `InvocationException'
instead of a `ScriptingException' if we received an exception.
* frontend/ScriptingContext.cs
(ScriptingContext.InvocationException): New public exception
class; derives from `ScriptingException'.
2009-06-05 Martin Baulig <martin@ximian.com>
* backend/SingleSteppingEngine.cs:
(OperationMonoTrampoline.ResumeOperation): Resume operation in
case we're interrupted unexpectedly, for instance because of a
module load notification.
* test/testsuite/TestBreakpoint2.cs: New testcase for it.
* test/testsuite/NUnit.cs
(TestSuite:AddSourceFile): New protected method to read automatic