Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/monodevelop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/extras
diff options
context:
space:
mode:
authorLluis Sanchez <lluis@xamarin.com>2013-12-04 23:25:46 +0400
committerLluis Sanchez <lluis@xamarin.com>2013-12-04 23:25:46 +0400
commit9466a7a325655039c6e8edfb0a63dc5aca37ad25 (patch)
treea1cc3701f9dd493b775b57bdf40d7c7e2d1933d9 /extras
parent9e34b311a80186122a0d16d854fd309b2e7b9a6c (diff)
parent41edf4fb7f050eb62ffdbf99bef8caec1852f98c (diff)
Merge branch 'master' into retina
Conflicts: main/src/addins/CBinding/CBinding.csproj main/src/addins/CSharpBinding/CSharpBinding.csproj main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Docking/DockBarItem.cs main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/Workbench.cs version-checks
Diffstat (limited to 'extras')
-rw-r--r--extras/MonoDevelop.Debugger.Mdb/ChangeLog123
-rw-r--r--extras/MonoDevelop.Debugger.Mdb/Makefile71
-rw-r--r--extras/MonoDevelop.Debugger.Mdb/Makefile.include110
-rw-r--r--extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Backend.Mdb.AspNet/AssemblyInfo.cs9
-rw-r--r--extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Backend.Mdb.AspNet/ChangeLog79
-rw-r--r--extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Backend.Mdb.AspNet/Makefile115
-rw-r--r--extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Backend.Mdb.AspNet/Manifest.addin.xml25
-rw-r--r--extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Backend.Mdb.AspNet/Mono.Debugging.Backend.Mdb.AspNet.csproj126
-rw-r--r--extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Backend.Mdb.AspNet/MonoXspDebuggerSessionFactory.cs89
-rw-r--r--extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Backend.Mdb/AssemblyInfo.cs9
-rw-r--r--extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Backend.Mdb/ChangeLog325
-rw-r--r--extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Backend.Mdb/DebuggerController.cs255
-rw-r--r--extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Backend.Mdb/IDebuggerController.cs28
-rw-r--r--extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Backend.Mdb/IDebuggerServer.cs87
-rw-r--r--extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Backend.Mdb/Makefile133
-rw-r--r--extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Backend.Mdb/Manifest.addin.xml23
-rw-r--r--extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Backend.Mdb/Mono.Debugging.Backend.Mdb.csproj156
-rw-r--r--extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Backend.Mdb/MonoDebuggerSession.cs192
-rw-r--r--extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Backend.Mdb/MonoDebuggerSessionFactory.cs106
-rw-r--r--extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Backend.Mdb/MonoDebuggerStartInfo.cs42
-rw-r--r--extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Backend.Mdb/mono.debugging.backend.mdb.pc.in6
-rw-r--r--extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Server.Mdb/ArrayAdaptor.cs77
-rw-r--r--extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Server.Mdb/AssemblyInfo.cs30
-rw-r--r--extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Server.Mdb/BacktraceWrapper.cs137
-rw-r--r--extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Server.Mdb/ChangeLog742
-rw-r--r--extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Server.Mdb/Convert.cs522
-rw-r--r--extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Server.Mdb/DebuggerServer.cs967
-rw-r--r--extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Server.Mdb/EvaluationContext.cs86
-rw-r--r--extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Server.Mdb/FieldReference.cs113
-rw-r--r--extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Server.Mdb/IndexerValueReference.cs139
-rw-r--r--extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Server.Mdb/Makefile135
-rw-r--r--extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Server.Mdb/MdbAdaptor-2-0.cs67
-rw-r--r--extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Server.Mdb/MdbAdaptor-2-4-2.cs97
-rw-r--r--extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Server.Mdb/MdbAdaptor-2-4-4.cs59
-rw-r--r--extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Server.Mdb/MdbAdaptor-2-6.cs20
-rw-r--r--extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Server.Mdb/MdbAdaptor.cs89
-rw-r--r--extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Server.Mdb/MdbAdaptorFactory.cs122
-rw-r--r--extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Server.Mdb/MdbObjectValueAdaptor.cs1122
-rw-r--r--extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Server.Mdb/Mono.Debugging.Server.Mdb.csproj195
-rw-r--r--extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Server.Mdb/PropertyReference.cs86
-rw-r--r--extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Server.Mdb/Server.cs109
-rw-r--r--extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Server.Mdb/VariableReference.cs79
-rw-r--r--extras/MonoDevelop.Debugger.Mdb/MonoDevelop.Debugger.Mdb.sln59
-rwxr-xr-xextras/MonoDevelop.Debugger.Mdb/configure160
-rw-r--r--extras/MonoDevelop.Debugger.Mdb/rules.make42
-rw-r--r--extras/extras.mdw2
46 files changed, 0 insertions, 7365 deletions
diff --git a/extras/MonoDevelop.Debugger.Mdb/ChangeLog b/extras/MonoDevelop.Debugger.Mdb/ChangeLog
deleted file mode 100644
index 9b2ae56f4e..0000000000
--- a/extras/MonoDevelop.Debugger.Mdb/ChangeLog
+++ /dev/null
@@ -1,123 +0,0 @@
-2010-06-14 Lluis Sanchez Gual <lluis@novell.com>
-
- * configure: Bump MD version.
-
-2010-05-20 Lluis Sanchez Gual <lluis@novell.com>
-
- * configure: Bump MD version.
-
-2010-03-22 Lluis Sanchez Gual <lluis@novell.com>
-
- * configure: Bumped MD version.
-
-2010-03-08 Jonathan Pryor <jpryor@novell.com>
-
- * configure: Create a $(CSC) make variable.
- * MonoDevelop.Debugger.Gdb.make: Set $(ASSEMBLY_COMPILER_COMMAND) to
- $(CSC). This allows a top-level CSC override to be used within this
- module (e.g. top-level `make CSC=dmcs` for a v4 build).
-
-2010-03-01 Lluis Sanchez Gual <lluis@novell.com>
-
- * MonoDevelop.Debugger.Mdb.sln: The invariant policy can't be
- used anymore as base policy set.
-
-2010-02-16 Lluis Sanchez Gual <lluis@novell.com>
-
- * MonoDevelop.Debugger.Mdb.sln: Flush.
-
-2009-10-30 Lluis Sanchez Gual <lluis@novell.com>
-
- * configure: Bump MD version.
-
-2009-10-13 Lluis Sanchez Gual <lluis@novell.com>
-
- * MonoDevelop.Debugger.Mdb.sln: Flush.
-
-2009-10-07 Lluis Sanchez Gual <lluis@novell.com>
-
- * configure: Bump MD version.
-
-2009-08-28 Lluis Sanchez Gual <lluis@novell.com>
-
- * MonoDevelop.Debugger.Mdb.sln: Updated.
-
-2009-04-27 Lluis Sanchez Gual <lluis@novell.com>
-
- * Makefile:
- * MonoDevelop.Debugger.Mdb.sln:
- * Mono.Debugging.Backend.Mdb.AspNet: Initial support for XSP
- debugging.
-
-2009-04-15 Lluis Sanchez Gual <lluis@novell.com>
-
- * configure: Bump MD version.
-
-2009-02-26 Lluis Sanchez Gual <lluis@novell.com>
-
- * MonoDevelop.Debugger.Mdb.sln: Flush.
-
-2009-02-25 Michael Hutchinson <mhutchinson@novell.com>
-
- * MonoDevelop.Debugger.Mdb.sln: Set policies. Remove unused
- name attribute.
-
-2009/02/06 Lluis Sanchez Gual <lluis@novell.com>
-
- * MonoDevelop.Debugger.Mdb.sln: Add missing files.
-
-2009/02/06 Lluis Sanchez Gual <lluis@novell.com>
-
- * MonoDevelop.Debugger.Mdb.mds: Migrated to MSBuild file format.
-
-2009/02/03 Lluis Sanchez Gual <lluis@novell.com>
-
- * configure: Bump MD version.
-
-2008-11-05 Lluis Sanchez Gual <lluis@novell.com>
-
- * configure: Bump MD version.
-
-2008-10-16 Michael Hutchinson <mhutchinson@novell.com>
-
- * configure: Fix tarball name. Update debugger version requirement.
-
-2008-08-22 Lluis Sanchez Gual <lluis@novell.com>
-
- * MonoDevelop.Debugger.Mdb, MonoDevelop.Debugger.Mdb/AssemblyInfo.cs,
- MonoDevelop.Debugger.Mdb/DebuggingService.cs,
- MonoDevelop.Debugger.Mdb/Debugger.mdp,
- MonoDevelop.Debugger.Mdb/BreakpointHitArgs.cs,
- MonoDevelop.Debugger.Mdb/DebugExecutionHandlerFactory.cs,
- MonoDevelop.Debugger.Mdb/BreakpointEntry.cs,
- MonoDevelop.Debugger.Mdb/Gui, MonoDevelop.Debugger.Mdb/Gui/Pads,
- MonoDevelop.Debugger.Mdb/Gui/Pads/StackTracePad.cs,
- MonoDevelop.Debugger.Mdb/Services.cs,
- MonoDevelop.Debugger.Mdb/MonoDevelop.Debugger.addin.xml,
- MonoDevelop.Debugger.Mdb/ChangeLog,
- MonoDevelop.Debugger.Mdb/MonoDevelop.Debugger.Mdb.mdp,
- MonoDevelop.Debugger.Mdb/Makefile: Remove unused stuff.
-
-2008-06-04 Lluis Sanchez Gual <lluis@novell.com>
-
- * configure: Bump MD version.
-
-2008-05-14 Lluis Sanchez Gual <lluis@novell.com>
-
- * Makefile.include, configure, rules.make, ChangeLog,
- Mono.Debugging.Server.Mdb, Mono.Debugging.Backend.Mdb,
- MonoDevelop.Debugger.Mdb, MonoDevelop.Debugger.Mdb/AssemblyInfo.cs,
- MonoDevelop.Debugger.Mdb/DebuggingService.cs,
- MonoDevelop.Debugger.Mdb/Debugger.mdp,
- MonoDevelop.Debugger.Mdb/BreakpointHitArgs.cs,
- MonoDevelop.Debugger.Mdb/DebugExecutionHandlerFactory.cs,
- MonoDevelop.Debugger.Mdb/BreakpointEntry.cs,
- MonoDevelop.Debugger.Mdb/Gui, MonoDevelop.Debugger.Mdb/Gui/Pads,
- MonoDevelop.Debugger.Mdb/Gui/Pads/StackTracePad.cs,
- MonoDevelop.Debugger.Mdb/Services.cs,
- MonoDevelop.Debugger.Mdb/MonoDevelop.Debugger.addin.xml,
- MonoDevelop.Debugger.Mdb/ChangeLog,
- MonoDevelop.Debugger.Mdb/MonoDevelop.Debugger.Mdb.mdp,
- MonoDevelop.Debugger.Mdb/Makefile, Makefile,
- MonoDevelop.Debugger.Mdb.mds: Initial import.
-
diff --git a/extras/MonoDevelop.Debugger.Mdb/Makefile b/extras/MonoDevelop.Debugger.Mdb/Makefile
deleted file mode 100644
index c1fcd3a8eb..0000000000
--- a/extras/MonoDevelop.Debugger.Mdb/Makefile
+++ /dev/null
@@ -1,71 +0,0 @@
-
-EXTRA_DIST = rules.make configure Makefile.include
-
-all: all-recursive
-
-top_srcdir=.
-include $(top_srcdir)/config.make
-include $(top_srcdir)/Makefile.include
-include $(top_srcdir)/rules.make
-
-#include $(top_srcdir)/custom-hooks.make
-
-#Warning: This is an automatically generated file, do not edit!
-ifeq ($(CONFIG),DEBUG)
- SUBDIRS = Mono.Debugging.Backend.Mdb Mono.Debugging.Backend.Mdb.AspNet Mono.Debugging.Server.Mdb
-endif
-ifeq ($(CONFIG),RELEASE)
- SUBDIRS = Mono.Debugging.Backend.Mdb Mono.Debugging.Backend.Mdb.AspNet Mono.Debugging.Server.Mdb
-endif
-
-
-CONFIG_MAKE=$(top_srcdir)/config.make
-
-%-recursive: $(CONFIG_MAKE)
- @set . $$MAKEFLAGS; final_exit=:; \
- case $$2 in --unix) shift ;; esac; \
- case $$2 in *=*) dk="exit 1" ;; *k*) dk=: ;; *) dk="exit 1" ;; esac; \
- make pre-$*-hook prefix=$(prefix) ; \
- for dir in $(call quote_each,$(SUBDIRS)); do \
- case "$$dir" in \
- .) make $*-local || { final_exit="exit 1"; $$dk; };;\
- *) (cd "$$dir" && make $*) || { final_exit="exit 1"; $$dk; };;\
- esac \
- done; \
- make post-$*-hook prefix=$(prefix) ; \
- $$final_exit
-
-$(CONFIG_MAKE):
- echo "You must run configure first"
- exit 1
-
-clean: clean-recursive
-install: install-recursive
-uninstall: uninstall-recursive
-
-dist: $(CONFIG_MAKE)
- rm -rf $(PACKAGE)-$(VERSION)
- mkdir $(PACKAGE)-$(VERSION)
- make pre-dist-hook distdir=$$distdir
- for dir in $(call quote_each,$(SUBDIRS)); do \
- pkgdir=`pwd`/$(PACKAGE)-$(VERSION); \
- mkdir "$$pkgdir/$$dir" || true; \
- case $$dir in \
- .) make dist-local "distdir=$$pkgdir" || exit 1;; \
- *) (cd "$$dir"; make dist-local "distdir=$$pkgdir/$$dir") || exit 1;; \
- esac \
- done
- (make dist-local distdir=$(PACKAGE)-$(VERSION))
- make post-dist-hook "distsir=$$distdir"
- tar czvf $(PACKAGE)-$(VERSION).tar.gz $(PACKAGE)-$(VERSION)
- rm -rf $(PACKAGE)-$(VERSION)
- @echo "=========================================="
- @echo "$(PACKAGE)-$(VERSION) has been packaged > $(PACKAGE)-$(VERSION).tar.gz"
- @echo "=========================================="
-
-distcheck: dist
- (mkdir test; cd test; \
- tar xzvf ../$(PACKAGE)-$(VERSION).tar.gz; cd $(PACKAGE)-$(VERSION); \
- ./configure --prefix=$$(cd `pwd`/..; pwd); \
- make && make install && make dist);
- rm -rf test
diff --git a/extras/MonoDevelop.Debugger.Mdb/Makefile.include b/extras/MonoDevelop.Debugger.Mdb/Makefile.include
deleted file mode 100644
index 7e13b91f9f..0000000000
--- a/extras/MonoDevelop.Debugger.Mdb/Makefile.include
+++ /dev/null
@@ -1,110 +0,0 @@
-VALID_CULTURES = ar bg ca zh-CHS cs da de el en es fi fr he hu is it ja ko nl no pl pt ro ru hr sk sq sv th tr id uk be sl et lv lt fa vi hy eu mk af fo hi sw gu ta te kn mr gl kok ar-SA bg-BG ca-ES zh-TW cs-CZ da-DK de-DE el-GR en-US fi-FI fr-FR he-IL hu-HU is-IS it-IT ja-JP ko-KR nl-NL nb-NO pl-PL pt-BR ro-RO ru-RU hr-HR sk-SK sq-AL sv-SE th-TH tr-TR id-ID uk-UA be-BY sl-SI et-EE lv-LV lt-LT fa-IR vi-VN hy-AM eu-ES mk-MK af-ZA fo-FO hi-IN sw-KE gu-IN ta-IN te-IN kn-IN mr-IN gl-ES kok-IN ar-IQ zh-CN de-CH en-GB es-MX fr-BE it-CH nl-BE nn-NO pt-PT sv-FI ar-EG zh-HK de-AT en-AU es-ES fr-CA ar-LY zh-SG de-LU en-CA es-GT fr-CH ar-DZ zh-MO en-NZ es-CR fr-LU ar-MA en-IE es-PA ar-TN en-ZA es-DO ar-OM es-VE ar-YE es-CO ar-SY es-PE ar-JO es-AR ar-LB en-ZW es-EC ar-KW en-PH es-CL ar-AE es-UY ar-BH es-PY ar-QA es-BO es-SV es-HN es-NI es-PR zh-CHT
-
-s2q=$(subst \ ,?,$1)
-q2s=$(subst ?,\ ,$1)
-# use this when result will be quoted
-unesc2=$(subst ?, ,$1)
-
-build_sources = $(FILES) $(GENERATED_FILES)
-build_sources_esc= $(call s2q,$(build_sources))
-# use unesc2, as build_sources_embed is quoted
-build_sources_embed= $(call unesc2,$(build_sources_esc:%='$(srcdir)/%'))
-
-comma__=,
-get_resource_name = $(firstword $(subst $(comma__), ,$1))
-get_culture = $(lastword $(subst ., ,$(basename $1)))
-is_cultured_resource = $(and $(word 3,$(subst ., ,$1)), $(filter $(VALID_CULTURES),$(lastword $(subst ., ,$(basename $1)))))
-
-RESOURCES_ESC=$(call s2q,$(RESOURCES))
-
-build_resx_list = $(foreach res, $(RESOURCES_ESC), $(if $(filter %.resx, $(call get_resource_name,$(res))),$(res),))
-build_non_culture_resx_list = $(foreach res, $(build_resx_list),$(if $(call is_cultured_resource,$(call get_resource_name,$(res))),,$(res)))
-build_non_culture_others_list = $(foreach res, $(filter-out $(build_resx_list),$(RESOURCES_ESC)),$(if $(call is_cultured_resource,$(call get_resource_name,$(res))),,$(res)))
-build_others_list = $(build_non_culture_others_list)
-build_xamlg_list = $(filter %.xaml.g.cs, $(FILES))
-
-# resgen all .resx resources
-build_resx_files = $(foreach res, $(build_resx_list), $(call get_resource_name,$(res)))
-build_resx_resources_esc = $(build_resx_files:.resx=.resources)
-build_resx_resources = $(call q2s,$(build_resx_resources_esc))
-
-# embed resources for the main assembly
-build_resx_resources_hack = $(subst .resx,.resources, $(build_non_culture_resx_list))
-# use unesc2, as build_resx_resources_embed is quoted
-build_resx_resources_embed = $(call unesc2,$(build_resx_resources_hack:%='-resource:%'))
-build_others_files = $(call q2s,$(foreach res, $(build_others_list),$(call get_resource_name,$(res))))
-build_others_resources = $(build_others_files)
-# use unesc2, as build_others_resources_embed is quoted
-build_others_resources_embed = $(call unesc2,$(build_others_list:%='-resource:$(srcdir)/%'))
-
-build_resources = $(build_resx_resources) $(build_others_resources)
-build_resources_embed = $(build_resx_resources_embed) $(build_others_resources_embed)
-
-# -usesourcepath is available only for resgen2
-emit_resgen_target_1=$(call q2s,$1) : $(call q2s,$(subst .resources,.resx,$1)); cd '$$(shell dirname '$$<')' && $$(RESGEN) '$$(shell basename '$$<')' '$$(shell basename '$$@')'
-emit_resgen_target_2=$(call q2s,$1) : $(call q2s,$(subst .resources,.resx,$1)); $$(RESGEN) -usesourcepath '$$<' '$$@'
-
-emit_resgen_target=$(if $(filter resgen2,$(RESGEN)),$(emit_resgen_target_2),$(emit_resgen_target_1))
-emit_resgen_targets=$(foreach res,$(build_resx_resources_esc),$(eval $(call emit_resgen_target,$(res))))
-
-build_references_ref = $(call q2s,$(foreach ref, $(call s2q,$(REFERENCES)), $(if $(filter -pkg:%, $(ref)), $(ref), $(if $(filter -r:%, $(ref)), $(ref), -r:$(ref)))))
-build_references_ref += $(call q2s,$(foreach ref, $(call s2q,$(DLL_REFERENCES)), -r:$(ref)))
-build_references_ref += $(call q2s,$(foreach ref, $(call s2q,$(PROJECT_REFERENCES)), -r:$(ref)))
-
-s2q2s=$(call unesc2,$(call s2q,$1))
-cp_actual=test -z $1 || cp $1 $2
-cp=$(call cp_actual,'$(call s2q2s,$1)','$(call s2q2s,$2)')
-
-rm_actual=test -z '$1' || rm -f '$2'
-rm=$(call rm_actual,$(call s2q2s,$1),$(call s2q2s,$2)/$(shell basename '$(call s2q2s,$1)'))
-
-EXTRA_DIST += $(build_sources) $(build_resx_files) $(build_others_files) $(ASSEMBLY_WRAPPER_IN) $(EXTRAS) $(DATA_FILES) $(build_culture_res_files)
-CLEANFILES += $(ASSEMBLY) $(ASSEMBLY).mdb $(BINARIES) $(build_resx_resources) $(build_satellite_assembly_list)
-DISTCLEANFILES = $(GENERATED_FILES) $(pc_files) $(BUILD_DIR)/*
-
-pkglib_SCRIPTS = $(ASSEMBLY)
-bin_SCRIPTS = $(BINARIES)
-
-programfilesdir = @libdir@/@PACKAGE@
-programfiles_DATA = $(PROGRAMFILES)
-linuxpkgconfigdir = @libdir@/pkgconfig
-linuxpkgconfig_DATA = $(LINUX_PKGCONFIG)
-
-
-# macros
-
-# $(call emit-deploy-target,deploy-variable-name)
-define emit-deploy-target
-$($1): $($1_SOURCE)
- mkdir -p '$$(shell dirname '$$@')'
- cp '$$<' '$$@'
-endef
-
-# $(call emit-deploy-wrapper,wrapper-variable-name,wrapper-sourcefile,x)
-# assumes that for a wrapper foo.pc its source template is foo.pc.in
-# if $3 is non-empty then wrapper is marked exec
-define emit-deploy-wrapper
-$($1): $2 $(top_srcdir)/config.make
- mkdir -p '$$(shell dirname '$$@')'
- cp '$$<' '$$@'
- $(if $3,chmod +x '$$@')
-
-$2: $2.in $(top_srcdir)/config.make
- sed -e "s,@prefix@,$(prefix)," -e "s,@PACKAGE@,$(PACKAGE)," -e "s,@expanded_libdir@,$(libdir)," -e "s,@expanded_bindir@,$(bindir)," -e "s,@expanded_datadir@,$(datadir)," < $2.in > $2
-endef
-
-# generating satellite assemblies
-
-culture_resources = $(foreach res, $(RESOURCES_ESC), $(if $(call is_cultured_resource,$(call get_resource_name, $(res))),$(res)))
-cultures = $(sort $(foreach res, $(culture_resources), $(call get_culture,$(call get_resource_name,$(res)))))
-culture_resource_dependencies = $(call q2s,$(BUILD_DIR)/$1/$(SATELLITE_ASSEMBLY_NAME): $(subst .resx,.resources,$2))
-culture_resource_commandlines = $(call unesc2,cmd_line_satellite_$1 += '/embed:$(subst .resx,.resources,$2)')
-build_satellite_assembly_list = $(call q2s,$(cultures:%=$(BUILD_DIR)/%/$(SATELLITE_ASSEMBLY_NAME)))
-build_culture_res_files = $(call q2s,$(foreach res, $(culture_resources),$(call get_resource_name,$(res))))
-
-$(eval $(foreach res, $(culture_resources), $(eval $(call culture_resource_dependencies,$(call get_culture,$(call get_resource_name,$(res))),$(call get_resource_name,$(res))))))
-$(eval $(foreach res, $(culture_resources), $(eval $(call culture_resource_commandlines,$(call get_culture,$(call get_resource_name,$(res))),$(res)))))
-
-$(build_satellite_assembly_list): $(BUILD_DIR)/%/$(SATELLITE_ASSEMBLY_NAME):
- mkdir -p '$(@D)'
- $(AL) -out:'$@' -culture:$* -t:lib $(cmd_line_satellite_$*) \ No newline at end of file
diff --git a/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Backend.Mdb.AspNet/AssemblyInfo.cs b/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Backend.Mdb.AspNet/AssemblyInfo.cs
deleted file mode 100644
index 6893903485..0000000000
--- a/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Backend.Mdb.AspNet/AssemblyInfo.cs
+++ /dev/null
@@ -1,9 +0,0 @@
-// Autogenerated from Manifest.addin.xml
-
-using System.Reflection;
-
-[assembly: AssemblyProduct ("MonoDevelop")]
-[assembly: AssemblyTitle ("Asp.Net Debugging Support")]
-[assembly: AssemblyDescription ("Managed Debugging Engine support for MDB")]
-[assembly: AssemblyVersion ("2.6")]
-[assembly: AssemblyCopyright ("MIT X11")]
diff --git a/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Backend.Mdb.AspNet/ChangeLog b/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Backend.Mdb.AspNet/ChangeLog
deleted file mode 100644
index f1d690af44..0000000000
--- a/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Backend.Mdb.AspNet/ChangeLog
+++ /dev/null
@@ -1,79 +0,0 @@
-2010-03-22 Lluis Sanchez Gual <lluis@novell.com>
-
- * AssemblyInfo.cs:
- * Manifest.addin.xml: Bumped MD version.
-
-2010-03-17 Lluis Sanchez Gual <lluis@novell.com>
-
- * Mono.Debugging.Backend.Mdb.AspNet.csproj: Flush.
-
-2010-03-17 Lluis Sanchez Gual <lluis@novell.com>
-
- * Mono.Debugging.Backend.Mdb.AspNet.csproj: Merged MD.Projects
- into MD.Core, and MD.Projects.Gui, MD.Core.Gui and
- MD.Components into MD.Ide.
-
-2010-03-08 Jonathan Pryor <jpryor@novell.com>
-
- * Makefile: Set $(ASSEMBLY_COMPILER_COMMAND) to $(CSC).
- This allows a top-level CSC override to be used within this
- module (e.g. top-level `make CSC=dmcs` for a v4 build).
-
-2010-02-16 Lluis Sanchez Gual <lluis@novell.com>
-
- * Mono.Debugging.Backend.Mdb.AspNet.csproj: Flush.
-
- * Manifest.addin.xml:
- * MonoXspDebuggerSessionFactory.cs: Track api changes. Some
- engine info is now taken from extension node metadata.
-
-2009-11-20 Lluis Sanchez Gual <lluis@novell.com>
-
- * MonoXspDebuggerSessionFactory.cs: Implement Id property.
-
-2009-10-30 Lluis Sanchez Gual <lluis@novell.com>
-
- * AssemblyInfo.cs:
- * Manifest.addin.xml: Bump MD version.
-
-2009-10-16 Michael Hutchinson <mhutchinson@novell.com>
-
- * MonoXspDebuggerSessionFactory.cs: Fix spelling of
- GetAttachableProcesses API.
-
-2009-10-13 Lluis Sanchez Gual <lluis@novell.com>
-
- * Mono.Debugging.Backend.Mdb.AspNet.csproj: Flush.
-
-2009-10-07 Lluis Sanchez Gual <lluis@novell.com>
-
- * AssemblyInfo.cs:
- * Manifest.addin.xml: Bump MD version.
-
-2009-08-26 Lluis Sanchez Gual <lluis@novell.com>
-
- * Mono.Debugging.Backend.Mdb.AspNet.csproj: We now depend on
- gtk# 2.12.8, Mono 2.4, and Mono.Addins 0.4.
-
-2009-05-19 Lluis Sanchez Gual <lluis@novell.com>
-
- * Mono.Debugging.Backend.Mdb.AspNet.csproj: Flush.
-
-2009-05-06 Lluis Sanchez Gual <lluis@novell.com>
-
- * MonoXspDebuggerSessionFactory.cs: Don't enable user modules
- for normal app debugging.
-
-2009-05-04 Lluis Sanchez Gual <lluis@novell.com>
-
- * MonoXspDebuggerSessionFactory.cs: Register user modules.
-
-2009-04-27 Lluis Sanchez Gual <lluis@novell.com>
-
- * Makefile:
- * AssemblyInfo.cs:
- * Manifest.addin.xml:
- * MonoXspDebuggerSessionFactory.cs:
- * Mono.Debugging.Backend.Mdb.AspNet.csproj: Initial support
- for XSP debugging.
-
diff --git a/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Backend.Mdb.AspNet/Makefile b/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Backend.Mdb.AspNet/Makefile
deleted file mode 100644
index 5799103fd8..0000000000
--- a/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Backend.Mdb.AspNet/Makefile
+++ /dev/null
@@ -1,115 +0,0 @@
-
-EXTRA_DIST = Makefile
-
-# Warning: This is an automatically generated file, do not edit!
-
-srcdir=.
-top_srcdir=..
-
-include $(top_srcdir)/config.make
-
-ifeq ($(CONFIG),DEBUG)
-ASSEMBLY_COMPILER_COMMAND = $(CSC)
-ASSEMBLY_COMPILER_FLAGS = -noconfig -codepage:utf8 -warn:4 -optimize- -debug "-define:DEBUG;TRACE"
-
-ASSEMBLY = ../build/AspNetDebuggerClient.dll
-ASSEMBLY_MDB = $(ASSEMBLY).mdb
-COMPILE_TARGET = library
-PROJECT_REFERENCES =
-BUILD_DIR = ../build
-
-DEBUGGERCLIENT_DLL_MDB_SOURCE=../build/AspNetDebuggerClient.dll.mdb
-
-endif
-
-ifeq ($(CONFIG),RELEASE)
-ASSEMBLY_COMPILER_COMMAND = $(CSC)
-ASSEMBLY_COMPILER_FLAGS = -noconfig -codepage:utf8 -warn:4 -optimize+ -debug -define:DEBUG "-define:TRACE"
-
-ASSEMBLY = bin/Release/AspNetDebuggerClient.dll
-ASSEMBLY_MDB = $(ASSEMBLY).mdb
-COMPILE_TARGET = library
-PROJECT_REFERENCES =
-BUILD_DIR = bin/Release/
-
-DEBUGGERCLIENT_DLL_MDB_SOURCE=bin/Release/AspNetDebuggerClient.dll.mdb
-
-endif
-
-AL=al2
-SATELLITE_ASSEMBLY_NAME=Mono.Debugging.Backend.Mdb.resources.dll
-
-PROGRAMFILES = \
- $(DEBUGGERCLIENT_DLL_MDB)
-
-
-RESGEN=resgen2
-
-DEBUGGERCLIENT_DLL_MDB = $(BUILD_DIR)/AspNetDebuggerClient.dll.mdb
-
-FILES = \
- AssemblyInfo.cs \
- MonoXspDebuggerSessionFactory.cs
-
-DATA_FILES =
-
-RESOURCES = Manifest.addin.xml
-
-EXTRAS = \
- ChangeLog
-
-REFERENCES = \
- ../build/DebuggerClient.dll \
- -pkg:monodevelop \
- -pkg:monodevelop-core-addins \
- System
-
-DLL_REFERENCES =
-
-CLEANFILES = $(PROGRAMFILES)
-
-#Targets
-all: $(ASSEMBLY) $(PROGRAMFILES) $(top_srcdir)/config.make
-
-include $(top_srcdir)/Makefile.include
-#include $(srcdir)/custom-hooks.make
-
-
-
-$(eval $(call emit_resgen_targets))
-$(build_xamlg_list): %.xaml.g.cs: %.xaml
- xamlg '$<'
-
-INSTALL_DIR = $(DESTDIR)$(prefix)/lib/monodevelop/AddIns/MonoDevelop.Debugger
-
-LOCAL_PKGCONFIG=PKG_CONFIG_PATH=../../../local-config:$$PKG_CONFIG_PATH
-
-$(ASSEMBLY) $(ASSEMBLY_MDB): $(build_sources) $(build_resources) $(build_datafiles) $(DLL_REFERENCES) $(PROJECT_REFERENCES) $(build_xamlg_list) $(build_satellite_assembly_list)
- make pre-all-local-hook prefix=$(prefix)
- mkdir -p $(shell dirname $(ASSEMBLY))
- make $(CONFIG)_BeforeBuild
- $(LOCAL_PKGCONFIG) $(ASSEMBLY_COMPILER_COMMAND) $(ASSEMBLY_COMPILER_FLAGS) -out:$(ASSEMBLY) -target:$(COMPILE_TARGET) $(build_sources_embed) $(build_resources_embed) $(build_references_ref)
- make $(CONFIG)_AfterBuild
- make post-all-local-hook prefix=$(prefix)
-
-install-local: $(ASSEMBLY) $(ASSEMBLY_MDB)
- make pre-install-local-hook prefix=$(prefix)
- mkdir -p '$(INSTALL_DIR)'
- $(call cp,$(ASSEMBLY),$(INSTALL_DIR))
- $(call cp,$(ASSEMBLY_MDB),$(INSTALL_DIR))
- mkdir -p '$(DESTDIR)$(libdir)/pkgconfig'
- $(call cp,$(DEBUGGERCLIENT_DLL_MDB),$(INSTALL_DIR))
- make post-install-local-hook prefix=$(prefix)
-
-uninstall-local: $(ASSEMBLY) $(ASSEMBLY_MDB)
- make pre-uninstall-local-hook prefix=$(prefix)
- $(call rm,$(ASSEMBLY),$(INSTALL_DIR))
- $(call rm,$(ASSEMBLY_MDB),$(INSTALL_DIR))
- $(call rm,$(DEBUGGERCLIENT_DLL_MDB),$(INSTALL_DIR))
- make post-uninstall-local-hook prefix=$(prefix)
-
-install: install-local
-uninstall: uninstall-local
-clean: clean-local
-
-include $(top_srcdir)/rules.make
diff --git a/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Backend.Mdb.AspNet/Manifest.addin.xml b/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Backend.Mdb.AspNet/Manifest.addin.xml
deleted file mode 100644
index ff91fdd6b8..0000000000
--- a/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Backend.Mdb.AspNet/Manifest.addin.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<Addin id = "MonoDevelop.Debugger.Mdb.AspNet"
- name = "Asp.Net Debugging Support"
- author = "Lluis Sanchez"
- url = "http://www.mono-project.com"
- description = "Managed Debugging Engine support for MDB"
- copyright = "MIT X11"
- category = "Debugging"
- version = "4.2">
-
- <Dependencies>
- <Addin id="MonoDevelop.Core" version="4.2"/>
- <Addin id="MonoDevelop.Ide" version="4.2"/>
- <Addin id="MonoDevelop.Debugger" version="4.2"/>
- <Addin id="MonoDevelop.Debugger.Mdb" version="4.2"/>
- <Addin id="MonoDevelop.AspNet" version="4.2"/>
- </Dependencies>
-
- <Extension path="/MonoDevelop/Debugging/DebuggerEngines">
- <DebuggerEngine id="Mono.Debugger.Mdb.AspNet"
- name="Mono Debugger for ASP.NET"
- features="Catchpoints, DebugFile, Stepping, Pause, Breakpoints, Disassembly"
- type="MonoDevelop.Debugger.Mdb.MonoXspDebuggerSessionFactory" />
- </Extension>
-
-</Addin>
diff --git a/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Backend.Mdb.AspNet/Mono.Debugging.Backend.Mdb.AspNet.csproj b/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Backend.Mdb.AspNet/Mono.Debugging.Backend.Mdb.AspNet.csproj
deleted file mode 100644
index fe0cfe144d..0000000000
--- a/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Backend.Mdb.AspNet/Mono.Debugging.Backend.Mdb.AspNet.csproj
+++ /dev/null
@@ -1,126 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>9.0.21022</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{A35E163C-179D-47A0-8026-FDAA2BE6737B}</ProjectGuid>
- <OutputType>Library</OutputType>
- <AssemblyName>Mono.Debugging.Backend.Mdb.AspNet</AssemblyName>
- <RootNamespace>Mono.Debugging.Backend.Mdb.AspNet</RootNamespace>
- <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>..\build</OutputPath>
- <DefineConstants>DEBUG</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <ConsolePause>false</ConsolePause>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>none</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\Release</OutputPath>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <ConsolePause>false</ConsolePause>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="System" />
- <Reference Include="MonoDevelop.AspNet, Version=1.9.2.0, Culture=neutral">
- <Package>monodevelop-core-addins</Package>
- </Reference>
- <Reference Include="MonoDevelop.Core, Version=1.9.2.0, Culture=neutral">
- <Package>monodevelop</Package>
- </Reference>
- <Reference Include="MonoDevelop.Ide, Version=2.0.0.0, Culture=neutral">
- <Package>monodevelop</Package>
- </Reference>
- <Reference Include="NRefactory, Version=0.0.0.0, Culture=neutral">
- <Package>monodevelop</Package>
- </Reference>
- <Reference Include="Mono.Cecil, Version=0.6.8.8607, Culture=neutral">
- <Package>monodevelop</Package>
- </Reference>
- <Reference Include="Mono.TextEditor, Version=1.0.0.0, Culture=neutral">
- <Package>monodevelop</Package>
- </Reference>
- <Reference Include="MonoDevelop.VersionControl, Version=2.0.0.0, Culture=neutral">
- <Package>monodevelop-core-addins</Package>
- </Reference>
- <Reference Include="MonoDevelop.NUnit, Version=2.0.0.0, Culture=neutral">
- <Package>monodevelop-core-addins</Package>
- </Reference>
- <Reference Include="MonoDevelop.XmlEditor, Version=2.0.0.0, Culture=neutral">
- <Package>monodevelop-core-addins</Package>
- </Reference>
- <Reference Include="MonoDevelop.Gettext, Version=2.0.0.0, Culture=neutral">
- <Package>monodevelop-core-addins</Package>
- </Reference>
- <Reference Include="MonoDevelop.Deployment, Version=2.0.0.0, Culture=neutral">
- <Package>monodevelop-core-addins</Package>
- </Reference>
- <Reference Include="MonoDevelop.Deployment.Linux, Version=2.0.0.0, Culture=neutral">
- <Package>monodevelop-core-addins</Package>
- </Reference>
- <Reference Include="MonoDevelop.GtkCore, Version=2.0.0.0, Culture=neutral">
- <Package>monodevelop-core-addins</Package>
- </Reference>
- <Reference Include="MonoDevelop.DesignerSupport, Version=2.0.0.0, Culture=neutral">
- <Package>monodevelop-core-addins</Package>
- </Reference>
- <Reference Include="MonoDevelop.VBNetBinding, Version=2.0.0.0, Culture=neutral">
- <Package>monodevelop-core-addins</Package>
- </Reference>
- <Reference Include="MonoDevelop.CBinding, Version=2.0.0.0, Culture=neutral">
- <Package>monodevelop-core-addins</Package>
- </Reference>
- <Reference Include="MonoDevelop.CSharpBinding, Version=2.0.0.0, Culture=neutral">
- <Package>monodevelop-core-addins</Package>
- </Reference>
- <Reference Include="MonoDevelop.Autotools, Version=2.0.0.0, Culture=neutral">
- <Package>monodevelop-core-addins</Package>
- </Reference>
- <Reference Include="MonoDevelop.SourceEditor2, Version=2.1.0.0, Culture=neutral">
- <Package>monodevelop-core-addins</Package>
- </Reference>
- <Reference Include="MonoDevelop.Debugger, Version=2.1.0.0, Culture=neutral">
- <Package>monodevelop-core-addins</Package>
- </Reference>
- <Reference Include="MonoDevelop.Refactoring, Version=2.1.0.0, Culture=neutral">
- <Package>monodevelop-core-addins</Package>
- </Reference>
- <Reference Include="MonoDevelop.Debugger.Soft, Version=2.2.0.0, Culture=neutral">
- <Package>monodevelop-core-addins</Package>
- </Reference>
- <Reference Include="Mono.Debugger.Soft, Version=0.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756">
- <Package>monodevelop-core-addins</Package>
- </Reference>
- <Reference Include="Mono.Debugging, Version=0.0.0.0, Culture=neutral, PublicKeyToken=5e9ce85b0923c84f">
- <Package>monodevelop</Package>
- </Reference>
- <Reference Include="Mono.Debugging.Soft, Version=0.0.0.0, Culture=neutral, PublicKeyToken=5e9ce85b0923c84f">
- <Package>monodevelop-core-addins</Package>
- </Reference>
- </ItemGroup>
- <ItemGroup>
- <Compile Include="AssemblyInfo.cs" />
- <Compile Include="MonoXspDebuggerSessionFactory.cs" />
- </ItemGroup>
- <ItemGroup>
- <EmbeddedResource Include="Manifest.addin.xml">
- <LogicalName>Manifest.addin.xml</LogicalName>
- </EmbeddedResource>
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\Mono.Debugging.Backend.Mdb\Mono.Debugging.Backend.Mdb.csproj">
- <Project>{932ACD9F-AAEC-4A86-AC73-D0C9E1137A60}</Project>
- <Name>Mono.Debugging.Backend.Mdb</Name>
- </ProjectReference>
- </ItemGroup>
- <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
-</Project>
diff --git a/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Backend.Mdb.AspNet/MonoXspDebuggerSessionFactory.cs b/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Backend.Mdb.AspNet/MonoXspDebuggerSessionFactory.cs
deleted file mode 100644
index 48048ae094..0000000000
--- a/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Backend.Mdb.AspNet/MonoXspDebuggerSessionFactory.cs
+++ /dev/null
@@ -1,89 +0,0 @@
-// MonoDebuggerFactory.cs
-//
-// Author:
-// Lluis Sanchez Gual <lluis@novell.com>
-//
-// Copyright (c) 2008 Novell, Inc (http://www.novell.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-//
-//
-
-using System;
-using System.Collections.Generic;
-using System.IO;
-using Mono.Debugging.Backend;
-using Mono.Debugging.Client;
-using MonoDevelop.Debugger;
-using MonoDevelop.Core;
-using MonoDevelop.Core.Execution;
-using MonoDevelop.AspNet;
-using Mono.Debugging.Backend.Mdb;
-
-namespace MonoDevelop.Debugger.Mdb
-{
- public class MonoXspDebuggerSessionFactory: IDebuggerEngine
- {
- public bool CanDebugCommand (ExecutionCommand command)
- {
- AspNetExecutionCommand cmd = command as AspNetExecutionCommand;
- return cmd != null && MonoDebuggerSessionFactory.DebuggingSupported (cmd.TargetRuntime);
- }
-
- public DebuggerStartInfo CreateDebuggerStartInfo (ExecutionCommand command)
- {
- AspNetExecutionCommand cmd = (AspNetExecutionCommand) command;
- MonoDebuggerStartInfo startInfo = MonoDebuggerSessionFactory.CreateDebuggerStartInfo (cmd.TargetRuntime);
-
- string xspPath = Path.Combine (startInfo.MonoPrefix, "lib" + Path.DirectorySeparatorChar + "mono" + Path.DirectorySeparatorChar);
-
- if (cmd.ClrVersion == ClrVersion.Net_1_1)
- xspPath += Path.Combine ("1.0","xsp.exe");
- else
- xspPath += Path.Combine ("2.0","xsp2.exe");
-
- startInfo.IsXsp = true;
- startInfo.UserCodeOnly = true;
- startInfo.Command = xspPath;
- startInfo.WorkingDirectory = cmd.BaseDirectory;
- startInfo.Arguments = cmd.XspParameters.GetXspParameters ().Trim ();
-
- string binDir = Path.Combine (cmd.BaseDirectory, "bin");
- startInfo.UserModules = new List<string> ();
- foreach (string file in Directory.GetFiles (binDir)) {
- if (file.EndsWith (".dll") || file.EndsWith (".exe"))
- startInfo.UserModules.Add (file);
- }
-
- return startInfo;
- }
-
- public DebuggerSession CreateSession ()
- {
- MonoDebuggerSession ds = new MonoDebuggerSession ();
- ds.StartDebugger ();
- return ds;
- }
-
- public ProcessInfo[] GetAttachableProcesses ()
- {
- return new ProcessInfo[0];
- }
- }
-}
diff --git a/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Backend.Mdb/AssemblyInfo.cs b/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Backend.Mdb/AssemblyInfo.cs
deleted file mode 100644
index ed24353937..0000000000
--- a/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Backend.Mdb/AssemblyInfo.cs
+++ /dev/null
@@ -1,9 +0,0 @@
-// Autogenerated from Manifest.addin.xml
-
-using System.Reflection;
-
-[assembly: AssemblyProduct ("MonoDevelop")]
-[assembly: AssemblyTitle ("MDB support for Mono.Debugging")]
-[assembly: AssemblyDescription ("Managed Debugging Engine support for MDB")]
-[assembly: AssemblyVersion ("2.6")]
-[assembly: AssemblyCopyright ("MIT X11")]
diff --git a/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Backend.Mdb/ChangeLog b/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Backend.Mdb/ChangeLog
deleted file mode 100644
index af529ab5f2..0000000000
--- a/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Backend.Mdb/ChangeLog
+++ /dev/null
@@ -1,325 +0,0 @@
-2010-03-22 Lluis Sanchez Gual <lluis@novell.com>
-
- * AssemblyInfo.cs:
- * Manifest.addin.xml: Bumped MD version.
-
-2010-03-17 Lluis Sanchez Gual <lluis@novell.com>
-
- * Mono.Debugging.Backend.Mdb.csproj: Flush.
-
-2010-03-17 Lluis Sanchez Gual <lluis@novell.com>
-
- * Mono.Debugging.Backend.Mdb.csproj: Merged MD.Projects into
- MD.Core, and MD.Projects.Gui, MD.Core.Gui and MD.Components
- into MD.Ide.
-
-2010-03-08 Jonathan Pryor <jpryor@novell.com>
-
- * Makefile: Set $(ASSEMBLY_COMPILER_COMMAND) to $(CSC).
- This allows a top-level CSC override to be used within this
- module (e.g. top-level `make CSC=dmcs` for a v4 build).
-
-2010-02-16 Lluis Sanchez Gual <lluis@novell.com>
-
- * Manifest.addin.xml:
- * MonoDebuggerSessionFactory.cs: Track api changes. Some
- engine info is now taken from extension node metadata.
-
- * Mono.Debugging.Backend.Mdb.csproj: Flush.
-
-2009-11-20 Lluis Sanchez Gual <lluis@novell.com>
-
- * MonoDebuggerSessionFactory.cs: Implement Id property.
-
-2009-11-17 Lluis Sanchez Gual <lluis@novell.com>
-
- * IDebuggerServer.cs:
- * MonoDebuggerSession.cs: Use the new options object. Track
- api changes.
-
-2009-10-30 Lluis Sanchez Gual <lluis@novell.com>
-
- * AssemblyInfo.cs:
- * Manifest.addin.xml: Bump MD version.
-
-2009-10-18 Michael Hutchinson <mhutchinson@novell.com>
-
- * IDebuggerServer.cs:
- * MonoDebuggerSession.cs: Fix Pocess/Process spelling.
-
-2009-10-16 Michael Hutchinson <mhutchinson@novell.com>
-
- * MonoDebuggerSessionFactory.cs: Fix spelling of
- GetAttachableProcesses API.
-
-2009-10-07 Lluis Sanchez Gual <lluis@novell.com>
-
- * AssemblyInfo.cs:
- * Manifest.addin.xml: Bump MD version.
-
-2009-10-05 Lluis Sanchez Gual <lluis@novell.com>
-
- * IDebuggerServer.cs:
- * MonoDebuggerSession.cs: Use long for thread and process id.
-
-2009-10-02 Lluis Sanchez Gual <lluis@novell.com>
-
- * DebuggerController.cs:
- * IDebuggerController.cs: Notify the started event before
- starting the session. In this way, breakpoints will be
- inserted before reaching main. Fixes bug #541727 - Debugger
- never stops at the breakpoint.
-
-2009-09-22 Lluis Sanchez Gual <lluis@novell.com>
-
- * IDebuggerServer.cs:
- * MonoDebuggerSession.cs: Watch the parent process, and stop
- the server if the parent dies.
-
-2009-09-17 Lluis Sanchez Gual <lluis@novell.com>
-
- * IDebuggerServer.cs:
- * MonoDebuggerSession.cs: Implemented AllowBreakEventChanges
- property.
-
- * Mono.Debugging.Backend.Mdb.csproj: Don't require specific
- versions.
-
-2009-08-28 Lluis Sanchez Gual <lluis@novell.com>
-
- * Mono.Debugging.Backend.Mdb.csproj: Updated.
-
- * DebuggerController.cs: Propagate mono env vars to the
- debugged process.
-
-2009-08-13 Lluis Sanchez Gual <lluis@novell.com>
-
- * MonoDebuggerSessionFactory.cs: Use the new AssemblyContext
- class to query and resolve assemblies.
-
-2009-06-12 Lluis Sanchez Gual <lluis@novell.com>
-
- * MonoDebuggerSessionFactory.cs: Fix nullref.
-
-2009-06-04 Lluis Sanchez Gual <lluis@novell.com>
-
- * DebuggerController.cs:
- * IDebuggerController.cs: Track api changes.
-
- * IDebuggerServer.cs:
- * MonoDebuggerSession.cs: Cache the mdb version usead by each
- mono prefix, to avoid having to auto detect it at every run.
-
-2009-05-24 Lluis Sanchez Gual <lluis@novell.com>
-
- * MonoDebuggerSessionFactory.cs: Track api change.
-
-2009-05-19 Lluis Sanchez Gual <lluis@novell.com>
-
- * Mono.Debugging.Backend.Mdb.csproj: Flush.
-
-2009-05-06 Lluis Sanchez Gual <lluis@novell.com>
-
- * MonoDebuggerStartInfo.cs: Don't enable user modules for
- normal app debugging.
-
-2009-05-04 Lluis Sanchez Gual <lluis@novell.com>
-
- * IDebuggerServer.cs:
- * MonoDebuggerSession.cs: Try to detect the mdb version only
- once per session.
-
- * MonoDebuggerStartInfo.cs: Register user modules.
-
- * MonoDebuggerSessionFactory.cs: Use the default runtime if
- none is specified.
-
-2009-04-27 Lluis Sanchez Gual <lluis@novell.com>
-
- * Makefile:
- * Manifest.addin.xml:
- * IDebuggerServer.cs:
- * DebuggerController.cs:
- * MonoDebuggerSession.cs:
- * MonoDebuggerStartInfo.cs:
- * MonoDebuggerSessionFactory.cs:
- * Mono.Debugging.Backend.Mdb.csproj: Track api changes. Added
- support for targetting a runtime other than the current one
- (as long as it has the debugger installed).
-
-2009-04-15 Lluis Sanchez Gual <lluis@novell.com>
-
- * AssemblyInfo.cs:
- * Manifest.addin.xml: Bump MD version.
-
-2009-03-04 Lluis Sanchez Gual <lluis@novell.com>
-
- * MonoDebuggerSessionFactory.cs: Removed unused
- CanDebugPlatform and rename CanDebugFile to CanDebugCommand.
-
-2009-02-20 Lluis Sanchez Gual <lluis@novell.com>
-
- * Mono.Debugging.Backend.Mdb.csproj: Updated references.
-
-2009/02/06 Lluis Sanchez Gual <lluis@novell.com>
-
- * Mono.Debugging.Backend.Mdb.mdp:
- * Mono.Debugging.Backend.Mdb.csproj: Migrated to MSBuild file format.
-
-2009/02/03 Lluis Sanchez Gual <lluis@novell.com>
-
- * AssemblyInfo.cs:
- * Manifest.addin.xml: Bump MD version.
-
-2009-01-27 Lluis Sanchez Gual <lluis@novell.com>
-
- * Mono.Debugging.Backend.Mdb.mdp: Fix target framework.
-
-2009-01-26 Michael Hutchinson <mhutchinson@novell.com>
-
- * Mono.Debugging.Backend.Mdb.mdp: Flush project format changes.
-
-2008-12-19 Lluis Sanchez Gual <lluis@novell.com>
-
- * Mono.Debugging.Backend.Mdb.mdp: Updated.
-
-2008-12-04 Lluis Sanchez Gual <lluis@novell.com>
-
- * Manifest.addin.xml: Set correct add-in category.
-
- * MonoDebuggerSession.cs:
- * MonoDebuggerSessionFactory.cs: Track api changes.
-
-2008-12-02 Michael Hutchinson <mhutchinson@novell.com>
-
- * Manifest.addin.xml: Change addin version number to match
- configure/tarball version number.
-
-2008-12-02 Michael Hutchinson <mhutchinson@novell.com>
-
- * AssemblyInfo.cs: Add AssemblyInfo.cs files that are autogenerated from
- the addin manifests.
-
-2008-11-25 Lluis Sanchez Gual <lluis@novell.com>
-
- * Manifest.addin.xml: Track api changes.
-
-2008-11-05 Lluis Sanchez Gual <lluis@novell.com>
-
- * Manifest.addin.xml: Bump MD version.
-
-2008-09-17 Lluis Sanchez Gual <lluis@novell.com>
-
- * Mono.Debugging.Backend.Mdb.mdp: Updated projects.
-
-2008-09-03 Lluis Sanchez Gual <lluis@novell.com>
-
- * MonoDebuggerSession.cs: Track api changes.
-
-2008-08-22 Lluis Sanchez Gual <lluis@novell.com>
-
- * Manifest.addin.xml: Extension point location has changed.
-
-2008-08-18 Lluis Sanchez Gual <lluis@novell.com>
-
- * Mono.Debugging.Backend.Mdb.mdp: Fix reference to Mono.TextEditor. The
- incorrect add-in version number causes problems in the makefile
- synchronization.
-
-2008-08-06 Lluis Sanchez Gual <lluis@novell.com>
-
- * IDebuggerController.cs, MonoDebuggerSession.cs,
- Mono.Debugging.Backend.Mdb.mdp, DebuggerController.cs: Add support
- for live hit count and trace updating.
-
-2008-07-16 Lluis Sanchez Gual <lluis@novell.com>
-
- * MonoDebuggerSession.cs, IDebuggerServer.cs: Implement support for
- catchpoints.
-
-2008-07-11 Lluis Sanchez Gual <lluis@novell.com>
-
- * IDebuggerController.cs, MonoDebuggerSession.cs, IDebuggerServer.cs,
- DebuggerController.cs: Track api changes to support custom
- breakpoint hit actions.
- * MonoDebuggerSessionFactory.cs: Fix construction process command line
- string.
-
-2008-07-09 Lluis Sanchez Gual <lluis@novell.com>
-
- * Makefile: Install the assemblies to the correct directory.
-
-2008-07-09 Lluis Sanchez Gual <lluis@novell.com>
-
- * MonoDebuggerSession.cs, IDebuggerServer.cs: Implemented
- SetActiveThread. Ignore target events coming from non-stopped
- threads.
-
-2008-07-02 Lluis Sanchez Gual <lluis@novell.com>
-
- * MonoDebuggerSession.cs, IDebuggerServer.cs, Makefile: Implement
- support for modifying variable values and disassembling files.
-
-2008-07-01 Lluis Sanchez Gual <lluis@novell.com>
-
- * MonoDebuggerSession.cs: Track api changes.
- * DebuggerController.cs: Use tcp by default. Fire target even after
- forcing the debugger to stop.
-
-2008-06-26 Lluis Sanchez Gual <lluis@novell.com>
-
- * Mono.Debugging.Backend.Mdb.mdp, DebuggerController.cs, Makefile:
- Enable unix channel support.
-
-2008-06-26 Lluis Sanchez Gual <lluis@novell.com>
-
- * MonoDebuggerSession.cs, IDebuggerServer.cs: Implement GetThreads and
- GetProcesses.
-
-2008-06-20 Lluis Sanchez Gual <lluis@novell.com>
-
- * IDebuggerController.cs, MonoDebuggerSession.cs, IDebuggerServer.cs,
- DebuggerController.cs: Implemented detach.
-
-2008-06-20 Lluis Sanchez Gual <lluis@novell.com>
-
- * IDebuggerController.cs, MonoDebuggerSession.cs, IDebuggerServer.cs,
- DebuggerController.cs, MonoDebuggerSessionFactory.cs: Implemented
- support for attach to process, disassemble.
-
-2008-06-17 Lluis Sanchez Gual <lluis@novell.com>
-
- * DebuggerController.cs: Added a timeout in the Exit method.
-
-2008-05-27 Lluis Sanchez Gual <lluis@novell.com>
-
- * mono.debugging.backend.mdb.pc.in: Added missing file.
-
-2008-05-27 Lluis Sanchez Gual <lluis@novell.com>
-
- * IDebuggerController.cs, MonoDebuggerSession.cs,
- Mono.Debugging.Backend.Mdb.mdp, IDebuggerServer.cs,
- DebuggerController.cs, Makefile: Track api changes. Properly
- redirect debugger output. Implemented support for adding
- breakpoints while the target process is running, it seems to kinda
- work.
-
-2008-05-22 Lluis Sanchez Gual <lluis@novell.com>
-
- * Mono.Debugging.Backend.Mdb.mdp: Updated project.
-
-2008-05-16 Lluis Sanchez Gual <lluis@novell.com>
-
- * Mono.Debugging.Backend.Mdb.mdp: Implemented query of variable and
- field data.
-
-2008-05-14 Lluis Sanchez Gual <lluis@novell.com>
-
- * AssemblyInfo.cs, Manifest.addin.xml, IDebuggerController.cs,
- MonoDebuggerSession.cs, ChangeLog, Mono.Debugging.Backend.Mdb.mdp,
- Mono.Debugging.Backend.Mdb, DebuggerController.cs,
- MonoDebuggerSessionFactory.cs, Makefile: Initial import.
-
-2008-04-28 Ankit Jain <jankit@novell.com>
-
- * Initial import.
diff --git a/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Backend.Mdb/DebuggerController.cs b/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Backend.Mdb/DebuggerController.cs
deleted file mode 100644
index 174902cdec..0000000000
--- a/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Backend.Mdb/DebuggerController.cs
+++ /dev/null
@@ -1,255 +0,0 @@
-using System;
-using System.Collections;
-using System.Collections.Generic;
-using System.Diagnostics;
-using System.IO;
-using System.Runtime.Remoting;
-using System.Runtime.Remoting.Channels;
-using System.Runtime.Remoting.Channels.Tcp;
-using System.Runtime.Serialization.Formatters.Binary;
-using Mono.Remoting.Channels.Unix;
-using System.Threading;
-using Mono.Debugging.Backend;
-using Mono.Debugging.Client;
-
-namespace Mono.Debugging.Backend.Mdb
-{
- class DebuggerController : MarshalByRefObject, IDebuggerController
- {
- string remotingChannel = "tcp";
- IDebuggerServer debugger;
- Process process;
- IDebuggerSessionFrontend frontend;
- MonoDebuggerSession session;
- string unixRemotingFile;
-
- ManualResetEvent runningEvent = new ManualResetEvent (false);
- ManualResetEvent exitRequestEvent = new ManualResetEvent (false);
- ManualResetEvent exitedEvent = new ManualResetEvent (false);
-
- public IDebuggerServer DebuggerServer {
- get { return debugger; }
- }
-
- public DebuggerController (MonoDebuggerSession session, IDebuggerSessionFrontend frontend)
- {
- this.session = session;
- this.frontend = frontend;
- }
-
- #region IDebuggerController Members
-
- public void RegisterDebugger (IDebuggerServer debugger)
- {
- lock (this)
- {
- this.debugger = debugger;
- runningEvent.Set ();
- }
- }
-
- public void WaitForExit()
- {
- exitRequestEvent.WaitOne();
- }
-
- public void NotifyStarted ()
- {
- frontend.NotifyStarted ();
- }
-
- public void OnTargetEvent (TargetEventArgs args)
- {
- frontend.NotifyTargetEvent (args);
- if (args.Type == TargetEventType.TargetExited)
- StopDebugger ();
- }
-
- public void OnTargetOutput (bool isStderr, string line)
- {
- frontend.NotifyTargetOutput (isStderr, line);
- }
-
- public void OnDebuggerOutput (bool isStderr, string line)
- {
- frontend.NotifyDebuggerOutput (isStderr, line);
- }
-
- public bool OnCustomBreakpointAction (string actionId, object handle)
- {
- return frontend.NotifyCustomBreakpointAction (actionId, handle);
- }
-
- public void UpdateBreakpoint (object handle, int count, string lastTrace)
- {
- session.UpdateBreakEvent (handle, count, lastTrace);
- }
-
- public void NotifySourceFileLoaded (string[] fullFilePaths)
- {
- foreach (string file in fullFilePaths)
- frontend.NotifySourceFileLoaded (file);
- }
-
- public void NotifySourceFileUnloaded (string[] fullFilePaths)
- {
- foreach (string file in fullFilePaths)
- frontend.NotifySourceFileUnloaded (file);
- }
-
- #endregion
-
- public void StartDebugger (MonoDebuggerStartInfo startInfo)
- {
- lock (this)
- {
- exitRequestEvent.Reset ();
-
- string chId = RegisterRemotingChannel();
-
- BinaryFormatter bf = new BinaryFormatter();
- ObjRef oref = RemotingServices.Marshal(this);
- MemoryStream ms = new MemoryStream();
- bf.Serialize(ms, oref);
- string sref = Convert.ToBase64String(ms.ToArray());
- try
- {
- Process process = new Process();
- process.Exited += new EventHandler (ProcessExited);
- string location = Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location);
- string argv = string.Empty;
- //if (isDebugMode) argv += " --debug";
- argv += " --debug '" + Path.Combine(location, "DebuggerServer.exe") + "' ";
-
- process.StartInfo = new ProcessStartInfo ("mono", argv);
-
- if (startInfo != null) {
- string monoPath = Path.Combine (startInfo.MonoPrefix, "bin");
- process.StartInfo.FileName = Path.Combine (monoPath, "mono");
- if (startInfo.ServerEnvironment != null) {
- foreach (KeyValuePair<string,string> evar in startInfo.ServerEnvironment)
- process.StartInfo.EnvironmentVariables [evar.Key] = evar.Value;
- }
- }
-
- process.StartInfo.WorkingDirectory = AppDomain.CurrentDomain.BaseDirectory;
- process.StartInfo.UseShellExecute = false;
- process.StartInfo.RedirectStandardInput = true;
- process.EnableRaisingEvents = true;
- process.Start();
-
- // The server expects 3 lines with the following content:
- // 1) location of the Mono.Debugging assembly (needed since it may be located
- // in a different directory)
- // 2) Remting channel to use
- // 3) Serialized reference to the IDebuggerController
- process.StandardInput.WriteLine (typeof(DebuggerSession).Assembly.Location);
- process.StandardInput.WriteLine (chId);
- process.StandardInput.WriteLine (sref);
- process.StandardInput.Flush();
- this.process = process;
- }
- catch (Exception ex)
- {
- Console.WriteLine("Error launching server: " + ex.ToString());
- throw;
- }
- }
-
- if (!runningEvent.WaitOne (15000, false)) {
- throw new ApplicationException ("Could not create the debugger process.");
- }
- }
-
- void ProcessExited (object sender, EventArgs args)
- {
- lock (this) {
- exitedEvent.Set ();
- Process p = (Process) sender;
- if (p != process) return;
-
- // The process suddently died
- runningEvent.Reset ();
- debugger = null;
- process = null;
- }
- }
-
- public void Exit ()
- {
- object elock = new object ();
- lock (elock) {
- ThreadPool.QueueUserWorkItem (delegate {
- try {
- debugger.Exit ();
- lock (elock) {
- Monitor.PulseAll (elock);
- }
- } catch {
- // Ignore
- }
- });
-
- // If the debugger does not stop, kill it.
- if (!Monitor.Wait (elock, 3000)) {
- StopDebugger ();
- OnTargetEvent (new TargetEventArgs (TargetEventType.TargetExited));
- }
- }
- }
-
- public void StopDebugger ()
- {
- try {
- Process oldProcess;
- lock (this) {
- if (debugger == null)
- return;
- runningEvent.Reset ();
- exitedEvent.Reset ();
- exitRequestEvent.Set ();
- oldProcess = process;
- debugger = null;
- process = null;
- }
-
- if (!exitedEvent.WaitOne (2000, false)) {
- try {
- oldProcess.Kill ();
- } catch {
- }
- }
- } catch (Exception ex) {
- Console.WriteLine (ex);
- }
- }
-
- string RegisterRemotingChannel()
- {
- if (remotingChannel == "tcp")
- {
- IChannel ch = ChannelServices.GetChannel("tcp");
- if (ch == null)
- {
- IDictionary dict = new Hashtable();
- BinaryClientFormatterSinkProvider clientProvider = new BinaryClientFormatterSinkProvider();
- BinaryServerFormatterSinkProvider serverProvider = new BinaryServerFormatterSinkProvider();
-
- dict["port"] = 0;
- serverProvider.TypeFilterLevel = System.Runtime.Serialization.Formatters.TypeFilterLevel.Full;
-
- ChannelServices.RegisterChannel(new TcpChannel(dict, clientProvider, serverProvider), false);
- }
- }
- else
- {
- IChannel ch = ChannelServices.GetChannel ("unix");
- if (ch == null) {
- unixRemotingFile = Path.GetTempFileName ();
- ChannelServices.RegisterChannel (new UnixChannel (unixRemotingFile), false);
- }
- }
- return remotingChannel;
- }
- }
-}
diff --git a/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Backend.Mdb/IDebuggerController.cs b/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Backend.Mdb/IDebuggerController.cs
deleted file mode 100644
index 1133f8ae6f..0000000000
--- a/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Backend.Mdb/IDebuggerController.cs
+++ /dev/null
@@ -1,28 +0,0 @@
-using Mono.Debugging.Client;
-
-namespace Mono.Debugging.Backend.Mdb
-{
- public interface IDebuggerController
- {
- void RegisterDebugger (IDebuggerServer debugger);
- void WaitForExit();
-
- //callbacks
- //FIXME: better naming for event callbacks
- void NotifyStarted ();
-
- void OnTargetEvent (TargetEventArgs args);
-
- void OnTargetOutput (bool isStderr, string text);
-
- void OnDebuggerOutput (bool isStderr, string text);
-
- bool OnCustomBreakpointAction (string actionId, object handle);
-
- void UpdateBreakpoint (object handle, int count, string lastTrace);
-
- void NotifySourceFileLoaded (string[] fullFilePaths);
-
- void NotifySourceFileUnloaded (string[] fullFilePaths);
- }
-}
diff --git a/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Backend.Mdb/IDebuggerServer.cs b/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Backend.Mdb/IDebuggerServer.cs
deleted file mode 100644
index 5f7290cc52..0000000000
--- a/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Backend.Mdb/IDebuggerServer.cs
+++ /dev/null
@@ -1,87 +0,0 @@
-// IDebuggerServer.cs
-//
-// Author:
-// Lluis Sanchez Gual <lluis@novell.com>
-//
-// Copyright (c) 2008 Novell, Inc (http://www.novell.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-//
-//
-
-using System;
-using Mono.Debugging.Client;
-
-namespace Mono.Debugging.Backend.Mdb
-{
- public interface IDebuggerServer
- {
- string InitializeMdb (string mdbVersion, int mdPid);
-
- void Run (MonoDebuggerStartInfo startInfo, DebuggerSessionOptions options);
-
- void Stop ();
-
- void AttachToProcess (long id, DebuggerSessionOptions options);
-
- void Detach ();
-
- void Exit ();
-
- // Step one source line
- void StepLine ();
-
- // Step one source line, but step over method calls
- void NextLine ();
-
- // Step one instruction
- void StepInstruction ();
-
- // Step one instruction, but step over method calls
- void NextInstruction ();
-
- // Continue until leaving the current method
- void Finish ();
-
- //breakpoints etc
-
- // returns a handle
- int InsertBreakEvent (BreakEvent be, bool activate);
-
- void RemoveBreakEvent (int handle);
-
- void EnableBreakEvent (int handle, bool enable);
-
- object UpdateBreakEvent (object handle, BreakEvent be);
-
- void Continue ();
-
- ThreadInfo[] GetThreads (long processId);
-
- ProcessInfo[] GetProcesses ();
-
- Backtrace GetThreadBacktrace (long processId, long threadId);
-
- AssemblyLine[] DisassembleFile (string file);
-
- void SetActiveThread (long processId, long threadId);
-
- bool AllowBreakpointChanges { get; }
- }
-}
diff --git a/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Backend.Mdb/Makefile b/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Backend.Mdb/Makefile
deleted file mode 100644
index 63273fd9e8..0000000000
--- a/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Backend.Mdb/Makefile
+++ /dev/null
@@ -1,133 +0,0 @@
-
-EXTRA_DIST = Makefile
-
-# Warning: This is an automatically generated file, do not edit!
-
-srcdir=.
-top_srcdir=..
-
-include $(top_srcdir)/config.make
-
-ifeq ($(CONFIG),DEBUG)
-ASSEMBLY_COMPILER_COMMAND = $(CSC)
-ASSEMBLY_COMPILER_FLAGS = -noconfig -codepage:utf8 -warn:4 -optimize- -debug "-define:DEBUG;TRACE"
-
-ASSEMBLY = ../build/DebuggerClient.dll
-ASSEMBLY_MDB = $(ASSEMBLY).mdb
-COMPILE_TARGET = library
-PROJECT_REFERENCES =
-BUILD_DIR = ../build
-
-DEBUGGERCLIENT_DLL_MDB_SOURCE=../build/DebuggerClient.dll.mdb
-
-endif
-
-ifeq ($(CONFIG),RELEASE)
-ASSEMBLY_COMPILER_COMMAND = $(CSC)
-ASSEMBLY_COMPILER_FLAGS = -noconfig -codepage:utf8 -warn:4 -optimize+ -debug -define:DEBUG "-define:TRACE"
-
-ASSEMBLY = bin/Release/DebuggerClient.dll
-ASSEMBLY_MDB = $(ASSEMBLY).mdb
-COMPILE_TARGET = library
-PROJECT_REFERENCES =
-BUILD_DIR = bin/Release/
-
-DEBUGGERCLIENT_DLL_MDB_SOURCE=bin/Release/DebuggerClient.dll.mdb
-
-endif
-
-AL=al2
-SATELLITE_ASSEMBLY_NAME=Mono.Debugging.Backend.Mdb.resources.dll
-
-PROGRAMFILES = \
- $(DEBUGGERCLIENT_DLL_MDB)
-
-LINUX_PKGCONFIG = \
- $(MONO_DEBUGGING_BACKEND_MDB_PC)
-
-
-RESGEN=resgen2
-
-MONO_DEBUGGING_BACKEND_MDB_PC = $(BUILD_DIR)/mono.debugging.backend.mdb.pc
-DEBUGGERCLIENT_DLL_MDB = $(BUILD_DIR)/DebuggerClient.dll.mdb
-
-FILES = \
- AssemblyInfo.cs \
- DebuggerController.cs \
- IDebuggerController.cs \
- IDebuggerServer.cs \
- MonoDebuggerSession.cs \
- MonoDebuggerSessionFactory.cs \
- MonoDebuggerStartInfo.cs
-
-DATA_FILES =
-
-RESOURCES = Manifest.addin.xml
-
-EXTRAS = \
- ChangeLog \
- mono.debugging.backend.mdb.pc.in
-
-REFERENCES = \
- Mono.Posix \
- -pkg:monodevelop \
- -pkg:monodevelop-core-addins \
- System \
- System.Data \
- System.Runtime.Remoting \
- System.Xml
-
-DLL_REFERENCES =
-
-CLEANFILES = $(PROGRAMFILES) $(LINUX_PKGCONFIG)
-
-#Targets
-all: $(ASSEMBLY) $(PROGRAMFILES) $(LINUX_PKGCONFIG) $(top_srcdir)/config.make
-
-include $(top_srcdir)/Makefile.include
-#include $(srcdir)/custom-hooks.make
-
-
-
-$(eval $(call emit-deploy-wrapper,MONO_DEBUGGING_BACKEND_MDB_PC,mono.debugging.backend.mdb.pc))
-
-
-$(eval $(call emit_resgen_targets))
-$(build_xamlg_list): %.xaml.g.cs: %.xaml
- xamlg '$<'
-
-INSTALL_DIR = $(DESTDIR)$(prefix)/lib/monodevelop/AddIns/MonoDevelop.Debugger
-
-LOCAL_PKGCONFIG=PKG_CONFIG_PATH=../../../local-config:$$PKG_CONFIG_PATH
-
-$(ASSEMBLY) $(ASSEMBLY_MDB): $(build_sources) $(build_resources) $(build_datafiles) $(DLL_REFERENCES) $(PROJECT_REFERENCES) $(build_xamlg_list) $(build_satellite_assembly_list)
- make pre-all-local-hook prefix=$(prefix)
- mkdir -p $(shell dirname $(ASSEMBLY))
- make $(CONFIG)_BeforeBuild
- $(LOCAL_PKGCONFIG) $(ASSEMBLY_COMPILER_COMMAND) $(ASSEMBLY_COMPILER_FLAGS) -out:$(ASSEMBLY) -target:$(COMPILE_TARGET) $(build_sources_embed) $(build_resources_embed) $(build_references_ref)
- make $(CONFIG)_AfterBuild
- make post-all-local-hook prefix=$(prefix)
-
-install-local: $(ASSEMBLY) $(ASSEMBLY_MDB)
- make pre-install-local-hook prefix=$(prefix)
- mkdir -p '$(INSTALL_DIR)'
- $(call cp,$(ASSEMBLY),$(INSTALL_DIR))
- $(call cp,$(ASSEMBLY_MDB),$(INSTALL_DIR))
- mkdir -p '$(DESTDIR)$(libdir)/pkgconfig'
- $(call cp,$(MONO_DEBUGGING_BACKEND_MDB_PC),$(DESTDIR)$(libdir)/pkgconfig)
- $(call cp,$(DEBUGGERCLIENT_DLL_MDB),$(INSTALL_DIR))
- make post-install-local-hook prefix=$(prefix)
-
-uninstall-local: $(ASSEMBLY) $(ASSEMBLY_MDB)
- make pre-uninstall-local-hook prefix=$(prefix)
- $(call rm,$(ASSEMBLY),$(INSTALL_DIR))
- $(call rm,$(ASSEMBLY_MDB),$(INSTALL_DIR))
- $(call rm,$(MONO_DEBUGGING_BACKEND_MDB_PC),$(DESTDIR)$(libdir)/pkgconfig)
- $(call rm,$(DEBUGGERCLIENT_DLL_MDB),$(INSTALL_DIR))
- make post-uninstall-local-hook prefix=$(prefix)
-
-install: install-local
-uninstall: uninstall-local
-clean: clean-local
-
-include $(top_srcdir)/rules.make
diff --git a/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Backend.Mdb/Manifest.addin.xml b/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Backend.Mdb/Manifest.addin.xml
deleted file mode 100644
index 40628a4958..0000000000
--- a/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Backend.Mdb/Manifest.addin.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<Addin id = "MonoDevelop.Debugger.Mdb"
- name = "MDB support for Mono.Debugging"
- author = "Ankit Jain, Lluis Sanchez"
- url = "http://www.mono-project.com"
- description = "Managed Debugging Engine support for MDB"
- copyright = "MIT X11"
- category = "Debugging"
- version = "4.2">
-
- <Dependencies>
- <Addin id="MonoDevelop.Core" version="4.2"/>
- <Addin id="MonoDevelop.Ide" version="4.2"/>
- <Addin id="MonoDevelop.Debugger" version="4.2"/>
- </Dependencies>
-
- <Extension path="/MonoDevelop/Debugging/DebuggerEngines">
- <DebuggerEngine id="Mono.Debugger.Mdb"
- name="Mono Debugger"
- features="Catchpoints, DebugFile, Stepping, Pause, Breakpoints, Disassembly"
- type="MonoDevelop.Debugger.Mdb.MonoDebuggerSessionFactory" />
- </Extension>
-
-</Addin>
diff --git a/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Backend.Mdb/Mono.Debugging.Backend.Mdb.csproj b/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Backend.Mdb/Mono.Debugging.Backend.Mdb.csproj
deleted file mode 100644
index ba43b505dc..0000000000
--- a/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Backend.Mdb/Mono.Debugging.Backend.Mdb.csproj
+++ /dev/null
@@ -1,156 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>9.0.21022</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{932ACD9F-AAEC-4A86-AC73-D0C9E1137A60}</ProjectGuid>
- <OutputType>Library</OutputType>
- <RootNamespace>Mono.Debugging.Backend.Mdb</RootNamespace>
- <AssemblyName>DebuggerClient</AssemblyName>
- <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>..\build</OutputPath>
- <DefineConstants>DEBUG;TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <CheckForOverflowUnderflow>true</CheckForOverflowUnderflow>
- <Execution>
- <Execution clr-version="Net_2_0" />
- </Execution>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\Release\</OutputPath>
- <DefineConstants>TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <CheckForOverflowUnderflow>true</CheckForOverflowUnderflow>
- <Execution>
- <Execution clr-version="Net_2_0" />
- </Execution>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="System" />
- <Reference Include="System.Data" />
- <Reference Include="System.Xml" />
- <Reference Include="System.Runtime.Remoting" />
- <Reference Include="NRefactory, Version=0.0.0.0, Culture=neutral">
- <SpecificVersion>False</SpecificVersion>
- <Package>monodevelop</Package>
- </Reference>
- <Reference Include="Mono.Cecil, Version=0.6.8.8607, Culture=neutral">
- <Package>monodevelop</Package>
- </Reference>
- <Reference Include="Mono.TextEditor, Version=1.0.0.0, Culture=neutral">
- <Package>monodevelop</Package>
- </Reference>
- <Reference Include="Mono.Posix" />
- <Reference Include="MonoDevelop.Core, Version=1.9.2.0, Culture=neutral">
- <SpecificVersion>False</SpecificVersion>
- <Package>monodevelop</Package>
- </Reference>
- <Reference Include="MonoDevelop.Ide, Version=1.9.2.0, Culture=neutral">
- <SpecificVersion>False</SpecificVersion>
- <Package>monodevelop</Package>
- </Reference>
- <Reference Include="MonoDevelop.VersionControl, Version=1.9.2.0, Culture=neutral">
- <SpecificVersion>False</SpecificVersion>
- <Package>monodevelop-core-addins</Package>
- </Reference>
- <Reference Include="MonoDevelop.NUnit, Version=1.9.2.0, Culture=neutral">
- <SpecificVersion>False</SpecificVersion>
- <Package>monodevelop-core-addins</Package>
- </Reference>
- <Reference Include="MonoDevelop.XmlEditor, Version=1.9.2.0, Culture=neutral">
- <SpecificVersion>False</SpecificVersion>
- <Package>monodevelop-core-addins</Package>
- </Reference>
- <Reference Include="MonoDevelop.AspNet, Version=1.9.2.0, Culture=neutral">
- <SpecificVersion>False</SpecificVersion>
- <Package>monodevelop-core-addins</Package>
- </Reference>
- <Reference Include="MonoDevelop.Gettext, Version=1.9.2.0, Culture=neutral">
- <SpecificVersion>False</SpecificVersion>
- <Package>monodevelop-core-addins</Package>
- </Reference>
- <Reference Include="MonoDevelop.Deployment, Version=1.9.2.0, Culture=neutral">
- <SpecificVersion>False</SpecificVersion>
- <Package>monodevelop-core-addins</Package>
- </Reference>
- <Reference Include="MonoDevelop.Deployment.Linux, Version=1.9.2.0, Culture=neutral">
- <SpecificVersion>False</SpecificVersion>
- <Package>monodevelop-core-addins</Package>
- </Reference>
- <Reference Include="MonoDevelop.GtkCore, Version=1.9.2.0, Culture=neutral">
- <SpecificVersion>False</SpecificVersion>
- <Package>monodevelop-core-addins</Package>
- </Reference>
- <Reference Include="MonoDevelop.DesignerSupport, Version=1.9.2.0, Culture=neutral">
- <SpecificVersion>False</SpecificVersion>
- <Package>monodevelop-core-addins</Package>
- </Reference>
- <Reference Include="MonoDevelop.VBNetBinding, Version=1.9.2.0, Culture=neutral">
- <SpecificVersion>False</SpecificVersion>
- <Package>monodevelop-core-addins</Package>
- </Reference>
- <Reference Include="MonoDevelop.CBinding, Version=1.9.2.0, Culture=neutral">
- <SpecificVersion>False</SpecificVersion>
- <Package>monodevelop-core-addins</Package>
- </Reference>
- <Reference Include="MonoDevelop.CSharpBinding, Version=1.9.2.0, Culture=neutral">
- <SpecificVersion>False</SpecificVersion>
- <Package>monodevelop-core-addins</Package>
- </Reference>
- <Reference Include="MonoDevelop.Autotools, Version=1.9.2.0, Culture=neutral">
- <SpecificVersion>False</SpecificVersion>
- <Package>monodevelop-core-addins</Package>
- </Reference>
- <Reference Include="MonoDevelop.SourceEditor2, Version=2.1.0.0, Culture=neutral">
- <Package>monodevelop-core-addins</Package>
- </Reference>
- <Reference Include="MonoDevelop.Debugger, Version=2.1.0.0, Culture=neutral">
- <Package>monodevelop-core-addins</Package>
- </Reference>
- <Reference Include="MonoDevelop.Refactoring, Version=2.1.0.0, Culture=neutral">
- <Package>monodevelop-core-addins</Package>
- </Reference>
- <Reference Include="MonoDevelop.Debugger.Soft, Version=2.2.0.0, Culture=neutral">
- <Package>monodevelop-core-addins</Package>
- </Reference>
- <Reference Include="Mono.Debugger.Soft, Version=0.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756">
- <Package>monodevelop-core-addins</Package>
- </Reference>
- <Reference Include="Mono.Debugging, Version=0.0.0.0, Culture=neutral, PublicKeyToken=5e9ce85b0923c84f">
- <Package>monodevelop</Package>
- </Reference>
- <Reference Include="Mono.Debugging.Soft, Version=0.0.0.0, Culture=neutral, PublicKeyToken=5e9ce85b0923c84f">
- <Package>monodevelop-core-addins</Package>
- </Reference>
- </ItemGroup>
- <ItemGroup>
- <Compile Include="AssemblyInfo.cs" />
- <Compile Include="DebuggerController.cs" />
- <Compile Include="IDebuggerController.cs" />
- <Compile Include="MonoDebuggerSession.cs" />
- <Compile Include="MonoDebuggerSessionFactory.cs" />
- <Compile Include="IDebuggerServer.cs" />
- <Compile Include="MonoDebuggerStartInfo.cs" />
- </ItemGroup>
- <ItemGroup>
- <None Include="ChangeLog" />
- </ItemGroup>
- <ItemGroup>
- <EmbeddedResource Include="Manifest.addin.xml">
- <LogicalName>Manifest.addin.xml</LogicalName>
- </EmbeddedResource>
- </ItemGroup>
- <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
-</Project>
diff --git a/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Backend.Mdb/MonoDebuggerSession.cs b/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Backend.Mdb/MonoDebuggerSession.cs
deleted file mode 100644
index 7a08b05779..0000000000
--- a/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Backend.Mdb/MonoDebuggerSession.cs
+++ /dev/null
@@ -1,192 +0,0 @@
-// MonoDebuggerSession.cs
-//
-// Author:
-// Lluis Sanchez Gual <lluis@novell.com>
-//
-// Copyright (c) 2008 Novell, Inc (http://www.novell.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-//
-//
-
-
-using System;
-using System.IO;
-using System.Collections.Generic;
-using System.Diagnostics;
-using Mono.Debugging.Client;
-
-namespace Mono.Debugging.Backend.Mdb
-{
- public class MonoDebuggerSession: DebuggerSession
- {
- DebuggerController controller;
- bool started;
- static Dictionary<string,string> detectedMdbVersions = new Dictionary<string, string> ();
-
- public void StartDebugger ()
- {
- controller = new DebuggerController (this, Frontend);
- }
-
- public override void Dispose ()
- {
- base.Dispose ();
- if (started)
- controller.StopDebugger ();
- }
-
- protected override void OnRun (DebuggerStartInfo startInfo)
- {
- started = true;
- MonoDebuggerStartInfo info = (MonoDebuggerStartInfo) startInfo;
- controller.StartDebugger (info);
- InitMdbVersion (info.MonoPrefix);
- controller.DebuggerServer.Run (info, Options);
- }
-
- void InitMdbVersion (string prefix)
- {
- // Cache detected mdb versions, so version detection is done only once
- string mdbVersion;
- detectedMdbVersions.TryGetValue (prefix, out mdbVersion);
- mdbVersion = controller.DebuggerServer.InitializeMdb (mdbVersion, Process.GetCurrentProcess ().Id);
- detectedMdbVersions [prefix] = mdbVersion;
- }
-
- protected override void OnAttachToProcess (long processId)
- {
- started = true;
- controller.StartDebugger (null);
- InitMdbVersion ("?");
- controller.DebuggerServer.AttachToProcess (processId, Options);
- }
-
- protected override void OnDetach ()
- {
- controller.DebuggerServer.Detach ();
- }
-
- protected override void OnStop ()
- {
- controller.DebuggerServer.Stop ();
- }
-
- protected override void OnExit ()
- {
- controller.Exit ();
- }
-
- protected override void OnStepLine ()
- {
- controller.DebuggerServer.StepLine ();
- }
-
- protected override void OnNextLine ()
- {
- controller.DebuggerServer.NextLine ();
- }
-
- protected override void OnStepInstruction ()
- {
- controller.DebuggerServer.StepInstruction ();
- }
-
- protected override void OnNextInstruction ()
- {
- controller.DebuggerServer.NextInstruction ();
- }
-
- protected override void OnFinish ()
- {
- controller.DebuggerServer.Finish ();
- }
-
- //breakpoints etc
-
- // returns a handle
- protected override object OnInsertBreakEvent (BreakEvent be, bool activate)
- {
- return controller.DebuggerServer.InsertBreakEvent (be, activate);
- }
-
- protected override void OnRemoveBreakEvent (object handle)
- {
- if (controller.DebuggerServer != null)
- controller.DebuggerServer.RemoveBreakEvent ((int)handle);
- }
-
- protected override void OnEnableBreakEvent (object handle, bool enable)
- {
- controller.DebuggerServer.EnableBreakEvent ((int)handle, enable);
- }
-
- protected override object OnUpdateBreakEvent (object handle, BreakEvent be)
- {
- return controller.DebuggerServer.UpdateBreakEvent (handle, be);
- }
-
- protected override void OnContinue ()
- {
- controller.DebuggerServer.Continue ();
- }
-
- protected override ThreadInfo[] OnGetThreads (long processId)
- {
- return controller.DebuggerServer.GetThreads (processId);
- }
-
- protected override ProcessInfo[] OnGetProcesses ()
- {
- return controller.DebuggerServer.GetProcesses ();
- }
-
- protected override Backtrace OnGetThreadBacktrace (long processId, long threadId)
- {
- return controller.DebuggerServer.GetThreadBacktrace (processId, threadId);
- }
-
- protected override void OnSetActiveThread (long processId, long threadId)
- {
- controller.DebuggerServer.SetActiveThread (processId, threadId);
- }
-
- protected override AssemblyLine[] OnDisassembleFile (string file)
- {
- return controller.DebuggerServer.DisassembleFile (file);
- }
-
- internal void UpdateBreakEvent (object handle, int count, string lastTrace)
- {
- if (count != -1)
- UpdateHitCount (handle, count);
- if (lastTrace != null)
- UpdateLastTraceValue (handle, lastTrace);
- }
-
- protected override bool AllowBreakEventChanges {
- get {
- if (controller != null && controller.DebuggerServer != null)
- return controller.DebuggerServer.AllowBreakpointChanges;
- else
- return true;
- }
- }
- }
-}
diff --git a/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Backend.Mdb/MonoDebuggerSessionFactory.cs b/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Backend.Mdb/MonoDebuggerSessionFactory.cs
deleted file mode 100644
index 1dff28442b..0000000000
--- a/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Backend.Mdb/MonoDebuggerSessionFactory.cs
+++ /dev/null
@@ -1,106 +0,0 @@
-// MonoDebuggerFactory.cs
-//
-// Author:
-// Lluis Sanchez Gual <lluis@novell.com>
-//
-// Copyright (c) 2008 Novell, Inc (http://www.novell.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-//
-//
-
-using System;
-using System.Collections.Generic;
-using System.IO;
-using Mono.Debugging.Backend;
-using Mono.Debugging.Client;
-using MonoDevelop.Debugger;
-using MonoDevelop.Core.Execution;
-using MonoDevelop.Core.Assemblies;
-using Mono.Debugging.Backend.Mdb;
-
-namespace MonoDevelop.Debugger.Mdb
-{
- public class MonoDebuggerSessionFactory: IDebuggerEngine
- {
- public bool CanDebugCommand (ExecutionCommand command)
- {
- DotNetExecutionCommand cmd = command as DotNetExecutionCommand;
- return cmd != null && DebuggingSupported (cmd.TargetRuntime);
- }
-
- public DebuggerStartInfo CreateDebuggerStartInfo (ExecutionCommand command)
- {
- DotNetExecutionCommand cmd = (DotNetExecutionCommand) command;
- MonoDebuggerStartInfo startInfo = CreateDebuggerStartInfo (cmd.TargetRuntime);
-
- startInfo.Command = cmd.Command;
- startInfo.Arguments = cmd.Arguments;
- startInfo.WorkingDirectory = cmd.WorkingDirectory;
- if (cmd.EnvironmentVariables.Count > 0) {
- foreach (KeyValuePair<string,string> val in cmd.EnvironmentVariables)
- startInfo.EnvironmentVariables [val.Key] = val.Value;
- }
- return startInfo;
- }
-
- public DebuggerSession CreateSession ()
- {
- MonoDebuggerSession ds = new MonoDebuggerSession ();
- ds.StartDebugger ();
- return ds;
- }
-
- public ProcessInfo[] GetAttachableProcesses ()
- {
- List<ProcessInfo> procs = new List<ProcessInfo> ();
- foreach (string dir in Directory.GetDirectories ("/proc")) {
- int id;
- if (!int.TryParse (Path.GetFileName (dir), out id))
- continue;
- try {
- File.ReadAllText (Path.Combine (dir, "sessionid"));
- } catch {
- continue;
- }
- string cmdline = File.ReadAllText (Path.Combine (dir, "cmdline"));
- cmdline = cmdline.Replace ('\0',' ');
- ProcessInfo pi = new ProcessInfo (id, cmdline);
- procs.Add (pi);
- }
- return procs.ToArray ();
- }
-
- public static bool DebuggingSupported (TargetRuntime tr)
- {
- if (tr == null) tr = MonoDevelop.Core.Runtime.SystemAssemblyService.DefaultRuntime;
- return (tr is MonoTargetRuntime) && tr.AssemblyContext.GetPackage ("mono-debugger") != null;
- }
-
- public static MonoDebuggerStartInfo CreateDebuggerStartInfo (TargetRuntime tr)
- {
- if (tr == null) tr = MonoDevelop.Core.Runtime.SystemAssemblyService.DefaultRuntime;
- MonoDebuggerStartInfo startInfo = new MonoDebuggerStartInfo ();
- MonoTargetRuntime mtr = (MonoTargetRuntime) tr;
- startInfo.ServerEnvironment = mtr.EnvironmentVariables;
- startInfo.MonoPrefix = mtr.Prefix;
- return startInfo;
- }
- }
-}
diff --git a/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Backend.Mdb/MonoDebuggerStartInfo.cs b/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Backend.Mdb/MonoDebuggerStartInfo.cs
deleted file mode 100644
index 7d18bd1e48..0000000000
--- a/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Backend.Mdb/MonoDebuggerStartInfo.cs
+++ /dev/null
@@ -1,42 +0,0 @@
-//
-// MonoDebuggerStartInfo.cs
-//
-// Author:
-// Lluis Sanchez Gual <lluis@novell.com>
-//
-// Copyright (c) 2009 Novell, Inc (http://www.novell.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-using System;
-using System.Collections.Generic;
-using Mono.Debugging.Client;
-
-namespace Mono.Debugging.Backend.Mdb
-{
- [Serializable]
- public class MonoDebuggerStartInfo: DebuggerStartInfo
- {
- public bool IsXsp { get; set; }
- public bool UserCodeOnly { get; set; }
- public string MonoPrefix { get; set; }
- public IDictionary<string,string> ServerEnvironment { get; set; }
- public List<string> UserModules { get; set; }
- }
-}
diff --git a/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Backend.Mdb/mono.debugging.backend.mdb.pc.in b/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Backend.Mdb/mono.debugging.backend.mdb.pc.in
deleted file mode 100644
index f897ec27ba..0000000000
--- a/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Backend.Mdb/mono.debugging.backend.mdb.pc.in
+++ /dev/null
@@ -1,6 +0,0 @@
-Name: Mono.Debugging.Backend.Mdb
-Description: Mono.Debugging.Backend.Mdb
-Version:
-
-Requires:
-Libs: -r:@expanded_libdir@/@PACKAGE@/DebuggerClient.dll
diff --git a/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Server.Mdb/ArrayAdaptor.cs b/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Server.Mdb/ArrayAdaptor.cs
deleted file mode 100644
index 274e366db1..0000000000
--- a/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Server.Mdb/ArrayAdaptor.cs
+++ /dev/null
@@ -1,77 +0,0 @@
-// ArrayAdaptor.cs
-//
-// Author:
-// Lluis Sanchez Gual <lluis@novell.com>
-//
-// Copyright (c) 2008 Novell, Inc (http://www.novell.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-//
-//
-
-using System;
-using Mono.Debugger;
-using Mono.Debugger.Languages;
-using Mono.Debugging.Client;
-using Mono.Debugging.Evaluation;
-
-namespace DebuggerServer
-{
- class ArrayAdaptor: ICollectionAdaptor
- {
- TargetArrayObject array;
- MdbEvaluationContext ctx;
-
- public ArrayAdaptor (MdbEvaluationContext ctx, TargetArrayObject array)
- {
- this.ctx = ctx;
- this.array = array;
- }
-
- public int[] GetDimensions ()
- {
- TargetArrayBounds bounds = array.GetArrayBounds (ctx.Thread);
- if (bounds.IsMultiDimensional) {
- int[] dims = new int [bounds.LowerBounds.Length];
- for (int n=0; n<bounds.Rank; n++)
- dims [n] = bounds.UpperBounds [n] - bounds.LowerBounds [n] + 1;
- return dims;
- } else if (!bounds.IsUnbound)
- return new int[] { bounds.Length };
- else
- return new int [0];
- }
-
- public object GetElement (int[] indices)
- {
- return array.GetElement (ctx.Thread, indices);
- }
-
- public void SetElement (int[] indices, object val)
- {
- array.SetElement (ctx.Thread, indices, (TargetObject) val);
- }
-
- public object ElementType {
- get {
- return array.Type.ElementType;
- }
- }
- }
-}
diff --git a/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Server.Mdb/AssemblyInfo.cs b/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Server.Mdb/AssemblyInfo.cs
deleted file mode 100644
index ee175395aa..0000000000
--- a/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Server.Mdb/AssemblyInfo.cs
+++ /dev/null
@@ -1,30 +0,0 @@
-// AssemblyInfo.cs created with MonoDevelop
-// User: radical at 7:09 PM 4/28/2008
-//
-// To change standard headers go to Edit->Preferences->Coding->Standard Headers
-//
-using System.Reflection;
-using System.Runtime.CompilerServices;
-
-// Information about this assembly is defined by the following attributes.
-// Change them to the values specific to your project.
-
-[assembly: AssemblyTitle("DebuggerServer")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("")]
-[assembly: AssemblyCopyright("")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}".
-// If the build and revision are set to '*' they will be updated automatically.
-
-[assembly: AssemblyVersion("1.0.0.0")]
-
-// The following attributes are used to specify the signing key for the assembly,
-// if desired. See the Mono documentation for more information about signing.
-
-[assembly: AssemblyDelaySign(false)]
-[assembly: AssemblyKeyFile("")]
diff --git a/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Server.Mdb/BacktraceWrapper.cs b/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Server.Mdb/BacktraceWrapper.cs
deleted file mode 100644
index 1934258060..0000000000
--- a/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Server.Mdb/BacktraceWrapper.cs
+++ /dev/null
@@ -1,137 +0,0 @@
-using System;
-using System.Text;
-using System.Collections.Generic;
-
-using MD = Mono.Debugger;
-using DL = Mono.Debugging.Client;
-
-using Mono.Debugging.Client;
-using Mono.Debugging.Evaluation;
-using Mono.Debugging.Backend;
-using Mono.Debugger.Languages;
-
-namespace DebuggerServer
-{
- class BacktraceWrapper: BaseBacktrace, IBacktrace, IDisposable
- {
- MD.StackFrame[] frames;
- DissassemblyBuffer[] disBuffers;
- bool disposed;
- TargetObject exception;
-
- public BacktraceWrapper (MD.StackFrame[] frames, TargetObject exception): base (Server.Instance.MdbObjectValueAdaptor)
- {
- this.frames = frames;
- this.exception = exception;
- Connect ();
- }
-
- public void Dispose ()
- {
- disposed = true;
- }
-
- public override int FrameCount {
- get { return frames.Length; }
- }
-
- public override DL.StackFrame[] GetStackFrames (int firstIndex, int lastIndex)
- {
- CheckDisposed ();
-
- //FIXME: validate indices
-
- List<DL.StackFrame> list = new List<DL.StackFrame> ();
- for (int i = firstIndex; i <= lastIndex && i < frames.Length; i ++) {
- MD.StackFrame frame = frames [i];
- string method = null;
- string filename = null;
- int line = -1;
-
- if (frame.Method != null) {
- method = frame.Method.Name;
- if (!method.StartsWith ("<")) {
- int p = method.IndexOf ('(');
- if (p != -1)
- method = method.Substring (0, p).Trim ();
- }
- } else if (frame.Name != null) {
- method = frame.Name.Name;
- } else {
- method = "?";
- }
-
- if (frame.SourceAddress != null) {
- if (frame.SourceAddress.SourceFile != null)
- filename = frame.SourceAddress.SourceFile.FileName;
- line = frame.SourceAddress.Row;
- }
-
- string lang = frame.Language != null ? frame.Language.Name : string.Empty;
- list.Add (new DL.StackFrame (frame.TargetAddress.Address, new DL.SourceLocation (method, filename, line), lang));
- }
-
- return list.ToArray ();
- }
-
- protected override EvaluationContext GetEvaluationContext (int frameIndex, EvaluationOptions options)
- {
- CheckDisposed ();
- MD.StackFrame frame = frames [frameIndex];
- return new MdbEvaluationContext (frame.Thread, frame, exception, options);
- }
-
- public override AssemblyLine[] Disassemble (int frameIndex, int firstLine, int count)
- {
- CheckDisposed ();
- if (disBuffers == null)
- disBuffers = new MdbDissassemblyBuffer [frames.Length];
-
- MD.StackFrame frame = frames [frameIndex];
- DissassemblyBuffer buffer = disBuffers [frameIndex];
- if (buffer == null) {
- buffer = new MdbDissassemblyBuffer (frame.Thread, frame.TargetAddress);
- disBuffers [frameIndex] = buffer;
- }
-
- return buffer.GetLines (firstLine, firstLine + count - 1);
- }
-
- void CheckDisposed ()
- {
- if (disposed)
- throw new InvalidOperationException ("Invalid stack frame");
- }
- }
-
- class MdbDissassemblyBuffer: DissassemblyBuffer
- {
- MD.Thread thread;
- MD.TargetAddress baseAddr;
-
- public MdbDissassemblyBuffer (MD.Thread thread, MD.TargetAddress addr): base (addr.Address)
- {
- this.thread = thread;
- this.baseAddr = addr;
- }
-
- public override AssemblyLine[] GetLines (long startAddr, long endAddr)
- {
- List<AssemblyLine> lines = new List<AssemblyLine> ();
-
- MD.TargetAddress addr = baseAddr + (startAddr - baseAddr.Address);
- while (addr.Address <= endAddr) {
- try {
- MD.AssemblerLine line = thread.DisassembleInstruction (null, addr);
- lines.Add (new AssemblyLine (addr.Address, line.Text));
- addr += line.InstructionSize;
- } catch {
- Console.WriteLine ("failed " + addr.Address);
- lines.Add (new AssemblyLine (addr.Address, "??"));
- addr++;
- }
- }
- return lines.ToArray ();
- }
- }
-}
diff --git a/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Server.Mdb/ChangeLog b/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Server.Mdb/ChangeLog
deleted file mode 100644
index d6968432c9..0000000000
--- a/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Server.Mdb/ChangeLog
+++ /dev/null
@@ -1,742 +0,0 @@
-2010-05-07 Lluis Sanchez Gual <lluis@novell.com>
-
- * IndexerValueReference.cs: Track api changes.
-
-2010-03-17 Lluis Sanchez Gual <lluis@novell.com>
-
- * Mono.Debugging.Server.Mdb.csproj: Flush.
-
-2010-03-17 Lluis Sanchez Gual <lluis@novell.com>
-
- * Mono.Debugging.Server.Mdb.csproj: Merged MD.Projects into
- MD.Core, and MD.Projects.Gui, MD.Core.Gui and MD.Components
- into MD.Ide.
-
-2010-03-08 Jonathan Pryor <jpryor@novell.com>
-
- * Makefile: Set $(ASSEMBLY_COMPILER_COMMAND) to $(CSC).
- This allows a top-level CSC override to be used within this
- module (e.g. top-level `make CSC=dmcs` for a v4 build).
-
-2010-03-01 Lluis Sanchez Gual <lluis@novell.com>
-
- * IndexerValueReference.cs:
- * MdbObjectValueAdaptor.cs: Fixed indexer issues.
-
-2010-03-01 Lluis Sanchez Gual <lluis@novell.com>
-
- * IndexerValueReference.cs:
- * MdbObjectValueAdaptor.cs: Track api changes.
-
-2010-02-22 Lluis Sanchez Gual <lluis@novell.com>
-
- * DebuggerServer.cs:
- * BacktraceWrapper.cs:
- * EvaluationContext.cs:
- * MdbObjectValueAdaptor.cs: Improve implementation of
- catchpoints. Properly report the catchpoint exception.
-
-2010-02-22 Lluis Sanchez Gual <lluis@novell.com>
-
- * DebuggerServer.cs: Track api changes.
-
-2010-02-22 Mike Krüger <mkrueger@novell.com>
-
- * MdbObjectValueAdaptor.cs: fixed build.
-
-2010-02-16 Lluis Sanchez Gual <lluis@novell.com>
-
- * DebuggerServer.cs: Tracepoints are now printed by the
- debugging engine.
-
- * Mono.Debugging.Server.Mdb.csproj: Flush.
-
-2009-12-15 Lluis Sanchez Gual <lluis@novell.com>
-
- * MdbObjectValueAdaptor.cs: Improved ToString method for
- primitive and class types. Improved Cast method. Allow
- casting between primitive types and enums. Removed a bunch
- of formatting code, now reused from the base
- ObjectValueAdapter. In GetRealObject, don't dereference enum
- types: we want to get the enum value and dereference only
- when necessary. Other misc fixes.
-
- * FieldReference.cs: Allow getting fields from enums and other
- non-struct types.
-
- * IndexerValueReference.cs: Added special case for string
- indexer.
-
-2009-12-14 Lluis Sanchez Gual <lluis@novell.com>
-
- * DebuggerServer.cs: Don't try to change breakpoints if the
- target already exited.
-
-2009-12-11 Lluis Sanchez Gual <lluis@novell.com>
-
- * DebuggerServer.cs:
- * MdbObjectValueAdaptor.cs: Track api changes.
-
-2009-12-03 Lluis Sanchez Gual <lluis@novell.com>
-
- * MdbObjectValueAdaptor.cs: Track api changes.
-
-2009-12-02 Lluis Sanchez Gual <lluis@novell.com>
-
- * FieldReference.cs:
- * PropertyReference.cs:
- * MdbObjectValueAdaptor.cs: Implement new members. Properly
- set the Global flag for static fields and properties.
-
-2009-11-23 Lluis Sanchez Gual <lluis@novell.com>
-
- * Convert.cs: Improve conversion of corlib types.
-
-2009-11-19 Lluis Sanchez Gual <lluis@novell.com>
-
- * BacktraceWrapper.cs: Subclass BaseBacktrace and reuse some
- code from it.
-
- * MdbObjectValueAdaptor.cs: Track api changes. Improved check
- for evaluation options.
-
-2009-11-18 Lluis Sanchez Gual <lluis@novell.com>
-
- * MdbObjectValueAdaptor.cs: Always show properties, even if we
- can't evaluate them.
-
- * IndexerValueReference.cs: Don't allow evaluating properties
- if target invoke is disabled.
-
-2009-11-18 Lluis Sanchez Gual <lluis@novell.com>
-
- * DebuggerServer.cs:
- * BacktraceWrapper.cs:
- * EvaluationContext.cs:
- * MdbObjectValueAdaptor.cs: Track api changes.
-
-2009-11-17 Lluis Sanchez Gual <lluis@novell.com>
-
- * DebuggerServer.cs:
- * BacktraceWrapper.cs:
- * EvaluationContext.cs:
- * MdbObjectValueAdaptor.cs: Use the new options object. Track
- api changes.
-
-2009-10-18 Michael Hutchinson <mhutchinson@novell.com>
-
- * DebuggerServer.cs: Fix Pocess/Process spelling.
-
-2009-10-13 Lluis Sanchez Gual <lluis@novell.com>
-
- * MdbAdaptorFactory.cs: Don't write compilation errors to the
- standard output.
-
-2009-10-06 Lluis Sanchez Gual <lluis@novell.com>
-
- * MdbObjectValueAdaptor.cs: Avoid cast exception in GetMembers
- when the object is of type TargetObjectObject. Fixes bug
- #543805.
-
-2009-10-06 Lluis Sanchez Gual <lluis@novell.com>
-
- * MdbAdaptor-2-4-2.cs: Add missing null check. Fixes bug
- #544137 - Exception while run command.
-
-2009-10-05 Lluis Sanchez Gual <lluis@novell.com>
-
- * DebuggerServer.cs: Use long for thread and process id.
-
-2009-10-02 Lluis Sanchez Gual <lluis@novell.com>
-
- * MdbObjectValueAdaptor.cs: Use the correct exception to
- report target exceptions.
-
-2009-10-02 Lluis Sanchez Gual <lluis@novell.com>
-
- * BacktraceWrapper.cs: Sort locals.
-
-2009-10-02 Lluis Sanchez Gual <lluis@novell.com>
-
- * Convert.cs:
- * MdbObjectValueAdaptor.cs: Improve support for nullable
- types.
-
-2009-10-02 Lluis Sanchez Gual <lluis@novell.com>
-
- * DebuggerServer.cs: Notify the started event before starting
- the session. In this way, breakpoints will be inserted
- before reaching main. Fixes bug #541727 - Debugger never
- stops at the breakpoint.
-
-2009-09-23 Lluis Sanchez Gual <lluis@novell.com>
-
- * ArrayAdaptor.cs: CreateElementValue is not required anymore.
-
-2009-09-23 Lluis Sanchez Gual <lluis@novell.com>
-
- * MdbObjectValueAdaptor.cs: Don't show compiler generated
- fields.
-
-2009-09-23 Lluis Sanchez Gual <lluis@novell.com>
-
- * MdbObjectValueAdaptor.cs: Implemented CreateValue. Fixed
- resolution of nested types in GetType(name).
-
-2009-09-22 Lluis Sanchez Gual <lluis@novell.com>
-
- * MdbObjectValueAdaptor.cs: Add support for
- DebuggerTypeProxyAttribute, DebuggerBrowsable and
- DebuggerDisplayAttribute.
-
-2009-09-22 Lluis Sanchez Gual <lluis@novell.com>
-
- * MdbObjectValueAdaptor.cs: Add support for examining nested
- types.
-
-2009-09-22 Lluis Sanchez Gual <lluis@novell.com>
-
- * DebuggerServer.cs: Remove debug code.
-
-2009-09-22 Lluis Sanchez Gual <lluis@novell.com>
-
- * DebuggerServer.cs: Watch the parent process, and stop the
- server if the parent dies.
-
- * MdbObjectValueAdaptor.cs: Fix incorrect check for
- AllowTargetInvoke.
-
-2009-09-17 Lluis Sanchez Gual <lluis@novell.com>
-
- * DebuggerServer.cs: Properly parse quoted arguments. Fixes
- bug #539317 - NUnit addin fails to run tests under the
- debugger.
-
-2009-09-17 Lluis Sanchez Gual <lluis@novell.com>
-
- * MdbAdaptor.cs:
- * MdbAdaptor-2-0.cs:
- * DebuggerServer.cs:
- * MdbAdaptor-2-4-2.cs:
- * MdbAdaptor-2-4-4.cs: Implemented AllowBreakEventChanges
- property.
-
-2009-09-14 Lluis Sanchez Gual <lluis@novell.com>
-
- * MdbObjectValueAdaptor.cs: Added some checks for
- AllowTargetInvoke flag. When resolving a method, in case of
- multiple valid matches, just pick the first one. Fixes bug
- #538059.
-
-2009-09-01 Lluis Sanchez Gual <lluis@novell.com>
-
- * MdbAdaptor-2-4-4.cs:
- * MdbAdaptor-2-4-2.cs: Breakpoint activation while running was
- not supported by mono 2.4.2.
-
-2009-08-28 Lluis Sanchez Gual <lluis@novell.com>
-
- * MdbObjectValueAdaptor.cs: Fixed some issue with static
- method invocation, and implemented HasMethod.
-
-2009-08-28 Lluis Sanchez Gual <lluis@novell.com>
-
- * Makefile:
- * MdbAdaptor.cs:
- * MdbAdaptor-2-6.cs:
- * MdbAdaptor-2-0.cs:
- * DebuggerServer.cs:
- * MdbAdaptor-2-4-2.cs:
- * MdbAdaptor-2-4-4.cs:
- * MdbAdaptorFactory.cs:
- * Mono.Debugging.Server.Mdb.csproj: Reorganized adaptors a
- bit. Added real support for setting breakpoints while
- running.
-
-2009-07-22 Lluis Sanchez Gual <lluis@novell.com>
-
- * Util.cs:
- * Makefile:
- * Convert.cs:
- * ObjectUtil.cs:
- * ArrayAdaptor.cs:
- * RawViewSource.cs:
- * FieldReference.cs:
- * TimedEvaluator.cs:
- * DebuggerServer.cs:
- * ValueReference.cs:
- * TimeOutException.cs:
- * BacktraceWrapper.cs:
- * EvaluationContext.cs:
- * PropertyReference.cs:
- * VariableReference.cs:
- * RemoteFrameObject.cs:
- * CollectionAdaptor.cs:
- * ArrayElementGroup.cs:
- * TypeValueReference.cs:
- * NullValueReference.cs:
- * ICollectionAdaptor.cs:
- * ArrayValueReference.cs:
- * NRefactoryEvaluator.cs:
- * ExpressionEvaluator.cs:
- * RuntimeInvokeManager.cs:
- * IndexerValueReference.cs:
- * UserVariableReference.cs:
- * LiteralValueReference.cs:
- * MdbObjectValueAdaptor.cs:
- * AsyncEvaluationTracker.cs:
- * NamespaceValueReference.cs:
- * Mono.Debugging.Server.Mdb.csproj: Use the new expression
- evaluation api, shared with the win32 debugger.
-
-2009-06-15 Lluis Sanchez Gual <lluis@novell.com>
-
- * MdbAdaptor-2-4-2.cs: Track api changes.
-
-2009-06-11 Lluis Sanchez Gual <lluis@novell.com>
-
- * Makefile:
- * NRefactoryEvaluator.cs:
- * UserVariableReference.cs:
- * Mono.Debugging.Server.Mdb.csproj: Added support for defining
- variables.
-
-2009-06-04 Lluis Sanchez Gual <lluis@novell.com>
-
- * Makefile:
- * MdbAdaptor.cs:
- * MdbAdaptor-2-0.cs:
- * DebuggerServer.cs:
- * MdbAdaptor-2-6.cs:
- * MdbAdaptor-2-4-2.cs:
- * MdbAdaptorFactory.cs:
- * RuntimeInvokeManager.cs:
- * Mono.Debugging.Server.Mdb.csproj: Track api changes in the
- debugger.
-
- * ObjectUtil.cs:
- * TimedEvaluator.cs:
- * CollectionAdaptor.cs: Fix warning.
-
-2009-05-19 Lluis Sanchez Gual <lluis@novell.com>
-
- * Mono.Debugging.Server.Mdb.csproj: Flush.
-
-2009-05-06 Lluis Sanchez Gual <lluis@novell.com>
-
- * MdbAdaptor-2-6.cs: Don't enable user modules for normal app
- debugging.
-
-2009-05-04 Lluis Sanchez Gual <lluis@novell.com>
-
- * MdbAdaptor.cs:
- * MdbAdaptor-2-6.cs:
- * DebuggerServer.cs: SourceBreakpoint.IsUserModule requires
- latest mdb.
-
-2009-05-04 Lluis Sanchez Gual <lluis@novell.com>
-
- * DebuggerServer.cs:
- * MdbAdaptorFactory.cs: Try to detect the mdb version only
- once per session.
-
- * MdbAdaptor.cs:
- * MdbAdaptor-2-6.cs: Properly set user modules when
- initializing.
-
-2009-04-27 Lluis Sanchez Gual <lluis@novell.com>
-
- * DebuggerServer.cs: Fix api change issue.
-
-2009-04-27 Lluis Sanchez Gual <lluis@novell.com>
-
- * Makefile:
- * MdbAdaptor.cs:
- * DebuggerServer.cs:
- * MdbAdaptor-2-6.cs:
- * BacktraceWrapper.cs:
- * MdbAdaptorFactory.cs:
- * Mono.Debugging.Server.Mdb.csproj: Initial support for XSP.
-
-2009-03-13 Michael Hutchinson <mhutchinson@novell.com>
-
- * NRefactoryEvaluator.cs: Fix typo.
-
- * Mono.Debugging.Server.Mdb.csproj: Updated.
-
-2009-02-20 Lluis Sanchez Gual <lluis@novell.com>
-
- * Mono.Debugging.Server.Mdb.csproj: Updated references.
-
-2009/02/06 Lluis Sanchez Gual <lluis@novell.com>
-
- * Mono.Debugging.Server.Mdb.mdp:
- * Mono.Debugging.Server.Mdb.csproj: Migrated to MSBuild file format.
-
-2009-01-27 Lluis Sanchez Gual <lluis@novell.com>
-
- * Mono.Debugging.Server.Mdb.mdp: Fix target framework.
-
-2009-01-26 Michael Hutchinson <mhutchinson@novell.com>
-
- * Mono.Debugging.Server.Mdb.mdp: Flush project format changes.
-
-2008-12-20 Lluis Sanchez Gual <lluis@novell.com>
-
- * TimedEvaluator.cs: Fix build for old mono versions.
-
-2008-12-19 Lluis Sanchez Gual <lluis@novell.com>
-
- * TimedEvaluator.cs:
- * ValueReference.cs:
- * DebuggerServer.cs:
- * BacktraceWrapper.cs:
- * TimeOutException.cs:
- * RemoteFrameObject.cs:
- * RuntimeInvokeManager.cs:
- * AsyncEvaluationTracker.cs: Implemented support for async evaluation of
- expressions.
-
- * Util.cs:
- * Convert.cs:
- * ObjectUtil.cs:
- * ArrayAdaptor.cs:
- * RawViewSource.cs:
- * FieldReference.cs:
- * EvaluationContext.cs:
- * PropertyReference.cs:
- * CollectionAdaptor.cs:
- * ArrayElementGroup.cs:
- * VariableReference.cs:
- * TypeValueReference.cs:
- * NullValueReference.cs:
- * ArrayValueReference.cs:
- * NRefactoryEvaluator.cs:
- * ExpressionEvaluator.cs:
- * IndexerValueReference.cs:
- * LiteralValueReference.cs:
- * NamespaceValueReference.cs: Use the new EvaluationContext class to get
- the current frame or thread. Thread.CurrentFrame will not give the
- original frame if some runtime invocation has been done since the
- debugger stopped.
-
- * Makefile:
- * Mono.Debugging.Server.Mdb.mdp: Added new files.
-
-2008-12-09 Lluis Sanchez Gual <lluis@novell.com>
-
- * Mono.Debugging.Server.Mdb.mdp: Don't require a specific version of
- Mono.Addins.
-
-2008-12-04 Lluis Sanchez Gual <lluis@novell.com>
-
- * DebuggerServer.cs: Properly set the working directory.
-
- * BacktraceWrapper.cs: Add a missing try/catch.
-
- * TypeValueReference.cs: Improve reliability.
-
-2008-12-02 Lluis Sanchez Gual <lluis@novell.com>
-
- * BacktraceWrapper.cs:
- * NRefactoryEvaluator.cs: There is now a new kind flag for NotSupported
- errors. Use it.
-
- * NamespaceValueReference.cs: Properly get child namespaces of a
- namespace.
-
-2008-12-01 Lluis Sanchez Gual <lluis@novell.com>
-
- * DebuggerServer.cs: Get the exception object from the frame.
- Language.CreateObject won't work for native language.
-
- * BacktraceWrapper.cs: Fixed NRE. Native methods don't have a declaring
- type.
-
- * Makefile:
- * Mono.Debugging.Server.Mdb.mdp: Add required ref.
-
- * NamespaceValueReference.cs: Use system.reflection to access to the
- mono.cecil object model. We can't use MD's Mono.Cecil here because
- the debugger is using its own copy and conflicts.
-
-2008-11-25 Lluis Sanchez Gual <lluis@novell.com>
-
- * CollectionAdaptor.cs: Add missing check. Collection adaptors are not
- implemented for non-managed languages.
-
-2008-09-26 Lluis Sanchez Gual <lluis@novell.com>
-
- * DebuggerServer.cs: Improve thread location string.
-
-2008-09-25 Lluis Sanchez Gual <lluis@novell.com>
-
- * DebuggerServer.cs: Use the gui manager to resume internally stopped
- threads.
- * Convert.cs: Fix object conversion.
- * ObjectUtil.cs: Make GetTypeDisplayData more robust.
-
-2008-09-17 Lluis Sanchez Gual <lluis@novell.com>
-
- * Mono.Debugging.Server.Mdb.mdp: Updated projects.
-
-2008-09-03 Lluis Sanchez Gual <lluis@novell.com>
-
- * DebuggerServer.cs: Fill the Exception property for the Exception and
- UnhandledException events.
-
-2008-08-29 Lluis Sanchez Gual <lluis@novell.com>
-
- * DebuggerServer.cs: Fix build.
-
-2008-08-22 Lluis Sanchez Gual <lluis@novell.com>
-
- * MyTextReader.cs, Expression.cs: Remove unused stuff.
-
-2008-08-18 Lluis Sanchez Gual <lluis@novell.com>
-
- * Mono.Debugging.Server.Mdb.mdp: Fix reference to Mono.TextEditor. The
- incorrect add-in version number causes problems in the makefile
- synchronization.
-
-2008-08-18 Lluis Sanchez Gual <lluis@novell.com>
-
- * DebuggerServer.cs: Optimize backtrace retrieval (trying to get the
- unmanaged backtrace when the current frame is managed is slow).
- * Util.cs: Ignore properties which don't have a getter.
- * ObjectUtil.cs: Added null check.
-
-2008-08-06 Lluis Sanchez Gual <lluis@novell.com>
-
- * DebuggerServer.cs: Add support for live hit count and trace updating.
-
-2008-08-05 Lluis Sanchez Gual <lluis@novell.com>
-
- * DebuggerServer.cs: Provide a location when creating a ThreadInfo.
-
-2008-07-31 Lluis Sanchez Gual <lluis@novell.com>
-
- * DebuggerServer.cs: Report module loading. Fixed break command.
-
-2008-07-31 Lluis Sanchez Gual <lluis@novell.com>
-
- * ObjectUtil.cs: Added hack to make the proxy attribute work for
- generic types.
- * CollectionAdaptor.cs: Don't try to create a collection adaptor for
- generic types. It won't work.
-
-2008-07-31 Lluis Sanchez Gual <lluis@novell.com>
-
- * DebuggerServer.cs, Util.cs, ExpressionEvaluator.cs,
- Mono.Debugging.Server.Mdb.mdp, ValueReference.cs,
- NRefactoryEvaluator.cs, ObjectUtil.cs, ArrayElementGroup.cs,
- RawViewSource.cs, CollectionAdaptor.cs, Makefile,
- IndexerValueReference.cs: Implemented support for
- DebuggerDisplayAttribute, DebuggerBrowsableAttribute and
- DebuggerTypeProxyAttribute.
-
-2008-07-31 Lluis Sanchez Gual <lluis@novell.com>
-
- * DebuggerServer.cs: Enable support for conditional breakpoints.
- * Convert.cs: Allow fundamental conversions of strings. Use new boxing
- API.
- * ObjectUtil.cs: Some cleanup.
- * ArrayElementGroup.cs: Report exception when setting a value.
-
-2008-07-28 Lluis Sanchez Gual <lluis@novell.com>
-
- * NRefactoryEvaluator.cs: Track changes in NRefactory.
-
-2008-07-25 Lluis Sanchez Gual <lluis@novell.com>
-
- * BacktraceWrapper.cs: Implement GetAllLocals.
-
-2008-07-25 Lluis Sanchez Gual <lluis@novell.com>
-
- * DebuggerServer.cs: Added some support for conditional breakpoints and
- tracepoints, although it is currently disabled because it requires
- changes in GUIManager.
- * Util.cs, BacktraceWrapper.cs, ExpressionEvaluator.cs,
- ArrayValueReference.cs, ValueReference.cs, FieldReference.cs,
- PropertyReference.cs, VariableReference.cs,
- LiteralValueReference.cs: Moved several methods for handling
- TargetObject instances from Util to ObjectUtil.
- * Convert.cs: Casting fixes.
- * Mono.Debugging.Server.Mdb.mdp, Makefile: Added new files.
- * NRefactoryEvaluator.cs: Improved error reporting. Added support for
- indexers.
- * ObjectUtil.cs: Moved several methods for handling TargetObject
- instances from Util to ObjectUtil. Added api for invoking target
- methods and getting property values.
- * CollectionAdaptor.cs: Use new api for calling methods and getting
- properties.
- * IndexerValueReference.cs: New value reference to be used to get and
- assign values to indexers.
-
-2008-07-23 Lluis Sanchez Gual <lluis@novell.com>
-
- * BacktraceWrapper.cs, ExpressionEvaluator.cs, ValueReference.cs:
- Improved handling of evaluation errors.
- * CollectionAdaptor.cs: Fix null ref and some warnings.
- * LiteralValueReference.cs: Fix evaluation of literal value.
- * Util.cs: Added some new helper methods.
-
-2008-07-21 Lluis Sanchez Gual <lluis@novell.com>
-
- * DebuggerServer.cs: Set breakpoints using a constructed SourceLocation
- instead of looking for it. In this way the breakpoint can be set
- even if the library is not yet loaded. Other minor fixes.
- * Util.cs: Make sure object references are properly dereferenced. Use
- new collection adaptors.
- * ICollectionAdaptor.cs, ExpressionEvaluator.cs,
- Mono.Debugging.Server.Mdb.mdp, ArrayAdaptor.cs,
- NRefactoryEvaluator.cs, ArrayElementGroup.cs, CollectionAdaptor.cs:
- When inspecting objects implementing ICollection and IDictionary,
- show the elements as children of the object, and provide a "Raw
- View" containing the members of the object.
- * BacktraceWrapper.cs: Provide completion for 'this' reference.
- * ArrayValueReference.cs, FieldReference.cs, PropertyReference.cs,
- VariableReference.cs: Make sure object references are properly
- dereferenced.
- * RemoteFrameObject.cs: Don't allow connecting a RemoteFrameObject more
- than once.
- * Makefile: Added new files.
-
-2008-07-16 Lluis Sanchez Gual <lluis@novell.com>
-
- * DebuggerServer.cs: Implement support for catchpoints.
- * ExpressionEvaluator.cs: Fix pointer issue. Int64 can't be converted
- to IntPtr in 32bit systems.
-
-2008-07-11 Lluis Sanchez Gual <lluis@novell.com>
-
- * DebuggerServer.cs: Fix internal stopping logic.
- * Util.cs, Convert.cs, ExpressionEvaluator.cs, ValueReference.cs,
- NRefactoryEvaluator.cs: Improved support for generic instance
- inspection.
- * BacktraceWrapper.cs: Don't remove parameter list of methods with
- special names.
- * ArrayElementGroup.cs: Improved error catching.
-
-2008-07-11 Lluis Sanchez Gual <lluis@novell.com>
-
- * Makefile: Remove incorrect path.
-
-2008-07-09 Lluis Sanchez Gual <lluis@novell.com>
-
- * DebuggerServer.cs: Ignore target events which don't stop the thread.
- * BacktraceWrapper.cs: Fix method name returned by StackFrame.
- * Makefile: Install the assemblies to the correct directory.
-
-2008-07-09 Lluis Sanchez Gual <lluis@novell.com>
-
- * DebuggerServer.cs: Implemented SetActiveThread. Ignore target events
- coming from non-stopped threads.
-
-2008-07-09 Lluis Sanchez Gual <lluis@novell.com>
-
- * DebuggerServer.cs, Util.cs, PropertyReference.cs: Make sure internal
- invokes to the debugged process do not fire target events.
- * BacktraceWrapper.cs, ExpressionEvaluator.cs, ValueReference.cs,
- ArrayElementGroup.cs: Use a new EvaluationOptions object to provide
- options to the evaluator.
- * TypeValueReference.cs, NamespaceValueReference.cs: Use the internal
- cecil modules to locate types.
- * NRefactoryEvaluator.cs: Support for array access and other fixes.
-
-2008-07-09 Lluis Sanchez Gual <lluis@novell.com>
-
- * BacktraceWrapper.cs, ValueReference.cs, TypeValueReference.cs,
- NamespaceValueReference.cs: Added support for code completion.
-
-2008-07-08 Lluis Sanchez Gual <lluis@novell.com>
-
- * RemoteFrameObject.cs: Crash fix.
-
-2008-07-07 Lluis Sanchez Gual <lluis@novell.com>
-
- * DebuggerServer.cs, Util.cs, MyTextReader.cs, Convert.cs,
- BacktraceWrapper.cs, ExpressionEvaluator.cs,
- Mono.Debugging.Server.Mdb.mdp, NullValueReference.cs,
- IExpressionValueSource.cs, ArrayValueReference.cs,
- ValueReference.cs, RemoteFrameObject.cs, TypeValueReference.cs,
- Expression.cs, NRefactoryEvaluator.cs, FieldReference.cs,
- PropertyReference.cs, VariableReference.cs, IValueReference.cs,
- ArrayElementGroup.cs, Server.cs, NamespaceValueReference.cs,
- LiteralValueReference.cs, Makefile: Implemented an expression
- evaluator based on NRefactory.
-
-2008-07-02 Lluis Sanchez Gual <lluis@novell.com>
-
- * DebuggerServer.cs, Util.cs, BacktraceWrapper.cs, FieldReference.cs,
- Mono.Debugging.Server.Mdb.mdp, PropertyReference.cs,
- IValueReference.cs, VariableReference.cs,
- IExpressionValueSource.cs, Makefile, ArrayValueReference.cs:
- Implement support for modifying variable values and disassembling
- files.
-
-2008-07-01 Lluis Sanchez Gual <lluis@novell.com>
-
- * DebuggerServer.cs: Fix some deadlocks.
- * BacktraceWrapper.cs: Fix infinite loop.
-
-2008-07-01 Lluis Sanchez Gual <lluis@novell.com>
-
- * DebuggerServer.cs: Insert breakpoints using the global thread group.
-
-2008-06-26 Lluis Sanchez Gual <lluis@novell.com>
-
- * Mono.Debugging.Server.Mdb.mdp, Server.cs, Makefile: Enable unix
- channel support.
-
-2008-06-26 Lluis Sanchez Gual <lluis@novell.com>
-
- * DebuggerServer.cs: Allow setting the active thread. Implemented
- GetThreads and GetProcesses.
- * Util.cs, BacktraceWrapper.cs: Fix warnings.
-
-2008-06-20 Lluis Sanchez Gual <lluis@novell.com>
-
- * DebuggerServer.cs: Implemented detach. Send all events to the client
- asynchronously, to avoid deadlocks. Report debug output to the
- client.
- * Server.cs: Implemented detach.
-
-2008-06-20 Lluis Sanchez Gual <lluis@novell.com>
-
- * DebuggerServer.cs, Util.cs, BacktraceWrapper.cs,
- Mono.Debugging.Server.Mdb.mdp: Implemented support for attach to
- process, disassemble.
-
-2008-06-17 Lluis Sanchez Gual <lluis@novell.com>
-
- * Mono.Debugging.Server.Mdb.mdp: Updated.
-
-2008-05-27 Lluis Sanchez Gual <lluis@novell.com>
-
- * DebuggerServer.cs, BacktraceWrapper.cs: Track api changes. Properly
- redirect debugger output. Implemented support for adding
- breakpoints while the target process is running, it seems to kinda
- work.
-
-2008-05-22 Lluis Sanchez Gual <lluis@novell.com>
-
- * Mono.Debugging.Server.Mdb.mdp: Updated project.
-
-2008-05-16 Lluis Sanchez Gual <lluis@novell.com>
-
- * DebuggerServer.cs, Util.cs, BacktraceWrapper.cs,
- Mono.Debugging.Server.Mdb.mdp, IExpressionValueSource.cs, Makefile:
- Implemented query of variable and field data.
-
-2008-05-14 Lluis Sanchez Gual <lluis@novell.com>
-
- * DebuggerServer.cs, AssemblyInfo.cs, Util.cs, BacktraceWrapper.cs,
- Mono.Debugging.Server.Mdb.mdp, ChangeLog, Server.cs, Makefile:
- Initial import.
-
-2008-04-28 Ankit Jain <jankit@novell.com>
-
- * Initial import.
-
-
diff --git a/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Server.Mdb/Convert.cs b/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Server.Mdb/Convert.cs
deleted file mode 100644
index 4bd229da11..0000000000
--- a/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Server.Mdb/Convert.cs
+++ /dev/null
@@ -1,522 +0,0 @@
-// Convert.cs
-//
-// Author:
-// Lluis Sanchez Gual <lluis@novell.com>
-//
-// Copyright (c) 2008 Novell, Inc (http://www.novell.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-//
-//
-
-using System;
-using Mono.Debugger;
-using Mono.Debugger.Languages;
-
-namespace DebuggerServer
-{
- public static class TargetObjectConvert
- {
- static bool ImplicitFundamentalConversionExists (FundamentalKind skind,
- FundamentalKind tkind)
- {
- //
- // See Convert.ImplicitStandardConversionExists in MCS.
- //
- switch (skind) {
- case FundamentalKind.SByte:
- if ((tkind == FundamentalKind.Int16) ||
- (tkind == FundamentalKind.Int32) ||
- (tkind == FundamentalKind.Int64) ||
- (tkind == FundamentalKind.Single) ||
- (tkind == FundamentalKind.Double))
- return true;
- break;
-
- case FundamentalKind.Byte:
- if ((tkind == FundamentalKind.Int16) ||
- (tkind == FundamentalKind.UInt16) ||
- (tkind == FundamentalKind.Int32) ||
- (tkind == FundamentalKind.UInt32) ||
- (tkind == FundamentalKind.Int64) ||
- (tkind == FundamentalKind.UInt64) ||
- (tkind == FundamentalKind.Single) ||
- (tkind == FundamentalKind.Double))
- return true;
- break;
-
- case FundamentalKind.Int16:
- if ((tkind == FundamentalKind.Int32) ||
- (tkind == FundamentalKind.Int64) ||
- (tkind == FundamentalKind.Single) ||
- (tkind == FundamentalKind.Double))
- return true;
- break;
-
- case FundamentalKind.UInt16:
- if ((tkind == FundamentalKind.Int32) ||
- (tkind == FundamentalKind.UInt32) ||
- (tkind == FundamentalKind.Int64) ||
- (tkind == FundamentalKind.UInt64) ||
- (tkind == FundamentalKind.Single) ||
- (tkind == FundamentalKind.Double))
- return true;
- break;
-
- case FundamentalKind.Int32:
- if ((tkind == FundamentalKind.Int64) ||
- (tkind == FundamentalKind.Single) ||
- (tkind == FundamentalKind.Double))
- return true;
- break;
-
- case FundamentalKind.UInt32:
- if ((tkind == FundamentalKind.Int64) ||
- (tkind == FundamentalKind.UInt64) ||
- (tkind == FundamentalKind.Single) ||
- (tkind == FundamentalKind.Double))
- return true;
- break;
-
- case FundamentalKind.Int64:
- case FundamentalKind.UInt64:
- if ((tkind == FundamentalKind.Single) ||
- (tkind == FundamentalKind.Double))
- return true;
- break;
-
- case FundamentalKind.Char:
- if ((tkind == FundamentalKind.UInt16) ||
- (tkind == FundamentalKind.Int32) ||
- (tkind == FundamentalKind.UInt32) ||
- (tkind == FundamentalKind.Int64) ||
- (tkind == FundamentalKind.UInt64) ||
- (tkind == FundamentalKind.Single) ||
- (tkind == FundamentalKind.Double))
- return true;
- break;
-
- case FundamentalKind.Single:
- if (tkind == FundamentalKind.Double)
- return true;
- break;
-
- default:
- break;
- }
-
- return false;
- }
-
- static bool ImplicitFundamentalConversionExists (TargetFundamentalType source, TargetFundamentalType target)
- {
- return ImplicitFundamentalConversionExists (
- source.FundamentalKind, target.FundamentalKind);
- }
-
- static object ImplicitFundamentalConversion (object value, FundamentalKind tkind)
- {
- switch (tkind) {
- case FundamentalKind.Char:
- return System.Convert.ToChar (value);
- case FundamentalKind.SByte:
- return System.Convert.ToSByte (value);
- case FundamentalKind.Byte:
- return System.Convert.ToByte (value);
- case FundamentalKind.Int16:
- return System.Convert.ToInt16 (value);
- case FundamentalKind.UInt16:
- return System.Convert.ToUInt16 (value);
- case FundamentalKind.Int32:
- return System.Convert.ToInt32 (value);
- case FundamentalKind.UInt32:
- return System.Convert.ToUInt32 (value);
- case FundamentalKind.Int64:
- return System.Convert.ToInt64 (value);
- case FundamentalKind.UInt64:
- return System.Convert.ToUInt64 (value);
- case FundamentalKind.Single:
- return System.Convert.ToSingle (value);
- case FundamentalKind.Double:
- return System.Convert.ToDouble (value);
- case FundamentalKind.String:
- return System.Convert.ToString (value);
- default:
- return null;
- }
- }
-
- static TargetObject ImplicitFundamentalConversion (MdbEvaluationContext ctx,
- TargetFundamentalObject obj,
- TargetFundamentalType type)
- {
- FundamentalKind skind = obj.Type.FundamentalKind;
- FundamentalKind tkind = type.FundamentalKind;
-
- if (!ImplicitFundamentalConversionExists (skind, tkind))
- return null;
-
- object value = obj.GetObject (ctx.Thread);
-
- object new_value = ImplicitFundamentalConversion (value, tkind);
- if (new_value == null)
- return null;
-
- return type.Language.CreateInstance (ctx.Thread, new_value);
- }
-
- public static TargetObject ExplicitFundamentalConversion (MdbEvaluationContext ctx,
- TargetFundamentalObject obj,
- TargetFundamentalType type)
- {
- TargetObject retval = ImplicitFundamentalConversion (ctx, obj, type);
- if (retval != null)
- return retval;
-
- FundamentalKind tkind = type.FundamentalKind;
-
- try {
- object value = obj.GetObject (ctx.Thread);
- object new_value = ImplicitFundamentalConversion (value, tkind);
- if (new_value == null)
- return null;
-
- return type.Language.CreateInstance (ctx.Thread, new_value);
- } catch {
- return null;
- }
- }
-
- static bool ImplicitReferenceConversionExists (MdbEvaluationContext ctx,
- TargetStructType source,
- TargetStructType target)
- {
- if (source == target)
- return true;
-
- if (source.Module.Name.StartsWith ("mscorlib,") && target.Module.Name.StartsWith ("mscorlib,")) {
- Type t1 = Type.GetType (source.Name);
- Type t2 = Type.GetType (target.Name);
- return t2.IsAssignableFrom (t1);
- }
-
- if (!source.HasParent)
- return false;
-
- TargetStructType parent_type = source.GetParentType (ctx.Thread);
- return ImplicitReferenceConversionExists (ctx, parent_type, target);
- }
-
- static TargetObject ImplicitReferenceConversion (MdbEvaluationContext ctx,
- TargetClassObject obj,
- TargetClassType type)
- {
- if (obj.Type == type)
- return obj;
-
- if (obj.Type.HasParent) {
- TargetObject pobj = obj.GetParentObject (ctx.Thread);
- if (pobj != null) {
- pobj = ImplicitConversion (ctx, pobj, type);
- if (pobj != null)
- return pobj;
- }
- }
-
- if (ImplicitReferenceConversionExists (ctx, obj.Type, type))
- return obj;
- return null;
- }
-
- public static bool ImplicitConversionExists (MdbEvaluationContext ctx,
- TargetType source, TargetType target)
- {
- if (source.Equals (target))
- return true;
-
- if (source is TargetArrayType && target.Name == "System.Array")
- return true;
-
- if (ObjectUtil.FixTypeName (target.Name) == "System.Object")
- return true;
-
- if (source is TargetArrayType && target is TargetArrayType) {
- TargetArrayType sa = (TargetArrayType) source;
- TargetArrayType ta = (TargetArrayType) target;
- return sa.ElementType.Equals (ta.ElementType);
- }
-
- if (source is TargetEnumType) {
- TargetEnumType e = (TargetEnumType) source;
- if (ImplicitConversionExists (ctx, e.Value.Type, target))
- return true;
- }
-
- if (target is TargetEnumType) {
- TargetEnumType e = (TargetEnumType) target;
- if (ImplicitConversionExists (ctx, source, e.Value.Type))
- return true;
- }
-
- if ((source is TargetFundamentalType) && (target is TargetFundamentalType))
- return ImplicitFundamentalConversionExists (
- (TargetFundamentalType) source,
- (TargetFundamentalType) target);
-
- if ((source is TargetClassType) && (target is TargetClassType))
- return ImplicitReferenceConversionExists (
- ctx, (TargetClassType) source,
- (TargetClassType) target);
-
- return false;
- }
-
- public static TargetObject ImplicitConversion (MdbEvaluationContext ctx,
- TargetObject obj, TargetType type)
- {
- if (obj.Type.Equals (type))
- return obj;
-
- if (type is TargetObjectType || ObjectUtil.FixTypeName (type.Name) == "System.Object") {
- if (obj.Type.IsByRef)
- return obj;
- return BoxValue (ctx, obj);
- }
-
- if (obj is TargetEnumObject && type is TargetFundamentalType) {
- TargetEnumObject e = (TargetEnumObject) obj;
- return ImplicitConversion (ctx, e.GetValue (ctx.Thread), type);
- }
-
- if (type is TargetEnumType) {
- TargetEnumType e = (TargetEnumType) type;
- return ImplicitConversion (ctx, obj, e.Value.Type);
- }
-
- if (obj is TargetArrayObject && type.Name == "System.Array") {
- return obj;
- }
-
- if (obj is TargetArrayObject && type is TargetArrayType) {
- TargetArrayObject sa = (TargetArrayObject) obj;
- TargetArrayType ta = (TargetArrayType) type;
- if (sa.Type.ElementType.Equals (ta.ElementType))
- return obj;
- }
-
- if ((obj is TargetFundamentalObject) && (type is TargetFundamentalType))
- return ImplicitFundamentalConversion (
- ctx, (TargetFundamentalObject) obj,
- (TargetFundamentalType) type);
-
- if ((obj is TargetClassObject) && (type is TargetClassType)) {
- return ImplicitReferenceConversion (
- ctx, (TargetClassObject) obj,
- (TargetClassType) type);
- }
-
- return null;
- }
-
- public static TargetObject ImplicitConversionRequired (MdbEvaluationContext ctx,
- TargetObject obj, TargetType type)
- {
- TargetObject new_obj = ImplicitConversion (ctx, obj, type);
- if (new_obj != null)
- return new_obj;
-
- throw new Exception (string.Format ("Cannot implicitly convert `{0}' to `{1}'", obj.Type.Name, type.Name));
- }
-
- public static TargetClassType ToClassType (TargetType type)
- {
- TargetClassType ctype = type as TargetClassType;
- if (ctype != null)
- return ctype;
-
- TargetObjectType otype = type as TargetObjectType;
- if (otype != null && otype.HasClassType) {
- ctype = otype.ClassType;
- if (ctype != null)
- return ctype;
- }
-
- TargetArrayType atype = type as TargetArrayType;
- if (atype != null) {
- if (atype.Language.ArrayType != null)
- return atype.Language.ArrayType;
- }
-
- throw new Exception (string.Format ("Type `{0}' is not a struct or class.", type.Name));
- }
-
- public static TargetClassObject ToClassObject (MdbEvaluationContext ctx, TargetObject obj)
- {
- TargetClassObject cobj = obj as TargetClassObject;
- if (cobj != null)
- return cobj;
-
- TargetObjectObject oobj = obj as TargetObjectObject;
- if (oobj != null)
- return oobj.GetClassObject (ctx.Thread);
-
- TargetArrayObject aobj = obj as TargetArrayObject;
- if ((aobj != null) && aobj.HasClassObject)
- return aobj.GetClassObject (ctx.Thread);
-
- return null;
- }
-
- public static TargetStructObject ToStructObject (MdbEvaluationContext ctx, TargetObject obj)
- {
- TargetStructObject sobj = obj as TargetStructObject;
- if (sobj != null)
- return sobj;
-
- TargetObjectObject oobj = obj as TargetObjectObject;
- if (oobj != null)
- return oobj.GetClassObject (ctx.Thread);
-
- TargetArrayObject aobj = obj as TargetArrayObject;
- if ((aobj != null) && aobj.HasClassObject)
- return aobj.GetClassObject (ctx.Thread);
-
- return null;
- }
-
- public static TargetObject Cast (MdbEvaluationContext ctx, TargetObject obj, TargetType targetType)
- {
- obj = ObjectUtil.GetRealObject (ctx, obj);
-
- if (obj.Type == targetType)
- return obj;
-
- if (targetType is TargetObjectType || ObjectUtil.FixTypeName (targetType.Name) == "System.Object") {
- if (obj.Type.IsByRef)
- return obj;
- return BoxValue (ctx, obj);
- }
-
- if (targetType is TargetPointerType)
- throw new NotSupportedException ();
-
- if (targetType is TargetFundamentalType) {
- TargetFundamentalObject fobj = obj as TargetFundamentalObject;
- if (fobj == null)
- throw new NotSupportedException ();
-
- TargetFundamentalType ftype = targetType as TargetFundamentalType;
- TargetObject ob = ExplicitFundamentalConversion (ctx, fobj, ftype);
- if (ob == null)
- throw new NotSupportedException ();
- return ob;
- }
-
- if (targetType is TargetNullableType) {
- TargetNullableType ntype = (TargetNullableType) targetType;
- if (obj.Kind == TargetObjectKind.Null)
- return obj;
- else if (obj.Kind != TargetObjectKind.Nullable)
- return ImplicitConversion (ctx, obj, ntype.ElementType);
-
- TargetNullableType ntype2 = (TargetNullableType) obj.Type;
- if (ImplicitConversionExists (ctx, ntype2.ElementType, ntype.ElementType))
- return obj;
- }
-
- TargetClassType ctype = ToClassType (targetType);
- TargetClassObject source = ToClassObject (ctx, obj);
-
- if (source == null)
- throw new Exception (string.Format ("Variable is not a class type."));
-
- return TryCast (ctx, source, ctype);
- }
-
- static TargetObject BoxValue (MdbEvaluationContext ctx, TargetObject fobj)
- {
- return ctx.Frame.Language.CreateBoxedObject (ctx.Thread, fobj);
- }
-
- static TargetStructObject TryParentCast (MdbEvaluationContext ctx, TargetStructObject source, TargetStructType source_type, TargetStructType target_type)
- {
- if (source_type == target_type)
- return source;
-
- if (!source_type.HasParent)
- return null;
-
- TargetStructType parent_type = source_type.GetParentType (ctx.Thread);
- source = TryParentCast (ctx, source, parent_type, target_type);
- if (source == null)
- return null;
-
- return source.GetParentObject (ctx.Thread) as TargetClassObject;
- }
-
- static TargetStructObject TryCurrentCast (MdbEvaluationContext ctx, TargetClassObject source, TargetClassType target_type)
- {
- TargetStructObject current = source.GetCurrentObject (ctx.Thread);
- if (current == null)
- return null;
-
- return TryParentCast (ctx, current, current.Type, target_type);
- }
-
- public static TargetObject TryCast (MdbEvaluationContext ctx, TargetObject source, TargetClassType target_type)
- {
- if (source.Type == target_type)
- return source;
-
- TargetClassObject sobj = ToClassObject (ctx, source);
- if (sobj == null)
- return null;
-
- TargetStructObject result = TryParentCast (ctx, sobj, sobj.Type, target_type);
- if (result != null)
- return result;
-
- return TryCurrentCast (ctx, sobj, target_type);
- }
-
- static bool TryParentCast (MdbEvaluationContext ctx, TargetStructType source_type, TargetStructType target_type)
- {
- if (source_type == target_type)
- return true;
-
- if (!source_type.HasParent)
- return false;
-
- TargetStructType parent_type = source_type.GetParentType (ctx.Thread);
- return TryParentCast (ctx, parent_type, target_type);
- }
-
- public static bool TryCast (MdbEvaluationContext ctx, TargetType source, TargetClassType target_type)
- {
- if (source == target_type)
- return true;
-
- TargetClassType stype = ToClassType (source);
- if (stype == null)
- return false;
-
- return TryParentCast (ctx, stype, target_type);
- }
- }
-}
diff --git a/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Server.Mdb/DebuggerServer.cs b/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Server.Mdb/DebuggerServer.cs
deleted file mode 100644
index fe387a9499..0000000000
--- a/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Server.Mdb/DebuggerServer.cs
+++ /dev/null
@@ -1,967 +0,0 @@
-using System;
-using System.IO;
-using System.Collections.Generic;
-using System.Runtime.InteropServices;
-using System.Runtime.Remoting.Lifetime;
-using System.Text;
-using ST = System.Threading;
-
-using Mono.Debugger;
-
-using MD = Mono.Debugger;
-using ML = Mono.Debugger.Languages;
-using DL = Mono.Debugging.Client;
-using DB = Mono.Debugging.Backend;
-
-using Mono.Debugging.Client;
-using Mono.Debugging.Evaluation;
-using Mono.Debugging.Backend.Mdb;
-
-namespace DebuggerServer
-{
- class DebuggerServer : MarshalByRefObject, IDebuggerServer, ISponsor
- {
- IDebuggerController controller;
- MD.Debugger debugger;
- MD.DebuggerSession session;
- MD.Process process;
- MD.GUIManager guiManager;
- MdbAdaptor mdbAdaptor;
- int max_frames;
- List<ST.WaitCallback> stoppedWorkQueue = new List<ST.WaitCallback> ();
- List<ST.WaitCallback> eventQueue = new List<ST.WaitCallback> ();
- bool initializing;
- bool running;
- bool exited;
- NRefactoryEvaluator evaluator = new NRefactoryEvaluator ();
- MD.Thread activeThread;
- Dictionary<int,BreakEvent> events = new Dictionary<int,BreakEvent> ();
- Dictionary<int,string> lastConditionValue = new Dictionary<int,string> ();
-
- DateTime lastBreakEventUpdate = DateTime.Now;
- Dictionary<int, ST.WaitCallback> breakUpdates = new Dictionary<int,ST.WaitCallback> ();
- bool breakUpdateEventsQueued;
-
- MdbObjectValueAdaptor mdbObjectValueAdaptor;
-
- const int BreakEventUpdateNotifyDelay = 500;
- public DebuggerSessionOptions SessionOptions;
-
- public DebuggerServer (IDebuggerController dc)
- {
- this.controller = dc;
- mdbObjectValueAdaptor = new MdbObjectValueAdaptor ();
- MarshalByRefObject mbr = (MarshalByRefObject)controller;
- ILease lease = mbr.GetLifetimeService() as ILease;
- lease.Register(this);
- max_frames = 100;
-
- ST.Thread t = new ST.Thread ((ST.ThreadStart)EventDispatcher);
- t.IsBackground = true;
- t.Start ();
- }
-
- public override object InitializeLifetimeService ()
- {
- return null;
- }
-
- public MdbObjectValueAdaptor MdbObjectValueAdaptor {
- get { return mdbObjectValueAdaptor; }
- }
-
- public Mono.Debugging.Evaluation.ExpressionEvaluator Evaluator {
- get { return evaluator; }
- }
-
- public MdbAdaptor MdbAdaptor {
- get { return mdbAdaptor; }
- }
-
- #region IDebugger Members
-
- public string InitializeMdb (string mdbVersion, int mdPid)
- {
- mdbAdaptor = MdbAdaptorFactory.CreateAdaptor (mdbVersion);
- WatchParentProcess (mdPid);
- return mdbAdaptor.MdbVersion;
- }
-
- void WatchParentProcess (int pid)
- {
- ST.Thread t = new ST.Thread (delegate () {
- while (true) {
- try {
- System.Diagnostics.Process.GetProcessById (pid);
- } catch {
- ForceShutdown ();
- }
- ST.Thread.Sleep (1000);
- }
- });
- t.IsBackground = true;
- t.Start ();
- }
-
- void ForceShutdown ()
- {
- try {
- Exit ();
- } catch {
- }
- Environment.Exit (1);
- }
-
- public void Run (MonoDebuggerStartInfo startInfo, DebuggerSessionOptions sessionOptions)
- {
- try {
- if (startInfo == null)
- throw new ArgumentNullException ("startInfo");
-
- Console.WriteLine ("MDB version: " + mdbAdaptor.MdbVersion);
-
- this.SessionOptions = sessionOptions;
- mdbAdaptor.StartInfo = startInfo;
-
- Report.Initialize ();
-
- DebuggerConfiguration config = new DebuggerConfiguration ();
- config.LoadConfiguration ();
- mdbAdaptor.Configuration = config;
- mdbAdaptor.InitializeConfiguration ();
-
- debugger = new MD.Debugger (config);
-
- debugger.ModuleLoadedEvent += OnModuleLoadedEvent;
- debugger.ModuleUnLoadedEvent += OnModuleUnLoadedEvent;
-
- debugger.ProcessReachedMainEvent += delegate (MD.Debugger deb, MD.Process proc) {
- OnInitialized (deb, proc);
- };
-
- if (startInfo.IsXsp) {
- mdbAdaptor.SetupXsp ();
- config.FollowFork = false;
- }
- config.OpaqueFileNames = false;
-
- DebuggerOptions options = DebuggerOptions.ParseCommandLine (new string[] { startInfo.Command } );
- options.WorkingDirectory = startInfo.WorkingDirectory;
- Environment.CurrentDirectory = startInfo.WorkingDirectory;
- options.StopInMain = false;
-
- if (!string.IsNullOrEmpty (startInfo.Arguments))
- options.InferiorArgs = ToArgsArray (startInfo.Arguments);
-
- if (startInfo.EnvironmentVariables != null) {
- foreach (KeyValuePair<string,string> env in startInfo.EnvironmentVariables)
- options.SetEnvironment (env.Key, env.Value);
- }
- session = new MD.DebuggerSession (config, options, "main", null);
- mdbAdaptor.Session = session;
- mdbAdaptor.InitializeSession ();
-
- ST.ThreadPool.QueueUserWorkItem (delegate {
- // Run in a thread to avoid a deadlock, since NotifyStarted calls back to the client.
- NotifyStarted ();
- debugger.Run(session);
- });
-
- } catch (Exception e) {
- Console.WriteLine ("error: " + e.ToString ());
- throw;
- }
- }
-
- public void AttachToProcess (long pid, DebuggerSessionOptions sessionOptions)
- {
- Report.Initialize ();
-
- this.SessionOptions = sessionOptions;
- DebuggerConfiguration config = new DebuggerConfiguration ();
- mdbAdaptor.Configuration = config;
- mdbAdaptor.InitializeConfiguration ();
- config.LoadConfiguration ();
- debugger = new MD.Debugger (config);
-
- DebuggerOptions options = DebuggerOptions.ParseCommandLine (new string[0]);
- options.StopInMain = false;
- session = new MD.DebuggerSession (config, options, "main", (IExpressionParser) null);
- mdbAdaptor.Session = session;
-
- Process proc = debugger.Attach (session, (int)pid);
- OnInitialized (debugger, proc);
-
- ST.ThreadPool.QueueUserWorkItem (delegate {
- NotifyStarted ();
- });
- }
-
- public void Detach ()
- {
- CancelRuntimeInvokes ();
- try {
- debugger.Detach ();
- } catch (Exception ex) {
- Console.WriteLine (ex);
- } finally {
- running = false;
- }
- }
-
- public void Stop ()
- {
- CancelRuntimeInvokes ();
- QueueTask (delegate {
- guiManager.Stop (process.MainThread);
- });
- }
-
- public void Exit ()
- {
- CancelRuntimeInvokes ();
- ResetTaskQueue ();
- debugger.Kill ();
- running = false;
- }
-
- public void NextLine ()
- {
- if (running)
- throw new InvalidOperationException ("Target already running");
- OnStartRunning ();
- guiManager.StepOver (activeThread);
- }
-
- public void StepLine ()
- {
- if (running)
- throw new InvalidOperationException ("Target already running");
- OnStartRunning ();
- guiManager.StepInto (activeThread);
- }
-
- public void StepInstruction ()
- {
- if (running)
- throw new InvalidOperationException ("Target already running");
- OnStartRunning ();
- activeThread.StepInstruction ();
- }
-
- public void NextInstruction ()
- {
- if (running)
- throw new InvalidOperationException ("Target already running");
- OnStartRunning ();
- activeThread.NextInstruction ();
- }
-
- public void Finish ()
- {
- if (running)
- throw new InvalidOperationException ("Target already running");
- OnStartRunning ();
- guiManager.StepOut (activeThread);
- }
-
- public void Continue ()
- {
- if (running)
- throw new InvalidOperationException ("Target already running");
- OnStartRunning ();
- QueueTask (delegate {
- guiManager.Continue (activeThread);
- });
- }
-
- public bool AllowBreakpointChanges {
- get {
- return mdbAdaptor == null || mdbAdaptor.AllowBreakEventChanges;
- }
- }
-
- public int InsertBreakEvent (DL.BreakEvent be, bool enable)
- {
- CancelRuntimeInvokes ();
- DL.Breakpoint bp = be as DL.Breakpoint;
- MD.Event ev = null;
-
- if (bp != null) {
- MD.SourceLocation location = new MD.SourceLocation (bp.FileName, bp.Line);
- MD.SourceBreakpoint sbp = new MD.SourceBreakpoint (session, ThreadGroup.Global, location);
- mdbAdaptor.InitializeBreakpoint (sbp);
- session.AddEvent (sbp);
- ev = sbp;
- }
- else if (be is Catchpoint) {
- lock (pendingCatchpoints) {
- Catchpoint cp = (Catchpoint) be;
- ML.TargetType exc = null;
- if (process != null) {
- foreach (Module mod in process.Modules) {
- exc = mod.Language.LookupType (cp.ExceptionName);
- if (exc != null)
- break;
- }
- }
- if (exc != null)
- ev = session.InsertExceptionCatchPoint (process.MainThread, ThreadGroup.Global, exc);
- else {
- pendingCatchpoints.Add (cp);
- return -1;
- }
- }
- }
-
- ev.IsEnabled = enable;
-
- if (!initializing) {
- lock (debugger) {
- mdbAdaptor.ActivateEvent (ev);
- }
- }
-
- if (bp != null && !running && !initializing && activeThread.CurrentFrame != null && !string.IsNullOrEmpty (bp.ConditionExpression) && bp.BreakIfConditionChanges) {
- // Initial expression evaluation
- MdbEvaluationContext ctx = new MdbEvaluationContext (activeThread, activeThread.CurrentFrame, null, SessionOptions.EvaluationOptions);
- ML.TargetObject ob = EvaluateExp (ctx, bp.ConditionExpression);
- if (ob != null)
- lastConditionValue [ev.Index] = evaluator.TargetObjectToExpression (ctx, ob).Value;
- }
-
- events [ev.Index] = be;
- return ev.Index;
- }
-
- public void RemoveBreakEvent (int handle)
- {
- if (exited)
- return;
- CancelRuntimeInvokes ();
- Event ev = session.GetEvent (handle);
- mdbAdaptor.RemoveEvent (ev);
- }
-
- public void EnableBreakEvent (int handle, bool enable)
- {
- CancelRuntimeInvokes ();
- Event ev = session.GetEvent (handle);
- if (enable)
- ev.Activate (process.MainThread);
- else
- ev.Deactivate (process.MainThread);
- }
-
- public object UpdateBreakEvent (object handle, DL.BreakEvent bp)
- {
- events [(int)handle] = bp;
- return handle;
- }
-
- bool BreakEventCheck (MD.TargetEventArgs args)
- {
- MD.StackFrame frame = args.Frame;
- if (!(args.Data is int))
- return true;
-
- int eventHandle = (int) args.Data;
-
- DL.BreakEvent be;
- if (!events.TryGetValue (eventHandle, out be))
- return true;
-
- // Check hit count
- if (be.HitCount > 0) {
- be.HitCount--;
- DispatchEvent (delegate {
- NotifyBreakEventUpdate (eventHandle, be.HitCount, null);
- });
- return false;
- }
-
- MdbEvaluationContext ctx = new MdbEvaluationContext (frame.Thread, frame, null, SessionOptions.EvaluationOptions);
- DL.Breakpoint bp = be as DL.Breakpoint;
- if (bp != null && !string.IsNullOrEmpty (bp.ConditionExpression)) {
- ML.TargetObject val = EvaluateExp (ctx, bp.ConditionExpression);
- if (val == null)
- return false;
- if (bp.BreakIfConditionChanges) {
- string current = evaluator.TargetObjectToExpression (ctx, val).Value;
- string last;
- bool found = lastConditionValue.TryGetValue (eventHandle, out last);
- lastConditionValue [eventHandle] = current;
- if (!found || last == current)
- return false;
- } else {
- ML.TargetFundamentalObject fob = val as ML.TargetFundamentalObject;
- if (fob == null)
- return false;
- object ob = fob.GetObject (frame.Thread);
- if (!(ob is bool) || !(bool)ob)
- return false;
- }
- }
-
- switch (be.HitAction) {
- case HitAction.Break:
- return true;
- case HitAction.CustomAction:
- return controller.OnCustomBreakpointAction (be.CustomActionId, eventHandle);
- case HitAction.PrintExpression:
- if (string.IsNullOrEmpty (be.TraceExpression) || frame == null)
- return false;
- ML.TargetObject val = EvaluateExp (ctx, be.TraceExpression);
- if (val != null) {
- string str = evaluator.TargetObjectToString (ctx, val);
- DispatchEvent (delegate {
- NotifyBreakEventUpdate (eventHandle, -1, str);
- });
- }
- return false;
- }
- return false;
- }
-
- ML.TargetObject EvaluateExp (EvaluationContext ctx, string exp)
- {
- ValueReference var;
- try {
- EvaluationContext cctx = ctx.Clone ();
- EvaluationOptions ops = cctx.Options;
- ops.AllowMethodEvaluation = true;
- cctx.Options = ops;
- var = (ValueReference) Server.Instance.Evaluator.Evaluate (cctx, exp);
- return (ML.TargetObject) var.Value;
- } catch {
- return null;
- }
- }
-
- void NotifyBreakEventUpdate (int eventHandle, int hitCount, string lastTrace)
- {
- bool notify = false;
-
- lock (breakUpdates)
- {
- int span = (int) (DateTime.Now - lastBreakEventUpdate).TotalMilliseconds;
- if (span >= BreakEventUpdateNotifyDelay && !breakUpdateEventsQueued) {
- // Last update was more than 0.5s ago. The update can be sent.
- lastBreakEventUpdate = DateTime.Now;
- notify = true;
- } else {
- // Queue the event notifications to avoid wasting too much time
- breakUpdates [eventHandle] = delegate {
- controller.UpdateBreakpoint (eventHandle, hitCount, lastTrace);
- };
- if (!breakUpdateEventsQueued) {
- breakUpdateEventsQueued = true;
-
- ST.ThreadPool.QueueUserWorkItem (delegate {
- ST.Thread.Sleep (BreakEventUpdateNotifyDelay - span);
- List<ST.WaitCallback> copy;
- lock (breakUpdates) {
- copy = new List<ST.WaitCallback> (breakUpdates.Values);
- breakUpdates.Clear ();
- breakUpdateEventsQueued = false;
- lastBreakEventUpdate = DateTime.Now;
- }
- foreach (ST.WaitCallback wc in copy)
- wc (null);
- });
- }
- }
- }
- if (notify)
- controller.UpdateBreakpoint (eventHandle, hitCount, lastTrace);
- }
-
- public ThreadInfo[] GetThreads (long processId)
- {
- MD.Process p = GetProcess (processId);
- if (p == null)
- return new ThreadInfo [0];
- List<DL.ThreadInfo> list = new List<DL.ThreadInfo> ();
- foreach (MD.Thread t in p.GetThreads ()) {
- DL.ThreadInfo ct = CreateThreadInfo (t);
- list.Add (ct);
- }
- return list.ToArray ();
- }
-
- public ProcessInfo[] GetProcesses ()
- {
- List<DL.ProcessInfo> list = new List<DL.ProcessInfo> ();
- foreach (MD.Process p in debugger.Processes)
- list.Add (new DL.ProcessInfo (p.ID, p.TargetApplication + " " + string.Join (" ", p.CommandLineArguments)));
- return list.ToArray ();
- }
-
- ThreadInfo CreateThreadInfo (MD.Thread t)
- {
- string loc;
- if (t.CurrentFrame != null && t.CurrentFrame.SourceLocation != null) {
- loc = t.CurrentFrame.ToString ();
- } else
- loc = "<Unknown>";
-
- return new ThreadInfo (t.Process.ID, t.ID, t.Name, loc);
- }
-
- public DL.Backtrace GetThreadBacktrace (long processId, long threadId)
- {
- MD.Thread t = GetThread (processId, threadId);
- if (t != null && t.IsStopped)
- return CreateBacktrace (t, null);
- else
- return null;
- }
-
- public void SetActiveThread (long processId, long threadId)
- {
- activeThread = GetThread (processId, threadId);
- }
-
- MD.Thread GetThread (long procId, long threadId)
- {
- MD.Process proc = GetProcess (procId);
- if (proc != null) {
- foreach (MD.Thread t in proc.GetThreads ()) {
- if (t.ID == (int)threadId)
- return t;
- }
- }
- return null;
- }
-
- MD.Process GetProcess (long id)
- {
- foreach (MD.Process p in debugger.Processes) {
- if (p.ID == (int)id)
- return p;
- }
- return null;
- }
-
- public AssemblyLine[] DisassembleFile (string file)
- {
- CancelRuntimeInvokes ();
-
- // Not working yet
- return null;
-
-/* SourceFile sourceFile = session.FindFile (file);
- List<AssemblyLine> lines = new List<AssemblyLine> ();
- foreach (MethodSource met in sourceFile.Methods) {
- TargetAddress addr = met.NativeMethod.StartAddress;
- TargetAddress endAddr = met.NativeMethod.EndAddress;
- while (addr < endAddr) {
- SourceAddress line = met.NativeMethod.LineNumberTable.Lookup (addr);
- AssemblerLine aline = process.MainThread.DisassembleInstruction (met.NativeMethod, addr);
- if (aline != null) {
- if (line != null)
- lines.Add (new DL.AssemblyLine (addr.Address, aline.Text, line.Row));
- else
- lines.Add (new DL.AssemblyLine (addr.Address, aline.Text));
- addr += aline.InstructionSize;
- } else
- addr++;
- }
- }
- lines.Sort (delegate (DL.AssemblyLine l1, DL.AssemblyLine l2) {
- return l1.SourceLine.CompareTo (l2.SourceLine);
- });
- return lines.ToArray ();
- */
- }
-
- #endregion
-
- public void Dispose ()
- {
- MarshalByRefObject mbr = (MarshalByRefObject)controller;
- ILease lease = mbr.GetLifetimeService() as ILease;
- lease.Unregister(this);
- }
-
- public void WriteDebuggerOutput (string msg, params object[] args)
- {
- DispatchEvent (delegate {
- controller.OnDebuggerOutput (false, string.Format (msg, args));
- });
- }
-
- public void WriteDebuggerError (Exception ex)
- {
- if (ex is EvaluatorException)
- Console.WriteLine (ex.Message);
- else
- Console.WriteLine (ex);
- }
-
- public ML.TargetObject RuntimeInvoke (MdbEvaluationContext ctx, ML.TargetFunctionType function,
- ML.TargetStructObject object_argument,
- params ML.TargetObject[] param_objects)
- {
- MethodCall mc = new MethodCall (ctx, function, object_argument, param_objects);
- ctx.Adapter.AsyncExecute (mc, ctx.Options.EvaluationTimeout);
- return mc.ReturnValue;
- }
-
- DL.Backtrace CreateBacktrace (MD.Thread thread, ML.TargetObject exception)
- {
- List<MD.StackFrame> frames = new List<MD.StackFrame> ();
- DateTime t = DateTime.Now;
- if (!thread.CurrentFrame.Language.IsManaged) {
- MD.Backtrace bt = thread.GetBacktrace (MD.Backtrace.Mode.Native, max_frames);
- if (bt != null) {
- Console.WriteLine ("GetBacktrace native time: {0} ms n:{1}", (DateTime.Now - t).TotalMilliseconds, bt.Count);
- frames.AddRange (bt.Frames);
- }
- } else {
- t = DateTime.Now;
- MD.Backtrace backtrace = thread.GetBacktrace (MD.Backtrace.Mode.Managed, max_frames);
- if (backtrace != null) {
- Console.WriteLine ("GetBacktrace managed time: {0} ms n:{1}", (DateTime.Now - t).TotalMilliseconds, backtrace.Count);
- frames.AddRange (backtrace.Frames);
- }
- }
- if (frames.Count > 0) {
- BacktraceWrapper wrapper = new BacktraceWrapper (frames.ToArray (), exception);
- return new DL.Backtrace (wrapper);
- } else if (thread.CurrentBacktrace != null) {
- BacktraceWrapper wrapper = new BacktraceWrapper (thread.CurrentBacktrace.Frames, exception);
- return new DL.Backtrace (wrapper);
- }
- return null;
- }
-
- #region ISponsor Members
-
- public TimeSpan Renewal(ILease lease)
- {
- return TimeSpan.FromSeconds(7);
- }
-
- #endregion
-
- private void OnInitialized (MD.Debugger debugger, Process process)
- {
- Console.WriteLine (">> OnInitialized");
-
- this.process = process;
- this.debugger = debugger;
-
- mdbAdaptor.Process = process;
-
- guiManager = process.StartGUIManager ();
-
- //FIXME: conditionally add event handlers
- process.TargetOutputEvent += OnTargetOutput;
-
- debugger.ProcessCreatedEvent += OnProcessCreatedEvent;
- debugger.ProcessExecdEvent += OnProcessExecdEvent;
- debugger.ProcessExitedEvent += OnProcessExitedEvent;
-
- debugger.ThreadCreatedEvent += OnThreadCreatedEvent;
- debugger.ThreadExitedEvent += OnThreadExitedEvent;
-
- debugger.TargetExitedEvent += OnTargetExitedEvent;
- guiManager.TargetEvent += OnTargetEvent;
-
- // Not supported
- //guiManager.BreakpointHitHandler = BreakEventCheck;
-
- activeThread = process.MainThread;
- running = true;
-
- Console.WriteLine ("<< OnInitialized");
- }
-
- void NotifyStarted ()
- {
- try {
- initializing = true;
- controller.NotifyStarted();
- initializing = false;
- } catch (Exception ex) {
- Console.WriteLine (ex);
- }
- }
-
- void OnTargetOutput (bool is_stderr, string text)
- {
- DispatchEvent (delegate {
- controller.OnTargetOutput (is_stderr, text);
- });
- }
-
- void QueueTask (ST.WaitCallback cb)
- {
- lock (debugger) {
- if (stoppedWorkQueue.Count > 0)
- stoppedWorkQueue.Add (cb);
- else
- cb (null);
- }
- }
-
- void ResetTaskQueue ()
- {
- lock (debugger) {
- stoppedWorkQueue.Clear ();
- }
- }
-
- void LogEvent (MD.TargetEventArgs args)
- {
- Console.WriteLine ("Server OnTargetEvent: {0} stopped:{1} data:{2} queue:{3} thread:{4} running:{5}", args.Type, args.IsStopped, args.Data, stoppedWorkQueue.Count, args.Frame != null ? args.Frame.Thread : null, running);
- }
-
- private void OnTargetEvent (MD.Thread thread, MD.TargetEventArgs args)
- {
- try {
- if (!running) {
- LogEvent (args);
- return;
- }
-
- bool notifyToClient = args.IsStopped || args.Type == MD.TargetEventType.UnhandledException || args.Type == MD.TargetEventType.Exception || args.Type == MD.TargetEventType.TargetInterrupted;
-
- LogEvent (args);
-
- bool isStop = args.Type != MD.TargetEventType.FrameChanged &&
- args.Type != MD.TargetEventType.TargetExited &&
- args.Type != MD.TargetEventType.TargetRunning;
-
- if (isStop) {
-
- lock (debugger) {
-
- if (stoppedWorkQueue.Count > 0) {
- // Execute queued work in another thread with a small delay
- // since it is not safe to execute it here
- System.Threading.ThreadPool.QueueUserWorkItem (delegate {
- System.Threading.Thread.Sleep (50);
- bool resume = false;
- lock (debugger) {
- foreach (ST.WaitCallback cb in stoppedWorkQueue) {
- cb (null);
- }
- stoppedWorkQueue.Clear ();
- }
- if (resume)
- guiManager.Continue (process.MainThread);
- else if (notifyToClient)
- NotifyTargetEvent (thread, args);
- });
- return;
- }
- }
- }
-
- if (notifyToClient)
- NotifyTargetEvent (thread, args);
-
- } catch (Exception e) {
- Console.WriteLine ("*** DS.OnTargetEvent1, exception : {0}", e.ToString ());
- }
- }
-
- void NotifyTargetEvent (MD.Thread thread, MD.TargetEventArgs args)
- {
- if (args.Frame != null)
- activeThread = args.Frame.Thread;
-
- try {
- if (args.Type == MD.TargetEventType.TargetStopped && ((int)args.Data) != 0) {
- DispatchEvent (delegate {
- controller.OnDebuggerOutput (false, string.Format ("Thread {0:x} received signal {1}.\n", args.Frame.Thread.ID, args.Data));
- });
- }
-
- DL.TargetEventType type;
-
- switch (args.Type) {
- case MD.TargetEventType.Exception: type = DL.TargetEventType.ExceptionThrown; break;
- case MD.TargetEventType.TargetHitBreakpoint: type = DL.TargetEventType.TargetHitBreakpoint; break;
- case MD.TargetEventType.TargetInterrupted: type = DL.TargetEventType.TargetInterrupted; break;
- case MD.TargetEventType.TargetSignaled: type = DL.TargetEventType.TargetSignaled; break;
- case MD.TargetEventType.TargetStopped: type = DL.TargetEventType.TargetStopped; break;
- case MD.TargetEventType.UnhandledException: type = DL.TargetEventType.UnhandledException; break;
- default:
- return;
- }
-
- OnCleanFrameData ();
-
- DL.TargetEventArgs targetArgs = new DL.TargetEventArgs (type);
-
- if (args.Type != MD.TargetEventType.TargetExited) {
- ML.TargetObject exception = null;
- if (args.Type == MD.TargetEventType.UnhandledException || args.Type == MD.TargetEventType.Exception)
- exception = args.Frame.ExceptionObject;
- targetArgs.Backtrace = CreateBacktrace (thread, exception);
- targetArgs.Thread = CreateThreadInfo (activeThread);
- }
-
-
- running = false;
-
- DispatchEvent (delegate {
- controller.OnTargetEvent (targetArgs);
- });
- } catch (Exception e) {
- Console.WriteLine ("*** DS.OnTargetEvent2, exception : {0}", e.ToString ());
- }
- }
-
- void OnStartRunning ()
- {
- OnCleanFrameData ();
- running = true;
- }
-
- void OnCleanFrameData ()
- {
- // Dispose all previous remote objects
- RemoteFrameObject.DisconnectAll ();
- CancelRuntimeInvokes ();
- }
-
- public void CancelRuntimeInvokes ()
- {
- mdbObjectValueAdaptor.CancelAsyncOperations ();
- }
-
-/* public void WaitRuntimeInvokes ()
- {
- invokeManager.WaitForAll ();
- }
-*/
- private void OnProcessCreatedEvent (MD.Debugger debugger, MD.Process process)
- {
- WriteDebuggerOutput (string.Format ("Process {0} created.\n", process.ID));
- }
-
- private void OnProcessExitedEvent (MD.Debugger debugger, MD.Process process)
- {
- WriteDebuggerOutput (string.Format ("Process {0} exited.\n", process.ID));
- }
-
- private void OnProcessExecdEvent (MD.Debugger debugger, MD.Process process)
- {
- WriteDebuggerOutput (string.Format ("Process {0} execd.\n", process.ID));
- }
-
- private void OnThreadCreatedEvent (MD.Debugger debugger, MD.Thread thread)
- {
- WriteDebuggerOutput (string.Format ("Thread {0} created.\n", thread.ID));
- }
-
- private void OnThreadExitedEvent (MD.Debugger debugger, MD.Thread thread)
- {
- WriteDebuggerOutput (string.Format ("Thread {0} exited.\n", thread.ID));
- }
-
- List<Catchpoint> pendingCatchpoints = new List<Catchpoint> ();
-
- private void OnModuleLoadedEvent (Module module)
- {
- SourceFile[] sfiles = module.Sources;
- string[] files = new string [sfiles.Length];
- for (int n=0; n<files.Length; n++)
- files [n] = sfiles [n].FileName;
- controller.NotifySourceFileLoaded (files);
- WriteDebuggerOutput (string.Format ("Module loaded: {0}.\n", module.Name));
-
- if (process == null)
- return;
-
- lock (pendingCatchpoints) {
- foreach (Catchpoint cp in pendingCatchpoints.ToArray ()) {
- ML.TargetType exc = module.Language.LookupType (cp.ExceptionName);
- if (exc != null) {
- session.InsertExceptionCatchPoint (process.MainThread, ThreadGroup.Global, exc);
- pendingCatchpoints.Remove (cp);
- }
- }
- }
- }
-
- private void OnModuleUnLoadedEvent (Module module)
- {
- SourceFile[] sfiles = module.Sources;
- string[] files = new string [sfiles.Length];
- for (int n=0; n<files.Length; n++)
- files [n] = sfiles [n].FileName;
- controller.NotifySourceFileUnloaded (files);
- WriteDebuggerOutput (string.Format ("Module unloaded: {0}.\n", module.Name));
- }
-
- private void OnTargetExitedEvent (MD.Debugger debugger)
- {
- exited = true;
- DispatchEvent (delegate {
- controller.OnDebuggerOutput (false, "Target exited.\n");
- DL.TargetEventArgs args = new DL.TargetEventArgs (DL.TargetEventType.TargetExited);
- controller.OnTargetEvent (args);
- });
- }
-
- void DispatchEvent (ST.WaitCallback eventCallback)
- {
- lock (eventQueue) {
- eventQueue.Add (eventCallback);
- ST.Monitor.PulseAll (eventQueue);
- }
- }
-
- void EventDispatcher ()
- {
- while (true) {
- ST.WaitCallback[] cbs;
- lock (eventQueue) {
- if (eventQueue.Count == 0)
- ST.Monitor.Wait (eventQueue);
- cbs = new ST.WaitCallback [eventQueue.Count];
- eventQueue.CopyTo (cbs, 0);
- eventQueue.Clear ();
- }
-
- foreach (ST.WaitCallback wc in cbs) {
- try {
- wc (null);
- } catch (Exception ex) {
- Console.WriteLine (ex);
- }
- }
- }
- }
-
- string[] ToArgsArray (string str)
- {
- List<string> args = new List<string> ();
- bool escaping = false;
- StringBuilder currentArg = new StringBuilder ();
- for (int n=0; n<str.Length; n++) {
- char c = str [n];
- if (c == '\\' && n + 1 < str.Length) {
- if (!escaping || (escaping && (str[n+1] == '"' || str[n+1] == '\\')))
- c = str [++n];
- } else if (c == '"') {
- escaping = !escaping;
- continue;
- } else if (c == ' ' && !escaping) {
- args.Add (currentArg.ToString ());
- currentArg = new StringBuilder ();
- continue;
- }
- currentArg.Append (c);
- }
- if (currentArg.Length > 0)
- args.Add (currentArg.ToString ());
- return args.ToArray ();
- }
- }
-}
diff --git a/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Server.Mdb/EvaluationContext.cs b/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Server.Mdb/EvaluationContext.cs
deleted file mode 100644
index ce8651abde..0000000000
--- a/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Server.Mdb/EvaluationContext.cs
+++ /dev/null
@@ -1,86 +0,0 @@
-// EvaluationContext.cs
-//
-// Author:
-// Lluis Sanchez Gual <lluis@novell.com>
-//
-// Copyright (c) 2008 Novell, Inc (http://www.novell.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-//
-//
-
-using System;
-using Mono.Debugger;
-using Mono.Debugger.Languages;
-using Mono.Debugging.Evaluation;
-
-namespace DebuggerServer
-{
- public class MdbEvaluationContext: EvaluationContext
- {
- Thread thread;
- StackFrame frame;
-
- public Thread Thread {
- get {
- return thread;
- }
- }
-
- public StackFrame Frame {
- get {
- return frame;
- }
- }
-
- public TargetObject Exception { get; private set; }
-
- public MdbEvaluationContext (Thread thread, StackFrame frame, TargetObject exception, Mono.Debugging.Client.EvaluationOptions options): base (options)
- {
- Evaluator = Server.Instance.Evaluator;
- Adapter = Server.Instance.MdbObjectValueAdaptor;
- this.thread = thread;
- this.frame = frame;
- this.Exception = exception;
- }
-
- public TargetObject GetRealObject (object ob)
- {
- return ObjectUtil.GetRealObject (this, (TargetObject) ob);
- }
-
- public override void CopyFrom (Mono.Debugging.Evaluation.EvaluationContext gctx)
- {
- base.CopyFrom (gctx);
- MdbEvaluationContext ctx = (MdbEvaluationContext) gctx;
- thread = ctx.thread;
- frame = ctx.frame;
- }
-
- public override void WriteDebuggerError (System.Exception ex)
- {
- Server.Instance.WriteDebuggerError (ex);
- }
-
- public override void WriteDebuggerOutput (string message, params object[] values)
- {
- Server.Instance.WriteDebuggerOutput (message, values);
- }
- }
-}
diff --git a/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Server.Mdb/FieldReference.cs b/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Server.Mdb/FieldReference.cs
deleted file mode 100644
index 6a66625aea..0000000000
--- a/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Server.Mdb/FieldReference.cs
+++ /dev/null
@@ -1,113 +0,0 @@
-// FieldVariable.cs
-//
-// Author:
-// Lluis Sanchez Gual <lluis@novell.com>
-//
-// Copyright (c) 2008 Novell, Inc (http://www.novell.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-//
-//
-
-using System;
-using Mono.Debugger.Languages;
-using Mono.Debugger;
-using Mono.Debugging.Client;
-using Mono.Debugging.Evaluation;
-
-namespace DebuggerServer
-{
- public class FieldReference: ValueReference
- {
- TargetType type;
- TargetFieldInfo field;
- TargetStructObject thisobj;
-
- public FieldReference (EvaluationContext ctx, TargetStructObject thisobj, TargetType type, TargetFieldInfo field): base (ctx)
- {
- this.type = type;
- this.field = field;
- if (!field.IsStatic)
- this.thisobj = thisobj;
- }
-
- public override object Type {
- get {
- return field.Type;
- }
- }
-
- public override object DeclaringType {
- get {
- return type;
- }
- }
-
- public override object Value {
- get {
- MdbEvaluationContext ctx = (MdbEvaluationContext) Context;
- if (field.HasConstValue) {
- object obj = ctx.Frame.Language.CreateInstance (ctx.Thread, field.ConstValue);
- if (type is TargetEnumType)
- // Enum constants are integers, so they have to be converted to enum objects
- return ctx.Adapter.Cast (ctx, obj, type);
- else
- return obj;
- }
- TargetClass cls;
- TargetStructType tt = type as TargetStructType;
- if (tt != null)
- cls = tt.GetClass (ctx.Thread);
- else if (type.HasClassType)
- cls = type.ClassType.GetClass (ctx.Thread);
- else
- throw new NotSupportedException ("Can't get field '" + Name + "' from type '" + type.Name + "'");
-
- return cls.GetField (ctx.Thread, thisobj, field);
- }
- set {
- MdbEvaluationContext ctx = (MdbEvaluationContext) Context;
- TargetClass cls;
- TargetStructType tt = type as TargetStructType;
- if (tt != null)
- cls = tt.GetClass (ctx.Thread);
- else if (type.HasClassType)
- cls = type.ClassType.GetClass (ctx.Thread);
- else
- throw new NotSupportedException ("Can't set field '" + Name + "' from type '" + type.Name + "'");
- cls.SetField (ctx.Thread, thisobj, field, (TargetObject) value);
- }
- }
-
- public override string Name {
- get {
- return field.Name;
- }
- }
-
- public override ObjectValueFlags Flags {
- get {
- ObjectValueFlags flags = ObjectValueFlags.Field | ObjectUtil.GetAccessibility (field.Accessibility);
- if (field.HasConstValue) flags |= ObjectValueFlags.ReadOnly;
- if (field.IsStatic) flags |= ObjectValueFlags.Global;
- return flags;
- }
- }
- }
-}
diff --git a/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Server.Mdb/IndexerValueReference.cs b/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Server.Mdb/IndexerValueReference.cs
deleted file mode 100644
index af4261d9cb..0000000000
--- a/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Server.Mdb/IndexerValueReference.cs
+++ /dev/null
@@ -1,139 +0,0 @@
-// IndexerValueReference.cs
-//
-// Author:
-// Lluis Sanchez Gual <lluis@novell.com>
-//
-// Copyright (c) 2008 Novell, Inc (http://www.novell.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-//
-//
-
-using System;
-using System.Reflection;
-using Mono.Debugger;
-using Mono.Debugger.Languages;
-using Mono.Debugging.Client;
-using System.Collections.Generic;
-using Mono.Debugging.Evaluation;
-using System.Text;
-
-namespace DebuggerServer
-{
- public class IndexerValueReference: ValueReference
- {
- TargetPropertyInfo indexer;
- TargetStructObject target;
- TargetObject[] index;
-
- public IndexerValueReference (EvaluationContext ctx, TargetStructObject target, TargetObject[] index, TargetPropertyInfo indexerProp): base (ctx)
- {
- this.indexer = indexerProp;
- this.target = target;
- this.index = index;
- }
-
- public static ValueReference CreateIndexerValueReference (MdbEvaluationContext ctx, TargetObject target, TargetObject[] index)
- {
- TargetFundamentalObject mstr = target as TargetFundamentalObject;
- if (mstr != null && mstr.TypeName == "string") {
- // Special case for strings
- string name = "[" + ctx.Evaluator.TargetObjectToExpression (ctx, index[0]) + "]";
- string val = (string) mstr.GetObject (ctx.Thread);
- object oo = ctx.Adapter.TargetObjectToObject (ctx, index[0]);
- int idx = (int) Convert.ChangeType (oo, typeof(int));
- return LiteralValueReference.CreateObjectLiteral (ctx, name, val [idx]);
- }
-
- TargetStructObject sob = target as TargetStructObject;
- if (sob == null)
- return null;
-
- TargetPropertyInfo indexerProp = null;
- foreach (MemberReference mem in ObjectUtil.GetTypeMembers (ctx, target.Type, false, true, true, BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Static)) {
- if (mem.Member.IsStatic)
- continue;
- if (mem.Member is TargetPropertyInfo) {
- TargetPropertyInfo prop = (TargetPropertyInfo) mem.Member;
- if (prop.CanRead && prop.Getter.ParameterTypes.Length == 1) {
- indexerProp = prop;
- break;
- }
- }
- }
- if (indexerProp != null)
- return new IndexerValueReference (ctx, sob, index, indexerProp);
- else
- return null;
- }
-
- public override object Value {
- get {
- MdbEvaluationContext ctx = (MdbEvaluationContext) Context;
- return ObjectUtil.GetRealObject (ctx, Server.Instance.RuntimeInvoke (ctx, indexer.Getter, target, index));
- }
- set {
- MdbEvaluationContext ctx = (MdbEvaluationContext) Context;
- TargetObject[] cparams = new TargetObject [index.Length + 1];
- for (int n=0; n<index.Length; n++)
- cparams[n] = TargetObjectConvert.Cast (ctx, index[n], indexer.Setter.ParameterTypes [n]);
- cparams [cparams.Length - 1] = TargetObjectConvert.Cast (ctx, (TargetObject) value, indexer.Setter.ParameterTypes [cparams.Length - 1]);
- Server.Instance.RuntimeInvoke (ctx, indexer.Setter, target, cparams);
- }
- }
-
- protected override bool CanEvaluate (EvaluationOptions options)
- {
- return options.AllowTargetInvoke;
- }
-
- public override object Type {
- get {
- if (indexer.CanRead)
- return indexer.Getter.ReturnType;
- else
- return indexer.Setter.ParameterTypes [1];
- }
- }
-
-
- public override string Name {
- get {
- StringBuilder sb = new StringBuilder ("[");
- for (int n=0; n<index.Length; n++) {
- if (n > 0)
- sb.Append (',');
- sb.Append (Server.Instance.Evaluator.TargetObjectToExpression (Context, index[n]));
- }
- sb.Append (']');
- return sb.ToString ();
- }
- }
-
-
- public override ObjectValueFlags Flags {
- get {
- if (!indexer.CanWrite)
- return ObjectValueFlags.ArrayElement | ObjectValueFlags.ReadOnly;
- else
- return ObjectValueFlags.ArrayElement;
- }
- }
- }
-}
diff --git a/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Server.Mdb/Makefile b/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Server.Mdb/Makefile
deleted file mode 100644
index 3fbbbedeb7..0000000000
--- a/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Server.Mdb/Makefile
+++ /dev/null
@@ -1,135 +0,0 @@
-
-EXTRA_DIST = Makefile
-
-# Warning: This is an automatically generated file, do not edit!
-
-srcdir=.
-top_srcdir=..
-
-include $(top_srcdir)/config.make
-
-ifeq ($(CONFIG),DEBUG)
-ASSEMBLY_COMPILER_COMMAND = $(CSC)
-ASSEMBLY_COMPILER_FLAGS = -noconfig -codepage:utf8 -warn:4 -optimize- -debug "-define:DEBUG;TRACE"
-
-ASSEMBLY = ../build/DebuggerServer.exe
-ASSEMBLY_MDB = $(ASSEMBLY).mdb
-COMPILE_TARGET = exe
-PROJECT_REFERENCES =
-BUILD_DIR = ../build
-
-endif
-
-ifeq ($(CONFIG),RELEASE)
-ASSEMBLY_COMPILER_COMMAND = $(CSC)
-ASSEMBLY_COMPILER_FLAGS = -noconfig -codepage:utf8 -warn:4 -optimize+ -debug -define:DEBUG "-define:TRACE"
-
-ASSEMBLY = ../build/DebuggerServer.exe
-ASSEMBLY_MDB = $(ASSEMBLY).mdb
-COMPILE_TARGET = exe
-PROJECT_REFERENCES =
-BUILD_DIR = ../build/MonoDevelop.Debugger.Mdb/build
-
-endif
-
-AL=al2
-SATELLITE_ASSEMBLY_NAME=DebuggerServer.resources.dll
-
-PROGRAMFILES = \
- $(DEBUGGERSERVER_EXE_MDB)
-
-
-RESGEN=resgen2
-
-DEBUGGERSERVER_EXE_MDB = $(BUILD_DIR)/DebuggerServer.exe.mdb
-
-FILES = \
- ArrayAdaptor.cs \
- AssemblyInfo.cs \
- BacktraceWrapper.cs \
- Convert.cs \
- DebuggerServer.cs \
- EvaluationContext.cs \
- FieldReference.cs \
- IndexerValueReference.cs \
- MdbAdaptor.cs \
- MdbAdaptorFactory.cs \
- MdbObjectValueAdaptor.cs \
- PropertyReference.cs \
- Server.cs \
- VariableReference.cs
-
-DATA_FILES =
-
-RESOURCES = \
- MdbAdaptor-2-0.cs \
- MdbAdaptor-2-4-2.cs \
- MdbAdaptor-2-4-4.cs \
- MdbAdaptor-2-6.cs
-
-EXTRAS = \
- ChangeLog
-
-REFERENCES = \
- ../build/DebuggerClient.dll \
- Mono.Posix \
- -pkg:mono-addins \
- -pkg:mono-debugger \
- -pkg:monodevelop \
- -pkg:monodevelop-core-addins \
- System \
- System.Core \
- System.Data \
- System.Runtime.Remoting \
- System.Xml
-
-DLL_REFERENCES =
-
-CLEANFILES = $(PROGRAMFILES)
-
-#Targets
-all: $(ASSEMBLY) $(PROGRAMFILES) $(top_srcdir)/config.make
-
-include $(top_srcdir)/Makefile.include
-#include $(srcdir)/custom-hooks.make
-
-
-
-
-
-$(eval $(call emit_resgen_targets))
-$(build_xamlg_list): %.xaml.g.cs: %.xaml
- xamlg '$<'
-
-INSTALL_DIR = $(DESTDIR)$(prefix)/lib/monodevelop/AddIns/MonoDevelop.Debugger
-
-LOCAL_PKGCONFIG=PKG_CONFIG_PATH=../../../local-config:$$PKG_CONFIG_PATH
-
-$(ASSEMBLY) $(ASSEMBLY_MDB): $(build_sources) $(build_resources) $(build_datafiles) $(DLL_REFERENCES) $(PROJECT_REFERENCES) $(build_xamlg_list) $(build_satellite_assembly_list)
- make pre-all-local-hook prefix=$(prefix)
- mkdir -p $(shell dirname $(ASSEMBLY))
- make $(CONFIG)_BeforeBuild
- $(LOCAL_PKGCONFIG) $(ASSEMBLY_COMPILER_COMMAND) $(ASSEMBLY_COMPILER_FLAGS) -out:$(ASSEMBLY) -target:$(COMPILE_TARGET) $(build_sources_embed) $(build_resources_embed) $(build_references_ref)
- make $(CONFIG)_AfterBuild
- make post-all-local-hook prefix=$(prefix)
-
-install-local: $(ASSEMBLY) $(ASSEMBLY_MDB)
- make pre-install-local-hook prefix=$(prefix)
- mkdir -p '$(INSTALL_DIR)'
- $(call cp,$(ASSEMBLY),$(INSTALL_DIR))
- $(call cp,$(ASSEMBLY_MDB),$(INSTALL_DIR))
- $(call cp,$(DEBUGGERSERVER_EXE_MDB),$(INSTALL_DIR))
- make post-install-local-hook prefix=$(prefix)
-
-uninstall-local: $(ASSEMBLY) $(ASSEMBLY_MDB)
- make pre-uninstall-local-hook prefix=$(prefix)
- $(call rm,$(ASSEMBLY),$(INSTALL_DIR))
- $(call rm,$(ASSEMBLY_MDB),$(INSTALL_DIR))
- $(call rm,$(DEBUGGERSERVER_EXE_MDB),$(INSTALL_DIR))
- make post-uninstall-local-hook prefix=$(prefix)
-
-install: install-local
-uninstall: uninstall-local
-clean: clean-local
-
-include $(top_srcdir)/rules.make
diff --git a/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Server.Mdb/MdbAdaptor-2-0.cs b/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Server.Mdb/MdbAdaptor-2-0.cs
deleted file mode 100644
index 11180bcbb9..0000000000
--- a/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Server.Mdb/MdbAdaptor-2-0.cs
+++ /dev/null
@@ -1,67 +0,0 @@
-//
-// MdbAdaptor_2_0.cs
-//
-// Author:
-// Lluis Sanchez Gual <lluis@novell.com>
-//
-// Copyright (c) 2009 Novell, Inc (http://www.novell.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-using System;
-
-namespace DebuggerServer
-{
- public class MdbAdaptor_2_0: MdbAdaptor
- {
- public override void AbortThread (Mono.Debugger.Thread thread, Mono.Debugger.RuntimeInvokeResult result)
- {
- thread.AbortInvocation ();
- }
-
- public override bool AllowBreakEventChanges {
- get {
- return Process.MainThread.IsStopped;
- }
- }
-
- public override void ActivateEvent (Mono.Debugger.Event ev)
- {
- if (Process.MainThread.IsStopped)
- ev.Activate (Process.MainThread);
- else
- ThrowNotSupported ("Breakpoints can't be changed while the process is running.");
- }
-
- public override void RemoveEvent (Mono.Debugger.Event ev)
- {
- if (!Process.MainThread.IsStopped)
- ThrowNotSupported ("Breakpoints can't be changed while the process is running.");
- Session.DeleteEvent (ev);
- }
-
- public override void EnableEvent (Mono.Debugger.Event ev, bool enable)
- {
- if (enable)
- ev.Activate (Process.MainThread);
- else
- ev.Deactivate (Process.MainThread);
- }
- }
-}
diff --git a/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Server.Mdb/MdbAdaptor-2-4-2.cs b/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Server.Mdb/MdbAdaptor-2-4-2.cs
deleted file mode 100644
index 867b7b123e..0000000000
--- a/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Server.Mdb/MdbAdaptor-2-4-2.cs
+++ /dev/null
@@ -1,97 +0,0 @@
-//
-// MdbAdaptor22.cs
-//
-// Author:
-// Lluis Sanchez Gual <lluis@novell.com>
-//
-// Copyright (c) 2009 Novell, Inc (http://www.novell.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-using System;
-using MDB=Mono.Debugger;
-using Mono.Debugging.Backend.Mdb;
-
-namespace DebuggerServer
-{
- public class MdbAdaptor_2_4_2: MdbAdaptor
- {
- public override void InitializeConfiguration ()
- {
- base.InitializeConfiguration ();
- Configuration.RedirectOutput = true;
- }
-
- public override void SetupXsp ()
- {
- Configuration.SetupXSP ();
- Configuration.StopOnManagedSignals = true;
- }
-
- public override void InitializeSession ()
- {
- if (StartInfo.UserCodeOnly) {
- Session.AddUserModulePath (StartInfo.WorkingDirectory);
- if (StartInfo.UserModules != null) {
- foreach (string path in StartInfo.UserModules)
- Session.AddUserModule (path);
- }
- }
- }
-
- public override void InitializeBreakpoint (MDB.SourceBreakpoint bp)
- {
- // bp.IsUserModule = true;
- }
-
- public override void AbortThread (MDB.Thread thread, MDB.RuntimeInvokeResult result)
- {
- result.Abort ();
- }
-
- public override bool AllowBreakEventChanges {
- get {
- return Process == null || Process.MainThread.IsStopped;
- }
- }
-
- public override void ActivateEvent (Mono.Debugger.Event ev)
- {
- if (Process.MainThread.IsStopped)
- ev.Activate (Process.MainThread);
- else
- ThrowNotSupported ("Breakpoints can't be changed while the process is running.");
- }
-
- public override void RemoveEvent (Mono.Debugger.Event ev)
- {
- if (!Process.MainThread.IsStopped)
- ThrowNotSupported ("Breakpoints can't be changed while the process is running.");
- Session.DeleteEvent (ev);
- }
-
- public override void EnableEvent (Mono.Debugger.Event ev, bool enable)
- {
- if (enable)
- ev.Activate (Process.MainThread);
- else
- ev.Deactivate (Process.MainThread);
- }
- }
-}
diff --git a/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Server.Mdb/MdbAdaptor-2-4-4.cs b/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Server.Mdb/MdbAdaptor-2-4-4.cs
deleted file mode 100644
index 6b53adbf7c..0000000000
--- a/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Server.Mdb/MdbAdaptor-2-4-4.cs
+++ /dev/null
@@ -1,59 +0,0 @@
-//
-// MdbAdaptor_2_4_4.cs
-//
-// Author:
-// Lluis Sanchez Gual <lluis@novell.com>
-//
-// Copyright (c) 2009 Novell, Inc (http://www.novell.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-using System;
-
-namespace DebuggerServer
-{
- public class MdbAdaptor_2_4_4: MdbAdaptor_2_4_2
- {
- public override bool AllowBreakEventChanges {
- get {
- return true;
- }
- }
-
- public override void ActivateEvent (Mono.Debugger.Event ev)
- {
- Process.ActivatePendingBreakpoints ();
- }
-
- public override void RemoveEvent (Mono.Debugger.Event ev)
- {
- Session.RemoveEvent (ev);
- Process.ActivatePendingBreakpoints ();
- }
-
- public override void EnableEvent (Mono.Debugger.Event ev, bool enable)
- {
- if (enable)
- Session.ActivateEventAsync (ev);
- else
- Session.DeactivateEventAsync (ev);
- Process.ActivatePendingBreakpoints ();
- }
- }
-}
diff --git a/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Server.Mdb/MdbAdaptor-2-6.cs b/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Server.Mdb/MdbAdaptor-2-6.cs
deleted file mode 100644
index 6a67710527..0000000000
--- a/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Server.Mdb/MdbAdaptor-2-6.cs
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
-
-WARNING WARNING WARNING
-
-This class is compiled by the debugger add-in at runtime. It is done in
-this way because features implemented here depend on the installed MDB version.
-
-*/
-
-using System;
-using Mono.Debugger;
-using MDB=Mono.Debugger;
-using Mono.Debugging.Backend.Mdb;
-
-namespace DebuggerServer
-{
- public class MdbAdaptor_2_6: MdbAdaptor_2_4_4
- {
- }
-}
diff --git a/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Server.Mdb/MdbAdaptor.cs b/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Server.Mdb/MdbAdaptor.cs
deleted file mode 100644
index b63b196f57..0000000000
--- a/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Server.Mdb/MdbAdaptor.cs
+++ /dev/null
@@ -1,89 +0,0 @@
-//
-// MdbAdaptor.cs
-//
-// Author:
-// Lluis Sanchez Gual <lluis@novell.com>
-//
-// Copyright (c) 2009 Novell, Inc (http://www.novell.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-using System;
-using MDB=Mono.Debugger;
-using Mono.Debugging.Backend.Mdb;
-
-namespace DebuggerServer
-{
- public abstract class MdbAdaptor
- {
- public MdbAdaptor ()
- {
- MdbVersion = "2.0";
- }
-
- public string MdbVersion { get; internal set; }
-
- public MDB.DebuggerSession Session;
- public MDB.DebuggerConfiguration Configuration;
- public MDB.Process Process;
- public MonoDebuggerStartInfo StartInfo;
-
- public virtual void SetupXsp ()
- {
- ThrowNotSupported ("ASP.NET debugging not supported");
- }
-
- public virtual void InitializeBreakpoint (MDB.SourceBreakpoint bp)
- {
- }
-
- public virtual void InitializeConfiguration ()
- {
- }
-
- public virtual void InitializeSession ()
- {
- }
-
- public abstract void AbortThread (MDB.Thread thread, MDB.RuntimeInvokeResult result);
-
- public virtual void EnableEvent (MDB.Event ev, bool enable)
- {
- }
-
- public virtual void ActivateEvent (MDB.Event ev)
- {
- }
-
- public virtual void RemoveEvent (MDB.Event ev)
- {
- }
-
- public void ThrowNotSupported (string feature)
- {
- throw new Mono.Debugging.Client.DebuggerException (feature + ". You need to install a more recent Mono Debugger version.");
- }
-
- public virtual bool AllowBreakEventChanges {
- get {
- return true;
- }
- }
- }
-}
diff --git a/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Server.Mdb/MdbAdaptorFactory.cs b/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Server.Mdb/MdbAdaptorFactory.cs
deleted file mode 100644
index e8a4d96fcf..0000000000
--- a/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Server.Mdb/MdbAdaptorFactory.cs
+++ /dev/null
@@ -1,122 +0,0 @@
-//
-// MdbAdaptorFactory.cs
-//
-// Author:
-// Lluis Sanchez Gual <lluis@novell.com>
-//
-// Copyright (c) 2009 Novell, Inc (http://www.novell.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-using System;
-using System.Reflection;
-using System.Diagnostics;
-using System.IO;
-
-namespace DebuggerServer
-{
- public static class MdbAdaptorFactory
- {
- // Bump this version number if any change is in MdbAdaptor or subclases
- const int ApiVersion = 3;
-
- // Versions for which there is an adaptor. If an adaptor is a subclass of another adaptor,
- // the base adaptor version must be specified (recursively) after the adaptor version
- // using | as separator.
- static readonly string[] supportedVersions = new string[] {"2-4-4|2-4-2", "2-4-2", "2-0"};
-
- public static MdbAdaptor CreateAdaptor (string mdbVersion)
- {
- ProcessStartInfo pinfo = new ProcessStartInfo ();
- pinfo.FileName = "gmcs";
-
- if (mdbVersion != null) {
- MdbAdaptor mdb = TryCreateAdaptor (pinfo, mdbVersion);
- if (mdb == null)
- throw new InvalidOperationException ("Unsupported MDB version");
- return mdb;
- }
-
- foreach (string v in supportedVersions) {
- MdbAdaptor mdb = TryCreateAdaptor (pinfo, v);
- if (mdb != null)
- return mdb;
- }
- throw new InvalidOperationException ("Unsupported MDB version");
- }
-
- static MdbAdaptor TryCreateAdaptor (ProcessStartInfo pinfo, string versions)
- {
- string[] versionsArray = versions.Split ('|');
- string version = versionsArray [0];
-
- string tmpPath = Path.GetTempPath ();
- tmpPath = Path.Combine (tmpPath, "monodevelop-debugger-mdb");
- if (!Directory.Exists (tmpPath))
- Directory.CreateDirectory (tmpPath);
-
- string outFile = Path.Combine (tmpPath, "adaptor-" + ApiVersion + "--" + version + ".dll");
- DateTime thisTime = File.GetLastWriteTime (typeof(MdbAdaptorFactory).Assembly.Location);
-
- if (!File.Exists (outFile) || File.GetLastWriteTime (outFile) < thisTime) {
- string args = "/t:library ";
- args += "\"/out:" + outFile + "\" ";
- args += "\"/r:" + typeof(MdbAdaptorFactory).Assembly.Location + "\" ";
- args += "\"/r:" + typeof(Mono.Debugger.Debugger).Assembly.Location + "\" ";
- args += "\"/r:" + typeof(Mono.Debugging.Client.DebuggerSession).Assembly.Location + "\" ";
- args += "\"/r:" + typeof(Mono.Debugging.Backend.Mdb.IDebuggerServer).Assembly.Location + "\" ";
-
- // Write the source code for all required classes
- foreach (string ver in versionsArray) {
- string resName = "MdbAdaptor-" + ver + ".cs";
- Stream s = typeof(MdbAdaptorFactory).Assembly.GetManifestResourceStream (resName);
- if (s == null)
- throw new InvalidOperationException ("Resource not found: " + resName);
- StreamReader sr = new StreamReader (s);
- string txt = sr.ReadToEnd ();
- sr.Close ();
- s.Close ();
-
- string csfile = Path.Combine (tmpPath, "adaptor-" + ver + ".cs");
- File.WriteAllText (csfile, txt);
- args += "\"" + csfile + "\" ";
- }
-
- pinfo.Arguments = args;
- pinfo.RedirectStandardError = true;
- pinfo.RedirectStandardOutput = true;
- pinfo.UseShellExecute = false;
- Process proc = Process.Start (pinfo);
- proc.WaitForExit ();
- if (proc.ExitCode != 0)
- return null;
- Console.WriteLine ("Generated: " + outFile);
- }
-
- Assembly asm = Assembly.LoadFrom (outFile);
- Type at = asm.GetType ("DebuggerServer.MdbAdaptor_" + version.Replace ('-','_'));
- if (at != null) {
- MdbAdaptor a = (MdbAdaptor) Activator.CreateInstance (at);
- a.MdbVersion = version;
- return a;
- }
- return null;
- }
- }
-}
diff --git a/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Server.Mdb/MdbObjectValueAdaptor.cs b/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Server.Mdb/MdbObjectValueAdaptor.cs
deleted file mode 100644
index c152dcbc02..0000000000
--- a/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Server.Mdb/MdbObjectValueAdaptor.cs
+++ /dev/null
@@ -1,1122 +0,0 @@
-//
-// MdbObjectValueAdaptor.cs
-//
-// Author:
-// Lluis Sanchez Gual <lluis@novell.com>
-//
-// Copyright (c) 2009 Novell, Inc (http://www.novell.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-using System;
-using System.Linq;
-using System.Text;
-using System.Collections;
-using ST = System.Threading;
-using System.Reflection;
-using System.Collections.Generic;
-using System.Diagnostics;
-using Mono.Debugging.Evaluation;
-using Mono.Debugger.Languages;
-using Mono.Debugger;
-using Mono.Debugging.Client;
-using Mono.Debugging.Backend;
-
-namespace DebuggerServer
-{
- public class MdbObjectValueAdaptor : ObjectValueAdaptor
- {
- public override string CallToString (EvaluationContext gctx, object obj)
- {
- if (!gctx.Options.AllowTargetInvoke)
- return GetValueTypeName (gctx, obj);
- MdbEvaluationContext ctx = (MdbEvaluationContext) gctx;
- obj = ctx.GetRealObject (obj);
- if (obj is TargetFundamentalObject) {
- object fob = ((TargetFundamentalObject)obj).GetObject (ctx.Thread);
- return fob != null ? fob.ToString () : null;
- }
-
- TargetStructObject starget = obj as TargetStructObject;
- if (starget != null) {
- // Optimization: if ToString is not overriden, there is no need to call it since the result is the name of the type
- MemberReference mem = OverloadResolve (ctx, "ToString", starget.Type, new TargetType [0], true, false, false);
- if (mem == null || mem.DeclaringType.Name == "System.Object")
- return GetDisplayTypeName (ctx, starget.Type);
- }
-
- TargetObject retval = CallMethod (ctx, "ToString", (TargetStructObject) obj);
- object s = ((TargetFundamentalObject) retval).GetObject (ctx.Thread);
- return s != null ? s.ToString () : "";
- }
-
- public override object TryCast (EvaluationContext gctx, object val, object targetType)
- {
- MdbEvaluationContext ctx = (MdbEvaluationContext)gctx;
- TargetObject tval = ctx.GetRealObject (val);
- if (targetType is TargetObjectType)
- return val;
- else if (targetType is TargetClassType)
- return TargetObjectConvert.TryCast (ctx, tval, (TargetClassType)targetType);
- else if (targetType is TargetEnumType) {
- TargetType tt = ctx.Frame.Language.LookupType ("System.Enum");
- TargetObject typeObj = (TargetObject) GetTypeOf (ctx, ((TargetEnumType)targetType).Name);
- return CallStaticMethod (ctx, "ToObject", tt, typeObj, tval);
- }
- else if (targetType is TargetFundamentalType) {
- if (tval is TargetEnumObject) {
- TargetEnumObject eob = (TargetEnumObject) tval;
- return TryCast (ctx, eob.GetValue (ctx.Thread), targetType);
- }
- TargetFundamentalType ftype = (TargetFundamentalType) targetType;
- Type tt = Type.GetType (ObjectUtil.FixTypeName (ftype.Name));
- if (tval is TargetFundamentalObject) {
- TargetFundamentalObject fob = (TargetFundamentalObject) tval;
- object obj = fob.GetObject (ctx.Thread);
- if (tt.IsInstanceOfType (obj))
- return val;
- if (tt != typeof(string) && !(obj is string)) {
- try {
- object res = System.Convert.ChangeType (obj, tt);
- return CreateValue (ctx, res);
- } catch {
- }
- }
- }
- }
- return null;
- }
-
-
- public override object TargetObjectToObject (EvaluationContext gctx, object vobj)
- {
- MdbEvaluationContext ctx = (MdbEvaluationContext) gctx;
- TargetObject obj = ctx.GetRealObject (vobj);
-
- switch (obj.Kind) {
- case TargetObjectKind.Array:
- case TargetObjectKind.GenericInstance:
- case TargetObjectKind.Struct:
- case TargetObjectKind.Class:
- case TargetObjectKind.Enum:
- return base.TargetObjectToObject (ctx, vobj);
-
- case TargetObjectKind.Fundamental:
- TargetFundamentalObject fob = obj as TargetFundamentalObject;
- if (fob == null)
- return "null";
- return fob.GetObject (ctx.Thread);
-
- case TargetObjectKind.Pointer:
- if (IntPtr.Size < 8)
- return new IntPtr ((int)obj.GetAddress (ctx.Thread).Address);
- else
- return new IntPtr (obj.GetAddress (ctx.Thread).Address);
-
- case TargetObjectKind.Object:
- TargetObjectObject oob = obj as TargetObjectObject;
- if (oob == null)
- return null;
- else
- return new EvaluationResult ("{" + oob.TypeName + "}");
-
- case TargetObjectKind.Nullable:
- TargetNullableObject nob = (TargetNullableObject) obj;
- if (nob.HasValue (ctx.Thread))
- return TargetObjectToObject (ctx, nob.GetValue (ctx.Thread));
- else
- return null;
- }
- return new EvaluationResult ("?");
- }
-
-
- public override bool HasMethod (EvaluationContext gctx, object targetType, string methodName, object[] argTypes, BindingFlags flags)
- {
- MdbEvaluationContext ctx = (MdbEvaluationContext) gctx;
-
- if (argTypes == null) {
- foreach (MemberReference mm in ObjectUtil.GetTypeMembers (ctx, (TargetType) targetType, false, false, true, flags | BindingFlags.Public | BindingFlags.NonPublic)) {
- TargetMethodInfo met = (TargetMethodInfo) mm.Member;
- if (met.Name == methodName)
- return true;
- }
- return false;
- }
-
- TargetStructType stype = targetType as TargetStructType;
- if (stype == null)
- return false;
-
- TargetType[] types = new TargetType [argTypes.Length];
- Array.Copy (argTypes, types, argTypes.Length);
-
- MemberReference mem;
- mem = OverloadResolve (ctx, methodName, stype, types, (flags & BindingFlags.Instance) != 0, (flags & BindingFlags.Static) != 0, false);
- return mem != null;
- }
-
- public override object RuntimeInvoke (EvaluationContext gctx, object targetType, object target, string methodName, object[] argTypes, object[] argValues)
- {
- gctx.AssertTargetInvokeAllowed ();
- MdbEvaluationContext ctx = (MdbEvaluationContext) gctx;
- TargetObject[] lst = new TargetObject [argValues.Length];
- Array.Copy (argValues, lst, argValues.Length);
- if (target != null)
- return CallMethod (ctx, methodName, (TargetObject) target, lst);
- else
- return CallStaticMethod (ctx, methodName, (TargetType) targetType, lst);
- }
-
- protected override TypeDisplayData OnGetTypeDisplayData (EvaluationContext gctx, object type)
- {
- MdbEvaluationContext ctx = (MdbEvaluationContext) gctx;
- TargetType tt = (TargetType) type;
- if (tt.HasClassType) {
- TypeDisplayData data = new TypeDisplayData ();
- if (tt.ClassType.DebuggerTypeProxyAttribute != null) {
- data.ProxyType = tt.ClassType.DebuggerTypeProxyAttribute.ProxyTypeName;
- }
- if (tt.ClassType.DebuggerDisplayAttribute != null) {
- data.NameDisplayString = tt.ClassType.DebuggerDisplayAttribute.Name;
- data.TypeDisplayString = tt.ClassType.DebuggerDisplayAttribute.Type;
- data.ValueDisplayString = tt.ClassType.DebuggerDisplayAttribute.Value;
- }
- foreach (MemberReference mem in ObjectUtil.GetTypeMembers (ctx, tt, true, true, true, BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Static)) {
- if (mem.Member.DebuggerBrowsableState.HasValue) {
- if (data.MemberData == null)
- data.MemberData = new Dictionary<string, DebuggerBrowsableState> ();
- data.MemberData [mem.Member.Name] = mem.Member.DebuggerBrowsableState.Value;
- }
- }
- return data;
- }
- return base.OnGetTypeDisplayData (ctx, type);
- }
-
- public override bool IsPrimitive (EvaluationContext gctx, object val)
- {
- MdbEvaluationContext ctx = (MdbEvaluationContext) gctx;
- return ctx.GetRealObject (val) is TargetFundamentalObject;
- }
-
- public override bool IsEnum (EvaluationContext gctx, object val)
- {
- MdbEvaluationContext ctx = (MdbEvaluationContext) gctx;
- return ctx.GetRealObject (val) is TargetEnumObject;
- }
-
- public override bool IsNull (EvaluationContext gctx, object val)
- {
- MdbEvaluationContext ctx = (MdbEvaluationContext) gctx;
- TargetObject ob = ctx.GetRealObject (val);
- if (ob.Kind == TargetObjectKind.Null)
- return true;
- return (ob.HasAddress && ob.GetAddress (ctx.Thread).IsNull);
- }
-
-
- public override bool IsClass (object type)
- {
- return type is TargetClassType;
- }
-
-
- public override bool IsClassInstance (EvaluationContext gctx, object val)
- {
- MdbEvaluationContext ctx = (MdbEvaluationContext) gctx;
- return ctx.GetRealObject (val) is TargetStructObject;
- }
-
- public override bool IsArray (EvaluationContext gctx, object val)
- {
- MdbEvaluationContext ctx = (MdbEvaluationContext) gctx;
- return ctx.GetRealObject (val) is TargetArrayObject;
- }
-
-
- public override object GetValueType (EvaluationContext gctx, object val)
- {
- MdbEvaluationContext ctx = (MdbEvaluationContext) gctx;
- return ctx.GetRealObject (val).Type;
- }
-
-
- public override string GetTypeName (EvaluationContext ctx, object val)
- {
- return ObjectUtil.FixTypeName (((TargetType)val).Name);
- }
-
-
- public override object GetType (EvaluationContext ctx, string name, object[] typeArgs)
- {
- MdbEvaluationContext mctx = (MdbEvaluationContext) ctx;
- name = name.Replace ('+','/');
- return mctx.Frame.Language.LookupType (name);
- }
-
- public override object GetBaseType (EvaluationContext ctx, object t)
- {
- MdbEvaluationContext mctx = (MdbEvaluationContext) ctx;
- TargetStructType type = t as TargetStructType;
- if (type != null && type.HasParent)
- return type.GetParentType (mctx.Thread);
- else
- return null;
- }
-
- public override object[] GetTypeArgs (EvaluationContext ctx, object type)
- {
- return new object [0];
- }
-
-
- protected override ValueReference OnGetThisReference (EvaluationContext gctx)
- {
- MdbEvaluationContext ctx = (MdbEvaluationContext) gctx;
- if (ctx.Frame.Method != null && ctx.Frame.Method.HasThis) {
- ObjectValueFlags flags = ObjectValueFlags.Field | ObjectValueFlags.ReadOnly;
- TargetVariable var = ctx.Frame.Method.GetThis (ctx.Thread);
- VariableReference vref = new VariableReference (ctx, var, flags);
- return vref;
- }
- else
- return null;
- }
-
- public override ValueReference GetCurrentException (EvaluationContext gctx)
- {
- MdbEvaluationContext ctx = (MdbEvaluationContext) gctx;
- if (ctx.Exception != null)
- return LiteralValueReference.CreateTargetObjectLiteral (ctx, ctx.Options.CurrentExceptionTag, ctx.Exception);
- else
- return null;
- }
-
-
- protected override IEnumerable<ValueReference> OnGetParameters (EvaluationContext gctx)
- {
- MdbEvaluationContext ctx = (MdbEvaluationContext) gctx;
- if (ctx.Frame.Method != null) {
- foreach (TargetVariable var in ctx.Frame.Method.GetParameters (ctx.Thread))
- yield return new VariableReference (ctx, var, ObjectValueFlags.Parameter);
- }
- }
-
- public override IEnumerable<object> GetNestedTypes (EvaluationContext gctx, object type)
- {
- MdbEvaluationContext ctx = (MdbEvaluationContext) gctx;
- string[] tname = GetTypeName (ctx, type).Split ('+');
- object td = FindType (ctx, tname[0]);
- if (td != null) {
- td = FindNestedType (td, tname, 1);
- IEnumerable nestedTypes = (IEnumerable) GetProp (td, "NestedTypes");
- foreach (object nt in nestedTypes) {
- string name = (string) GetProp (nt, "FullName");
- object tt = GetType (ctx, name);
- if (tt != null)
- yield return tt;
- }
- }
- }
-
- object FindNestedType (object td, string[] names, int index)
- {
- if (index == names.Length)
- return td;
- IEnumerable nestedTypes = (IEnumerable) GetProp (td, "NestedTypes");
- foreach (object nt in nestedTypes) {
- string name = (string) GetProp (nt, "Name");
- if (name == names [index])
- return FindNestedType (nt, names, index + 1);
- }
- return null;
- }
-
- object FindType (MdbEvaluationContext ctx, string typeName)
- {
- foreach (object typeDefinition in GetAllTypeDefinitions (ctx, true)) {
- string fullName = (string) GetProp (typeDefinition, "FullName");
- if (fullName == typeName)
- return typeDefinition;
- }
- return null;
- }
-
- public override void GetNamespaceContents (EvaluationContext gctx, string namspace, out string[] childNamespaces, out string[] childTypes)
- {
- MdbEvaluationContext ctx = (MdbEvaluationContext) gctx;
-
- // Child types
-
- List<string> types = new List<string> ();
- HashSet<string> namespaces = new HashSet<string> ();
- string namspaceDotted = namspace + ".";
- foreach (object typeDefinition in GetAllTypeDefinitions (ctx, false)) {
- string typeNamespace = (string) GetProp (typeDefinition, "Namespace");
- if (typeNamespace == namspace)
- types.Add ((string) GetProp (typeDefinition, "FullName"));
- else if (typeNamespace.StartsWith (namspaceDotted)) {
- int i = typeNamespace.IndexOf ('.', namspaceDotted.Length);
- if (i != -1)
- typeNamespace = typeNamespace.Substring (0, i);
- namespaces.Add (typeNamespace);
- }
- }
- childTypes = types.ToArray ();
- childNamespaces = new string [namespaces.Count];
- namespaces.CopyTo (childNamespaces);
- }
-
- public IEnumerable<object> GetAllTypeDefinitions (MdbEvaluationContext ctx, bool includePrivate)
- {
- HashSet<object> visited = new HashSet<object> ();
- object methodHandle = ctx.Frame.Method.MethodHandle;
-
- if (methodHandle != null && methodHandle.GetType ().FullName == "Mono.Cecil.MethodDefinition") {
- object declaringType = GetProp (methodHandle, "DeclaringType");
- object module = GetProp (declaringType, "Module");
- object assembly = GetProp (module, "Assembly");
- object resolver = GetProp (module, "AssemblyResolver");
-
- foreach (object typeDefinition in GetAllTypeDefinitions (includePrivate, resolver, visited, assembly))
- yield return typeDefinition;
- }
- }
-
- public IEnumerable<object> GetAllTypeDefinitions (bool includePrivate, object resolver, HashSet<object> visited, object asm)
- {
- if (!visited.Add (asm))
- yield break;
-
- object mainModule = GetProp (asm, "MainModule");
- foreach (object typeDefinition in (IEnumerable) GetProp (mainModule, "Types")) {
- bool isPublic = includePrivate || (bool) GetProp (typeDefinition, "IsPublic");
- bool isInterface = (bool) GetProp (typeDefinition, "IsInterface");
- bool isEnum = (bool) GetProp (typeDefinition, "IsEnum");
- if (isPublic && !isInterface && !isEnum)
- yield return typeDefinition;
- }
-
- Type assemblyNameReferenceType = resolver.GetType ().Assembly.GetType ("Mono.Cecil.AssemblyNameReference");
- MethodInfo resolveMet = resolver.GetType ().GetMethod ("Resolve", new Type[] { assemblyNameReferenceType });
- foreach (object an in (IEnumerable) GetProp (mainModule, "AssemblyReferences")) {
- object refAsm = resolveMet.Invoke (resolver, new object[] {an});
- if (refAsm != null) {
- foreach (object td in GetAllTypeDefinitions (includePrivate, resolver, visited, refAsm))
- yield return td;
- }
- }
- }
-
- static object GetProp (object obj, string name)
- {
- return obj.GetType ().GetProperty (name).GetValue (obj, null);
- }
-
- protected override IEnumerable<ValueReference> GetMembers (EvaluationContext gctx, object tt, object ob, BindingFlags bindingFlags)
- {
- MdbEvaluationContext ctx = (MdbEvaluationContext)gctx;
- TargetStructObject co = ctx.GetRealObject (ob) as TargetStructObject; // It can be a TargetObjectObject
- TargetType t = (TargetType)tt;
- if (co == null) {
- bindingFlags |= BindingFlags.Static;
- bindingFlags &= ~BindingFlags.Instance;
- }
- foreach (MemberReference mem in ObjectUtil.GetTypeMembers (ctx, t, true, true, false, bindingFlags)) {
- if (mem.Member is TargetFieldInfo) {
- TargetFieldInfo field = (TargetFieldInfo)mem.Member;
- yield return new FieldReference (ctx, co, mem.DeclaringType, field);
- }
- if (mem.Member is TargetPropertyInfo) {
- TargetPropertyInfo prop = (TargetPropertyInfo) mem.Member;
- if (prop.CanRead && (prop.Getter.ParameterTypes == null || prop.Getter.ParameterTypes.Length == 0))
- yield return new PropertyReference (ctx, prop, co);
- }
- }
- }
-
-
- protected override IEnumerable<ValueReference> OnGetLocalVariables (EvaluationContext gctx)
- {
- MdbEvaluationContext ctx = (MdbEvaluationContext) gctx;
- foreach (TargetVariable var in ctx.Frame.Method.GetLocalVariables (ctx.Thread)) {
- yield return new VariableReference (ctx, var, ObjectValueFlags.Variable);
- }
- }
-
-
- public override ValueReference GetIndexerReference (EvaluationContext gctx, object target, object[] indices)
- {
- MdbEvaluationContext ctx = (MdbEvaluationContext) gctx;
- TargetObject[] indexArray = new TargetObject [indices.Length];
- Array.Copy (indices, indexArray, indices.Length);
- return IndexerValueReference.CreateIndexerValueReference (ctx, (TargetObject) target, indexArray);
- }
-
-
- public override string[] GetImportedNamespaces (EvaluationContext gctx)
- {
- MdbEvaluationContext ctx = (MdbEvaluationContext) gctx;
- return ctx.Frame.Method.GetNamespaces ();
- }
-
-
- public override object GetEnclosingType (EvaluationContext gctx)
- {
- MdbEvaluationContext ctx = (MdbEvaluationContext) gctx;
- return ctx.Frame.Method.GetDeclaringType (ctx.Frame.Thread);
- }
-
-
- public override object GetBaseValue (EvaluationContext gctx, object val)
- {
- MdbEvaluationContext ctx = (MdbEvaluationContext) gctx;
- TargetStructObject sob = (TargetStructObject) ctx.GetRealObject (val);
- return sob.GetParentObject (ctx.Thread);
- }
-
-
- public override object CreateValue (EvaluationContext gctx, object value)
- {
- MdbEvaluationContext ctx = (MdbEvaluationContext) gctx;
- return ctx.Frame.Language.CreateInstance (ctx.Thread, value);
- }
-
-
- public override object CreateValue (EvaluationContext gctx, object type, params object[] args)
- {
- MdbEvaluationContext ctx = (MdbEvaluationContext) gctx;
- TargetType tt = (TargetType) type;
- TargetObject[] lst = new TargetObject [args.Length];
- Array.Copy (args, lst, args.Length);
- return CallStaticMethod (ctx, ".ctor", tt, lst);
- }
-
-
- public override object CreateTypeObject (EvaluationContext gctx, object type)
- {
- MdbEvaluationContext ctx = (MdbEvaluationContext) gctx;
- return GetTypeOf (ctx, ((TargetType)type).Name);
- }
-
- public static TargetStructObject GetTypeOf (MdbEvaluationContext ctx, string typeName)
- {
- ctx.AssertTargetInvokeAllowed ();
- TargetType tt = ctx.Frame.Language.LookupType ("System.Type");
- if (tt == null)
- return null;
-
- TargetObject tn = ctx.Frame.Language.CreateInstance (ctx.Thread, ObjectUtil.FixTypeName (typeName));
- TargetObject res = CallStaticMethod (ctx, "GetType", tt, tn);
- return (TargetStructObject) ctx.GetRealObject (res);
- }
-
- protected override ObjectValue CreateObjectValueImpl (EvaluationContext gctx, IObjectValueSource source, ObjectPath path, object vobj, ObjectValueFlags flags)
- {
- MdbEvaluationContext ctx = (MdbEvaluationContext) gctx;
- TargetObject obj = ctx.GetRealObject (vobj);
-
- if (obj == null)
- return ObjectValue.CreateObject (null, path, "", "", flags | ObjectValueFlags.ReadOnly, null);
-
- if (obj.HasAddress && obj.GetAddress (ctx.Thread).IsNull)
- return ObjectValue.CreateObject (null, path, obj.TypeName, ctx.Evaluator.ToExpression (ctx, null), flags, null);
-
- switch (obj.Kind) {
-
- case TargetObjectKind.Struct:
- case TargetObjectKind.GenericInstance:
- case TargetObjectKind.Class:
- case TargetObjectKind.Array:
- case TargetObjectKind.Fundamental:
- case TargetObjectKind.Enum:
- return base.CreateObjectValueImpl (gctx, source, path, vobj, flags);
-
- case TargetObjectKind.Object:
- TargetObjectObject oob = obj as TargetObjectObject;
- if (oob == null)
- return ObjectValue.CreateUnknown (path.LastName);
- else
- return ObjectValue.CreateObject (source, path, obj.TypeName, Server.Instance.Evaluator.TargetObjectToExpression (ctx, obj), flags, null);
-
- case TargetObjectKind.Pointer:
- return ObjectValue.CreateObject (source, path, obj.TypeName, Server.Instance.Evaluator.TargetObjectToExpression (ctx, obj), flags, null);
-
- case TargetObjectKind.Nullable:
- TargetNullableObject tn = (TargetNullableObject) obj;
- if (tn.HasValue (ctx.Thread)) {
- ObjectValue val = CreateObjectValue (ctx, source, path, tn.GetValue (ctx.Thread), flags);
- val.TypeName = obj.TypeName;
- return val;
- }
- else {
- flags |= ObjectValueFlags.Primitive;
- return ObjectValue.CreateObject (source, path, obj.TypeName, ctx.Evaluator.ToExpression (ctx, null), flags, new ObjectValue [0]);
- }
- default:
- return ObjectValue.CreateFatalError (path.LastName, "Unknown value type: " + obj.Kind, flags);
- }
- }
-
- public override object CreateNullValue (EvaluationContext gctx, object type)
- {
- MdbEvaluationContext ctx = (MdbEvaluationContext) gctx;
- return ctx.Frame.Language.CreateNullObject (ctx.Thread, (TargetType)type);
- }
-
- public override ICollectionAdaptor CreateArrayAdaptor (EvaluationContext gctx, object arr)
- {
- MdbEvaluationContext ctx = (MdbEvaluationContext) gctx;
- TargetArrayObject aob = arr as TargetArrayObject;
- if (aob != null)
- return new ArrayAdaptor (ctx, aob);
- else
- return null;
- }
-
- public static TargetObject CallMethod (MdbEvaluationContext ctx, string name,
- TargetObject target,
- params TargetObject[] args)
- {
-#if REFLECTION_INVOKE
- if (target is TargetGenericInstanceObject || !(target is TargetStructObject)) {
- // Calling methods on generic objects is suprisingly not supported
- // by the debugger. As a workaround we do the call using reflection.
-
- if (name != "ToString" || args.Length != 0) {
- GetTypeOf (ctx, "System.Convert");
- TargetType cc = ctx.Frame.Language.LookupType ("System.Convert");
- SR.BindingFlags sf = SR.BindingFlags.InvokeMethod | SR.BindingFlags.Static | SR.BindingFlags.FlattenHierarchy | SR.BindingFlags.Public | SR.BindingFlags.NonPublic;
- CallMethodWithReflection (ctx, sf, "ToString", cc, null, target);
- }
-
- SR.BindingFlags f = SR.BindingFlags.InvokeMethod | SR.BindingFlags.Instance | SR.BindingFlags.Public | SR.BindingFlags.NonPublic;
- return CallMethodWithReflection (ctx, f, name, target.Type, target, args);
- }
-#endif
- ctx.AssertTargetInvokeAllowed ();
-
- TargetType[] types = new TargetType [args.Length];
- for (int n=0; n<types.Length; n++)
- types [n] = args [n].Type;
-
- TargetStructObject starget = (TargetStructObject) target;
- MemberReference mem = OverloadResolve (ctx, name, starget.Type, types, true, false, true);
- TargetFunctionType function = (TargetFunctionType) ((TargetMethodInfo) mem.Member).Type;
-
- while (starget.Type != mem.DeclaringType) {
- TargetStructObject par = starget.GetParentObject (ctx.Thread);
- if (par != null)
- starget = par;
- else
- break;
- }
-
- TargetMethodSignature sig = function.GetSignature (ctx.Thread);
-
- TargetObject[] objs = new TargetObject [args.Length];
- for (int i = 0; i < args.Length; i++) {
- objs [i] = TargetObjectConvert.ImplicitConversionRequired (
- ctx, args [i], sig.ParameterTypes [i]);
- }
-
- return Server.Instance.RuntimeInvoke (ctx, function, starget, objs);
- }
-
- public static TargetObject CallStaticMethod (MdbEvaluationContext ctx, string name,
- string typeName,
- params TargetObject[] args)
- {
- return CallStaticMethod (ctx, name, ctx.Frame.Language.LookupType (typeName), args);
- }
-
- public static TargetObject CallStaticMethod (MdbEvaluationContext ctx, string name,
- TargetType type,
- params TargetObject[] args)
- {
-#if REFLECTION_INVOKE
- if (type is TargetGenericInstanceType || !(type is TargetStructType)) {
- // Calling methods on generic objects is suprisingly not supported
- // by the debugger. As a workaround we do the call using reflection.
-
- SR.BindingFlags f = SR.BindingFlags.InvokeMethod | SR.BindingFlags.Static | SR.BindingFlags.Public | SR.BindingFlags.NonPublic;
- return CallMethodWithReflection (ctx, f, name, type, null, args);
- }
-#endif
- ctx.AssertTargetInvokeAllowed ();
-
- TargetType[] types = new TargetType [args.Length];
- for (int n=0; n<types.Length; n++)
- types [n] = args [n].Type;
-
- MemberReference mem = OverloadResolve (ctx, name, type, types, false, true, true);
- TargetFunctionType function = (TargetFunctionType) ((TargetMethodInfo) mem.Member).Type;
-
- TargetMethodSignature sig = function.GetSignature (ctx.Thread);
-
- TargetObject[] objs = new TargetObject [args.Length];
- for (int i = 0; i < args.Length; i++) {
- objs [i] = TargetObjectConvert.ImplicitConversionRequired (ctx, args [i], sig.ParameterTypes [i]);
- }
-
- return Server.Instance.RuntimeInvoke (ctx, function, null, objs);
- }
-
- public static MemberReference OverloadResolve (MdbEvaluationContext ctx, string methodName, TargetType type, TargetType[] argtypes, bool allowInstance, bool allowStatic, bool throwIfNotFound)
- {
- List<MemberReference> candidates = new List<MemberReference> ();
-
- if (methodName == ".ctor") {
- TargetClassType ct = type as TargetClassType;
- if (ct == null && type.HasClassType)
- ct = type.ClassType;
-
- foreach (TargetMethodInfo met in ct.Constructors) {
- if (met.Type.ParameterTypes.Length == argtypes.Length)
- candidates.Add (new MemberReference (met, type));
- }
- }
- else {
- foreach (MemberReference mem in ObjectUtil.GetTypeMembers (ctx, type, false, false, true, BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Static)) {
- TargetMethodInfo met = (TargetMethodInfo) mem.Member;
- if (met.Name == methodName && met.Type.ParameterTypes.Length == argtypes.Length && (met.IsStatic && allowStatic || !met.IsStatic && allowInstance))
- candidates.Add (mem);
- }
- }
-
- if (candidates.Count == 1) {
- TargetFunctionType func = (TargetFunctionType) ((TargetMethodInfo) candidates [0].Member).Type;
- string error;
- int matchCount;
- if (IsApplicable (ctx, func, argtypes, out error, out matchCount))
- return candidates [0];
-
- if (throwIfNotFound)
- throw new EvaluatorException ("Invalid arguments for method `{0}': {1}", methodName, error);
- else
- return null;
- }
-
- if (candidates.Count == 0) {
- if (throwIfNotFound)
- throw new EvaluatorException ("Method `{0}' not found in type `{1}'.", methodName, type.Name);
- else
- return null;
- }
-
- return OverloadResolve (ctx, methodName, argtypes, candidates, throwIfNotFound);
- }
-
- static bool IsApplicable (MdbEvaluationContext ctx, TargetFunctionType method, TargetType[] types, out string error, out int matchCount)
- {
- TargetMethodSignature sig = method.GetSignature (ctx.Thread);
- matchCount = 0;
-
- for (int i = 0; i < types.Length; i++) {
- TargetType param_type = sig.ParameterTypes [i];
-
- if (param_type == types [i]) {
- matchCount++;
- continue;
- }
-
- if (TargetObjectConvert.ImplicitConversionExists (ctx, types [i], param_type))
- continue;
-
- error = String.Format (
- "Argument {0}: Cannot implicitly convert `{1}' to `{2}'",
- i, types [i].Name, param_type.Name);
- return false;
- }
-
- error = null;
- return true;
- }
-
- static MemberReference OverloadResolve (MdbEvaluationContext ctx, string methodName, TargetType[] argtypes, List<MemberReference> candidates, bool throwIfNotFound)
- {
- // Ok, no we need to find an exact match.
- MemberReference match = null;
- int bestCount = -1;
- bool repeatedBestCount = false;
-
- foreach (MemberReference method in candidates) {
- string error;
- int matchCount;
- TargetFunctionType func;
- if (method.Member is TargetMethodInfo)
- func = (TargetFunctionType) ((TargetMethodInfo) method.Member).Type;
- else
- func = (TargetFunctionType) ((TargetPropertyInfo) method.Member).Getter;
-
- if (!IsApplicable (ctx, func, argtypes, out error, out matchCount))
- continue;
-
- if (matchCount == bestCount) {
- repeatedBestCount = true;
- } else if (matchCount > bestCount) {
- match = method;
- bestCount = matchCount;
- repeatedBestCount = false;
- }
- }
-
- if (match == null) {
- if (!throwIfNotFound)
- return null;
- if (methodName != null)
- throw new EvaluatorException ("Invalid arguments for method `{0}'.", methodName);
- else
- throw new EvaluatorException ("Invalid arguments for indexer.");
- }
-
- if (repeatedBestCount) {
- // If there is an ambiguous match, just pick the first match. If the user was expecting
- // something else, he can provide more specific arguments
-
-/* if (!throwIfNotFound)
- return null;
- if (methodName != null)
- throw new EvaluatorException ("Ambiguous method `{0}'; need to use full name", methodName);
- else
- throw new EvaluatorException ("Ambiguous arguments for indexer.", methodName);
-*/ }
-
- return match;
- }
- }
-
- class ObjectUtil
- {
- public static TargetObject GetRealObject (MdbEvaluationContext ctx, TargetObject obj)
- {
- if (obj == null)
- return null;
-
- try {
- switch (obj.Kind) {
- case TargetObjectKind.Array:
- case TargetObjectKind.Fundamental:
- return obj;
-
- case TargetObjectKind.Struct:
- case TargetObjectKind.GenericInstance:
- case TargetObjectKind.Class:
- TargetStructObject co = obj as TargetStructObject;
- if (co == null)
- return null;
- TargetObject res = co.GetCurrentObject (ctx.Thread);
- return res ?? obj;
-
- case TargetObjectKind.Object:
- TargetObjectObject oob = obj as TargetObjectObject;
- if (oob == null)
- return null;
- if (oob.Type.CanDereference)
- return oob.GetDereferencedObject (ctx.Thread);
- else
- return oob;
- }
- }
- catch {
- // Ignore
- }
- return obj;
- }
-
- public static IEnumerable<MemberReference> GetTypeMembers (MdbEvaluationContext ctx, TargetType t, bool includeFields, bool includeProps, bool includeMethods, BindingFlags flags)
- {
- // Don't use yield in this method because the whole list of members
- // must be retrieved before we can do anything with them.
- List<MemberReference> members = new List<MemberReference> ();
-
- Dictionary<string,string> foundMethods = new Dictionary<string,string> ();
-
- while (t != null) {
-
- TargetFieldInfo[] fields = null;
- TargetPropertyInfo[] properties = null;
- TargetMethodInfo[] methods = null;
-
- TargetClass cls = t.HasClassType ? t.ClassType.GetClass (ctx.Thread) : null;
- if (cls != null) {
- if (includeFields)
- fields = cls.GetFields (ctx.Thread);
- if (includeProps)
- properties = cls.GetProperties (ctx.Thread);
- if (includeMethods)
- methods = cls.GetMethods (ctx.Thread);
- }
- else {
- TargetClassType ct = t as TargetClassType;
- if (ct == null && t.HasClassType)
- ct = t.ClassType;
- if (ct != null) {
- if (includeFields)
- fields = ct.Fields;
- if (includeProps)
- properties = ct.Properties;
- if (includeMethods)
- methods = ct.Methods;
- }
- }
-
- if (fields != null) {
- foreach (TargetFieldInfo field in fields) {
- if (field.IsCompilerGenerated)
- continue;
- if (field.Accessibility == TargetMemberAccessibility.Public && (flags & BindingFlags.Public) == 0)
- continue;
- if (field.Accessibility != TargetMemberAccessibility.Public && (flags & BindingFlags.NonPublic) == 0)
- continue;
- if (field.IsStatic && (flags & BindingFlags.Static) == 0)
- continue;
- if (!field.IsStatic && (flags & BindingFlags.Instance) == 0)
- continue;
- members.Add (new MemberReference (field, t));
- }
- }
-
- if (properties != null) {
- foreach (TargetPropertyInfo prop in properties) {
- if (prop.Accessibility == TargetMemberAccessibility.Public && (flags & BindingFlags.Public) == 0)
- continue;
- if (prop.Accessibility != TargetMemberAccessibility.Public && (flags & BindingFlags.NonPublic) == 0)
- continue;
- if (prop.IsStatic && (flags & BindingFlags.Static) == 0)
- continue;
- if (!prop.IsStatic && (flags & BindingFlags.Instance) == 0)
- continue;
- members.Add (new MemberReference (prop, t));
- }
- }
-
- if (methods != null) {
- foreach (TargetMethodInfo met in methods) {
- if (met.Accessibility == TargetMemberAccessibility.Public && (flags & BindingFlags.Public) == 0)
- continue;
- if (met.Accessibility != TargetMemberAccessibility.Public && (flags & BindingFlags.NonPublic) == 0)
- continue;
- if (met.IsStatic && (flags & BindingFlags.Static) == 0)
- continue;
- if (!met.IsStatic && (flags & BindingFlags.Instance) == 0)
- continue;
- string sig = met.FullName;
- if (!foundMethods.ContainsKey (sig)) {
- foundMethods [sig] = sig;
- members.Add (new MemberReference (met, t));
- }
- }
- }
-
- TargetStructType type = t as TargetStructType;
- if (type != null && type.HasParent && (flags & BindingFlags.DeclaredOnly) == 0)
- t = type.GetParentType (ctx.Thread);
- else
- break;
- }
- return members;
- }
-
- public static ObjectValueFlags GetAccessibility (TargetMemberAccessibility ma)
- {
- switch (ma) {
- case TargetMemberAccessibility.Internal: return ObjectValueFlags.Internal;
- case TargetMemberAccessibility.Protected: return ObjectValueFlags.Protected;
- case TargetMemberAccessibility.Public: return ObjectValueFlags.Public;
- default: return ObjectValueFlags.Private;
- }
- }
-
- public static string FixTypeName (string typeName)
- {
- // Required since the debugger uses C# type aliases for fundamental types,
- // which is silly, but looks like it won't be fixed any time soon.
-
- typeName = typeName.Replace ('/','+');
-
- switch (typeName) {
- case "short": return "System.Int16";
- case "ushort": return "System.UInt16";
- case "int": return "System.Int32";
- case "uint": return "System.UInt32";
- case "long": return "System.Int64";
- case "ulong": return "System.UInt64";
- case "float": return "System.Single";
- case "double": return "System.Double";
- case "char": return "System.Char";
- case "byte": return "System.Byte";
- case "sbyte": return "System.SByte";
- case "object": return "System.Object";
- case "string": return "System.String";
- case "bool": return "System.Boolean";
- case "void": return "System.Void";
- case "decimal": return "System.Decimal";
- }
-
- int i = typeName.IndexOf ('<');
- if (i != -1) {
- StringBuilder sb = new StringBuilder (typeName.Substring (0, i));
- sb.Append ('[');
- i++;
- int e;
- do {
- e = FindTypeEnd (typeName, i);
- sb.Append (FixTypeName (typeName.Substring (i, e-i)));
- sb.Append (',');
- i = e + 1;
- } while (typeName [e] == ',');
-
- sb.Remove (sb.Length - 1, 1);
- sb.Append (']');
- sb.Append (typeName.Substring (e+1));
- return sb.ToString ();
- }
-
- return typeName;
- }
-
- static int FindTypeEnd (string str, int index)
- {
- int level = 0;
- while (index < str.Length) {
- char c = str [index];
- if (c == '[' || c == '<')
- level++;
- if (c == ']' || c == '>') {
- if (level == 0)
- return index;
- else
- level--;
- }
- if (c == ',' && level == 0)
- return index;
- index++;
- }
- return index;
- }
- }
-
- public class MemberReference
- {
- public readonly TargetMemberInfo Member;
- public readonly TargetType DeclaringType;
-
- public MemberReference (TargetMemberInfo member, TargetType type)
- {
- Member = member;
- DeclaringType = type;
- }
-
- public TargetObject GetValue (MdbEvaluationContext ctx, TargetStructObject thisObj)
- {
- if (Member is TargetPropertyInfo) {
- TargetPropertyInfo prop = (TargetPropertyInfo) Member;
- return ObjectUtil.GetRealObject (ctx, Server.Instance.RuntimeInvoke (ctx, prop.Getter, thisObj));
- }
- else if (Member is TargetFieldInfo) {
- TargetFieldInfo field = (TargetFieldInfo) Member;
- if (field.HasConstValue)
- return ctx.Frame.Language.CreateInstance (ctx.Thread, field.ConstValue);
- TargetClass cls = DeclaringType.ClassType.GetClass (ctx.Thread);
- return ObjectUtil.GetRealObject (ctx, cls.GetField (ctx.Thread, thisObj, field));
- }
- else {
- TargetMethodInfo met = (TargetMethodInfo) Member;
- return ObjectUtil.GetRealObject (ctx, Server.Instance.RuntimeInvoke (ctx, met.Type, thisObj));
- }
- }
- }
-
- class MethodCall: AsyncOperation
- {
- MdbEvaluationContext ctx;
- TargetFunctionType function;
- TargetStructObject object_argument;
- TargetObject[] param_objects;
- RuntimeInvokeResult res;
-
- public MethodCall (MdbEvaluationContext ctx, TargetFunctionType function, TargetStructObject object_argument, TargetObject[] param_objects)
- {
- this.ctx = ctx;
- this.function = function;
- this.object_argument = object_argument;
- this.param_objects = param_objects;
- }
-
- public override string Description {
- get {
- if (function.DeclaringType != null)
- return function.DeclaringType.Name + "." + function.Name;
- else
- return function.Name;
- }
- }
-
- public override void Invoke ( )
- {
- res = ctx.Thread.RuntimeInvoke (function, object_argument, param_objects, true, false);
- }
-
- public override void Abort ( )
- {
- res.Abort ();
- res.CompletedEvent.WaitOne ();
- Server.Instance.MdbAdaptor.AbortThread (ctx.Thread, res);
- WaitToStop (ctx.Thread);
- }
-
- public override void Shutdown ()
- {
- res.Abort ();
- if (!res.CompletedEvent.WaitOne (200))
- return;
- Server.Instance.MdbAdaptor.AbortThread (ctx.Thread, res);
- }
-
- public override bool WaitForCompleted (int timeout)
- {
- if (timeout != -1) {
- if (!res.CompletedEvent.WaitOne (timeout, false))
- return false;
- }
- else {
- res.Wait ();
- }
- WaitToStop (ctx.Thread);
- return true;
- }
-
- void WaitToStop (Thread thread)
- {
- thread.WaitHandle.WaitOne ();
- while (!thread.IsStopped)
- ST.Thread.Sleep (1);
- }
-
- public TargetObject ReturnValue {
- get {
- if (res.ExceptionMessage != null)
- throw new EvaluatorException (res.ExceptionMessage);
- return res.ReturnObject;
- }
- }
- }
-}
diff --git a/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Server.Mdb/Mono.Debugging.Server.Mdb.csproj b/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Server.Mdb/Mono.Debugging.Server.Mdb.csproj
deleted file mode 100644
index 4f60d7b3b4..0000000000
--- a/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Server.Mdb/Mono.Debugging.Server.Mdb.csproj
+++ /dev/null
@@ -1,195 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>9.0.21022</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{4B40BE72-6DF7-48FD-8DF0-81A42D1FB6DF}</ProjectGuid>
- <OutputType>Exe</OutputType>
- <RootNamespace>DebuggerServer</RootNamespace>
- <AssemblyName>DebuggerServer</AssemblyName>
- <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>..\build</OutputPath>
- <DefineConstants>DEBUG;TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <CheckForOverflowUnderflow>true</CheckForOverflowUnderflow>
- <Execution>
- <Execution clr-version="Net_2_0" />
- </Execution>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>..\..\..\extra\home\lluis\work\monodevelop\extras\MonoDevelop.Debugger.Mdb\build</OutputPath>
- <DefineConstants>TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <CheckForOverflowUnderflow>true</CheckForOverflowUnderflow>
- <Execution>
- <Execution clr-version="Net_2_0" />
- </Execution>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="System" />
- <Reference Include="System.Data" />
- <Reference Include="System.Runtime.Remoting" />
- <Reference Include="System.Xml" />
- <Reference Include="Mono.Debugger, Version=1.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756" />
- <Reference Include="NRefactory, Version=0.0.0.0, Culture=neutral">
- <Package>monodevelop</Package>
- <SpecificVersion>False</SpecificVersion>
- </Reference>
- <Reference Include="Mono.TextEditor, Version=1.0.0.0, Culture=neutral">
- <Package>monodevelop</Package>
- </Reference>
- <Reference Include="Mono.Addins, Version=0.4.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756">
- <SpecificVersion>False</SpecificVersion>
- </Reference>
- <Reference Include="Mono.Posix" />
- <Reference Include="Mono.Cecil, Version=0.6.8.8607, Culture=neutral">
- <Package>monodevelop</Package>
- <SpecificVersion>False</SpecificVersion>
- </Reference>
- <Reference Include="MonoDevelop.Core, Version=1.9.2.0, Culture=neutral">
- <Package>monodevelop</Package>
- <SpecificVersion>False</SpecificVersion>
- </Reference>
- <Reference Include="MonoDevelop.Ide, Version=1.9.2.0, Culture=neutral">
- <Package>monodevelop</Package>
- <SpecificVersion>False</SpecificVersion>
- </Reference>
- <Reference Include="MonoDevelop.VersionControl, Version=1.9.2.0, Culture=neutral">
- <Package>monodevelop-core-addins</Package>
- <SpecificVersion>False</SpecificVersion>
- </Reference>
- <Reference Include="MonoDevelop.NUnit, Version=1.9.2.0, Culture=neutral">
- <Package>monodevelop-core-addins</Package>
- <SpecificVersion>False</SpecificVersion>
- </Reference>
- <Reference Include="MonoDevelop.XmlEditor, Version=1.9.2.0, Culture=neutral">
- <Package>monodevelop-core-addins</Package>
- <SpecificVersion>False</SpecificVersion>
- </Reference>
- <Reference Include="MonoDevelop.AspNet, Version=1.9.2.0, Culture=neutral">
- <Package>monodevelop-core-addins</Package>
- <SpecificVersion>False</SpecificVersion>
- </Reference>
- <Reference Include="MonoDevelop.Gettext, Version=1.9.2.0, Culture=neutral">
- <Package>monodevelop-core-addins</Package>
- <SpecificVersion>False</SpecificVersion>
- </Reference>
- <Reference Include="MonoDevelop.Deployment, Version=1.9.2.0, Culture=neutral">
- <Package>monodevelop-core-addins</Package>
- <SpecificVersion>False</SpecificVersion>
- </Reference>
- <Reference Include="MonoDevelop.Deployment.Linux, Version=1.9.2.0, Culture=neutral">
- <Package>monodevelop-core-addins</Package>
- <SpecificVersion>False</SpecificVersion>
- </Reference>
- <Reference Include="MonoDevelop.GtkCore, Version=1.9.2.0, Culture=neutral">
- <Package>monodevelop-core-addins</Package>
- <SpecificVersion>False</SpecificVersion>
- </Reference>
- <Reference Include="MonoDevelop.DesignerSupport, Version=1.9.2.0, Culture=neutral">
- <Package>monodevelop-core-addins</Package>
- <SpecificVersion>False</SpecificVersion>
- </Reference>
- <Reference Include="MonoDevelop.VBNetBinding, Version=1.9.2.0, Culture=neutral">
- <Package>monodevelop-core-addins</Package>
- <SpecificVersion>False</SpecificVersion>
- </Reference>
- <Reference Include="MonoDevelop.CBinding, Version=1.9.2.0, Culture=neutral">
- <Package>monodevelop-core-addins</Package>
- <SpecificVersion>False</SpecificVersion>
- </Reference>
- <Reference Include="MonoDevelop.CSharpBinding, Version=1.9.2.0, Culture=neutral">
- <Package>monodevelop-core-addins</Package>
- <SpecificVersion>False</SpecificVersion>
- </Reference>
- <Reference Include="MonoDevelop.Autotools, Version=1.9.2.0, Culture=neutral">
- <Package>monodevelop-core-addins</Package>
- <SpecificVersion>False</SpecificVersion>
- </Reference>
- <Reference Include="System.Core">
- </Reference>
- <Reference Include="MonoDevelop.SourceEditor2, Version=2.1.0.0, Culture=neutral">
- <Package>monodevelop-core-addins</Package>
- <SpecificVersion>False</SpecificVersion>
- </Reference>
- <Reference Include="MonoDevelop.Debugger, Version=2.1.0.0, Culture=neutral">
- <Package>monodevelop-core-addins</Package>
- <SpecificVersion>False</SpecificVersion>
- </Reference>
- <Reference Include="MonoDevelop.Refactoring, Version=2.1.0.0, Culture=neutral">
- <Package>monodevelop-core-addins</Package>
- <SpecificVersion>False</SpecificVersion>
- </Reference>
- <Reference Include="MonoDevelop.Debugger.Soft, Version=2.2.0.0, Culture=neutral">
- <Package>monodevelop-core-addins</Package>
- </Reference>
- <Reference Include="Mono.Debugger.Soft, Version=0.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756">
- <Package>monodevelop-core-addins</Package>
- </Reference>
- <Reference Include="Mono.Debugging, Version=0.0.0.0, Culture=neutral, PublicKeyToken=5e9ce85b0923c84f">
- <Package>monodevelop</Package>
- </Reference>
- <Reference Include="Mono.Debugging.Soft, Version=0.0.0.0, Culture=neutral, PublicKeyToken=5e9ce85b0923c84f">
- <Package>monodevelop-core-addins</Package>
- </Reference>
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\Mono.Debugging.Backend.Mdb\Mono.Debugging.Backend.Mdb.csproj">
- <Project>{932ACD9F-AAEC-4A86-AC73-D0C9E1137A60}</Project>
- <Name>Mono.Debugging.Backend.Mdb</Name>
- </ProjectReference>
- </ItemGroup>
- <ItemGroup>
- <Compile Include="Server.cs" />
- <Compile Include="DebuggerServer.cs" />
- <Compile Include="BacktraceWrapper.cs" />
- <Compile Include="AssemblyInfo.cs" />
- <Compile Include="PropertyReference.cs" />
- <Compile Include="FieldReference.cs" />
- <Compile Include="VariableReference.cs" />
- <Compile Include="Convert.cs" />
- <Compile Include="ArrayAdaptor.cs" />
- <Compile Include="IndexerValueReference.cs" />
- <Compile Include="EvaluationContext.cs" />
- <Compile Include="MdbAdaptor.cs" />
- <Compile Include="MdbAdaptorFactory.cs" />
- <Compile Include="MdbObjectValueAdaptor.cs" />
- </ItemGroup>
- <ItemGroup>
- <None Include="ChangeLog" />
- </ItemGroup>
- <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
- <ProjectExtensions>
- <MonoDevelop>
- <Properties>
- <Deployment.LinuxDeployData generateScript="false" />
- </Properties>
- </MonoDevelop>
- </ProjectExtensions>
- <ItemGroup>
- <EmbeddedResource Include="MdbAdaptor-2-6.cs">
- <LogicalName>MdbAdaptor-2-6.cs</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="MdbAdaptor-2-4-2.cs">
- <LogicalName>MdbAdaptor-2-4-2.cs</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="MdbAdaptor-2-0.cs">
- <LogicalName>MdbAdaptor-2-0.cs</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="MdbAdaptor-2-4-4.cs">
- <LogicalName>MdbAdaptor-2-4-4.cs</LogicalName>
- </EmbeddedResource>
- </ItemGroup>
-</Project>
diff --git a/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Server.Mdb/PropertyReference.cs b/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Server.Mdb/PropertyReference.cs
deleted file mode 100644
index 1995ffbba1..0000000000
--- a/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Server.Mdb/PropertyReference.cs
+++ /dev/null
@@ -1,86 +0,0 @@
-// PropertyVariable.cs
-//
-// Author:
-// Lluis Sanchez Gual <lluis@novell.com>
-//
-// Copyright (c) 2008 Novell, Inc (http://www.novell.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-//
-//
-
-using System;
-using Mono.Debugger.Languages;
-using Mono.Debugger;
-using Mono.Debugging.Client;
-using Mono.Debugging.Evaluation;
-
-namespace DebuggerServer
-{
- class PropertyReference: ValueReference
- {
- TargetPropertyInfo prop;
- TargetStructObject thisobj;
-
- public PropertyReference (EvaluationContext ctx, TargetPropertyInfo prop, TargetStructObject thisobj): base (ctx)
- {
- this.prop = prop;
- if (!prop.IsStatic)
- this.thisobj = thisobj;
- }
-
- public override object Type {
- get {
- return prop.Type;
- }
- }
-
- public override object DeclaringType {
- get {
- return prop.Getter.DeclaringType;
- }
- }
-
- public override object Value {
- get {
- MdbEvaluationContext ctx = (MdbEvaluationContext) Context;
- return ctx.GetRealObject (Server.Instance.RuntimeInvoke (ctx, prop.Getter, thisobj, new TargetObject[0]));
- }
- set {
- MdbEvaluationContext ctx = (MdbEvaluationContext) Context;
- Server.Instance.RuntimeInvoke (ctx, prop.Setter, thisobj, new TargetObject[] { (TargetObject) value });
- }
- }
-
- public override string Name {
- get {
- return prop.Name;
- }
- }
-
- public override ObjectValueFlags Flags {
- get {
- ObjectValueFlags flags = ObjectValueFlags.Property | ObjectUtil.GetAccessibility (prop.Accessibility);
- if (!prop.CanWrite) flags |= ObjectValueFlags.ReadOnly;
- if (prop.IsStatic) flags |= ObjectValueFlags.Global;
- return flags;
- }
- }
- }
-}
diff --git a/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Server.Mdb/Server.cs b/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Server.Mdb/Server.cs
deleted file mode 100644
index 314cd3ac70..0000000000
--- a/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Server.Mdb/Server.cs
+++ /dev/null
@@ -1,109 +0,0 @@
-using System;
-using System.Collections;
-using System.Collections.Generic;
-using System.IO;
-using System.Runtime.Remoting.Channels;
-using System.Runtime.Remoting.Channels.Tcp;
-using System.Runtime.Serialization.Formatters.Binary;
-using System.Text;
-using Mono.Debugging.Backend.Mdb;
-using System.Reflection;
-using Mono.Remoting.Channels.Unix;
-
-namespace DebuggerServer
-{
- public class ServerApp
- {
- static void Main(string[] args)
- {
- Console.WriteLine("## DebuggerServer started");
-
- // The first line of the input is the location of the Mono.Debugging assembly
- string debuggingAsmLocation = Console.In.ReadLine();
- Assembly.LoadFrom (debuggingAsmLocation);
-
- // Mono can't jit a direct call to Server.Run because it fails trying to load Mono.Debugging.
- // The reflection call delays the loading of Mono.Debugging.
- typeof(Server).GetMethod ("Run", BindingFlags.Public | BindingFlags.Static).Invoke (null, new object[] { args });
- }
- }
-
- class Server
- {
- public static DebuggerServer Instance;
-
- public static void Run (string[] args)
- {
- try
- {
- // Load n-refactory from MD's dir
- string path = typeof(Mono.Debugging.Client.DebuggerSession).Assembly.Location;
- path = System.IO.Path.GetDirectoryName (path);
- path = System.IO.Path.Combine (path, "NRefactory.dll");
- Assembly.LoadFrom (path);
-
- string channel = Console.In.ReadLine();
-
- string unixPath = null;
- if (channel == "unix")
- {
- unixPath = System.IO.Path.GetTempFileName();
- Hashtable props = new Hashtable();
- props["path"] = unixPath;
- props["name"] = "__internal_unix";
- ChannelServices.RegisterChannel(new UnixChannel(props, null, null), false);
- }
- else
- {
- Hashtable props = new Hashtable();
- props["port"] = 0;
- props["name"] = "__internal_tcp";
- BinaryClientFormatterSinkProvider clientProvider = new BinaryClientFormatterSinkProvider();
- BinaryServerFormatterSinkProvider serverProvider = new BinaryServerFormatterSinkProvider();
-
- serverProvider.TypeFilterLevel = System.Runtime.Serialization.Formatters.TypeFilterLevel.Full;
- ChannelServices.RegisterChannel(new TcpChannel(props, clientProvider, serverProvider), false);
- }
-
- string sref = Console.In.ReadLine();
- byte[] data = Convert.FromBase64String(sref);
-
- MemoryStream ms = new MemoryStream(data);
- BinaryFormatter bf = new BinaryFormatter();
- IDebuggerController dc = (IDebuggerController) bf.Deserialize(ms);
-
- Instance = new DebuggerServer(dc);
- dc.RegisterDebugger (Instance);
- try
- {
- dc.WaitForExit();
- }
- catch (Exception e)
- {
- Console.WriteLine ("DS: Exception while waiting for WaitForExit: {0}", e.ToString ());
- }
-
- try
- {
- Instance.Dispose();
- }
- catch
- {
- }
-
- if (unixPath != null)
- File.Delete(unixPath);
-
- } catch (Exception e)
- {
- Console.WriteLine ("DS: {0}", e.ToString());
- }
-
- // Delay the exit a few seconds, to make sure all remoting calls
- // from the client have been completed
- System.Threading.Thread.Sleep (3000);
-
- Console.WriteLine ("DebuggerServer exiting.");
- }
- }
-}
diff --git a/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Server.Mdb/VariableReference.cs b/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Server.Mdb/VariableReference.cs
deleted file mode 100644
index 0155ea5cc6..0000000000
--- a/extras/MonoDevelop.Debugger.Mdb/Mono.Debugging.Server.Mdb/VariableReference.cs
+++ /dev/null
@@ -1,79 +0,0 @@
-// VariableReference.cs
-//
-// Author:
-// Lluis Sanchez Gual <lluis@novell.com>
-//
-// Copyright (c) 2008 Novell, Inc (http://www.novell.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-//
-//
-
-using System;
-using Mono.Debugger.Languages;
-using Mono.Debugger;
-using DC = Mono.Debugging.Client;
-using Mono.Debugging.Evaluation;
-
-namespace DebuggerServer
-{
- public class VariableReference: ValueReference
- {
- TargetVariable var;
- DC.ObjectValueFlags flags;
-
- public VariableReference (EvaluationContext ctx, TargetVariable var, DC.ObjectValueFlags flags): base (ctx)
- {
- this.flags = flags;
- this.var = var;
- if (!var.CanWrite)
- flags |= DC.ObjectValueFlags.ReadOnly;
- }
-
- public override object Value {
- get {
- MdbEvaluationContext ctx = (MdbEvaluationContext) Context;
- TargetObject val = var.GetObject (ctx.Frame);
- return ctx.GetRealObject (val);
- }
- set {
- MdbEvaluationContext ctx = (MdbEvaluationContext) Context;
- var.SetObject (ctx.Frame, (TargetObject) value);
- }
- }
-
- public override string Name {
- get {
- return var.Name;
- }
- }
-
- public override object Type {
- get {
- return var.Type;
- }
- }
-
- public override DC.ObjectValueFlags Flags {
- get {
- return flags;
- }
- }
- }
-}
diff --git a/extras/MonoDevelop.Debugger.Mdb/MonoDevelop.Debugger.Mdb.sln b/extras/MonoDevelop.Debugger.Mdb/MonoDevelop.Debugger.Mdb.sln
deleted file mode 100644
index caa21d4e57..0000000000
--- a/extras/MonoDevelop.Debugger.Mdb/MonoDevelop.Debugger.Mdb.sln
+++ /dev/null
@@ -1,59 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 11.00
-# Visual Studio 2010
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mono.Debugging.Backend.Mdb", "Mono.Debugging.Backend.Mdb\Mono.Debugging.Backend.Mdb.csproj", "{932ACD9F-AAEC-4A86-AC73-D0C9E1137A60}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mono.Debugging.Server.Mdb", "Mono.Debugging.Server.Mdb\Mono.Debugging.Server.Mdb.csproj", "{4B40BE72-6DF7-48FD-8DF0-81A42D1FB6DF}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mono.Debugging.Backend.Mdb.AspNet", "Mono.Debugging.Backend.Mdb.AspNet\Mono.Debugging.Backend.Mdb.AspNet.csproj", "{A35E163C-179D-47A0-8026-FDAA2BE6737B}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Any CPU = Debug|Any CPU
- Release|Any CPU = Release|Any CPU
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {4B40BE72-6DF7-48FD-8DF0-81A42D1FB6DF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {4B40BE72-6DF7-48FD-8DF0-81A42D1FB6DF}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {4B40BE72-6DF7-48FD-8DF0-81A42D1FB6DF}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {4B40BE72-6DF7-48FD-8DF0-81A42D1FB6DF}.Release|Any CPU.Build.0 = Release|Any CPU
- {932ACD9F-AAEC-4A86-AC73-D0C9E1137A60}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {932ACD9F-AAEC-4A86-AC73-D0C9E1137A60}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {932ACD9F-AAEC-4A86-AC73-D0C9E1137A60}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {932ACD9F-AAEC-4A86-AC73-D0C9E1137A60}.Release|Any CPU.Build.0 = Release|Any CPU
- {A35E163C-179D-47A0-8026-FDAA2BE6737B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {A35E163C-179D-47A0-8026-FDAA2BE6737B}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {A35E163C-179D-47A0-8026-FDAA2BE6737B}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {A35E163C-179D-47A0-8026-FDAA2BE6737B}.Release|Any CPU.Build.0 = Release|Any CPU
- EndGlobalSection
- GlobalSection(MonoDevelopProperties) = preSolution
- StartupItem = Mono.Debugging.Backend.Mdb\Mono.Debugging.Backend.Mdb.csproj
- Policies = $0
- $0.DotNetNamingPolicy = $1
- $1.DirectoryNamespaceAssociation = Flat
- $1.ResourceNamePolicy = FileName
- $0.StandardHeader = $2
- $2.Text = @\n${FileName}\n \nAuthor:\n ${AuthorName} <${AuthorEmail}>\n\nCopyright (c) ${Year} ${CopyrightHolder}\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the "Software"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.
- $2.IncludeInNewFiles = True
- $0.TextStylePolicy = $3
- $3.FileWidth = 120
- $3.TabWidth = 4
- $3.inheritsSet = Mono
- $3.inheritsScope = text/plain
- $0.VersionControlPolicy = $4
- $4.inheritsSet = Mono
- $0.ChangeLogPolicy = $5
- $5.UpdateMode = None
- $5.VcsIntegration = None
- $5.inheritsSet = Mono
- $0.TextStylePolicy = $6
- $6.TabWidth = 4
- $6.inheritsSet = Mono
- $6.inheritsScope = text/plain
- $6.scope = text/x-csharp
- $0.CSharpFormattingPolicy = $7
- $7.inheritsSet = Mono
- $7.inheritsScope = text/x-csharp
- $7.scope = text/x-csharp
- EndGlobalSection
-EndGlobal
diff --git a/extras/MonoDevelop.Debugger.Mdb/configure b/extras/MonoDevelop.Debugger.Mdb/configure
deleted file mode 100755
index 6695f8b771..0000000000
--- a/extras/MonoDevelop.Debugger.Mdb/configure
+++ /dev/null
@@ -1,160 +0,0 @@
-#!/usr/bin/env bash
-VERSION=4.2
-PACKAGE=monodevelop-debugger-mdb
-prefix=/usr/local
-config=DEBUG
-configurations=" RELEASE DEBUG"
-common_packages=" mono-addins;0.3 mono-debugger;2.0 monodevelop;4.2 monodevelop-core-addins;2.7"
-
-
-usage ()
-{
- echo "Usage : configure [OPTION]... [--config=CONFIG]"
- echo
- echo "Options:"
- echo " --prefix=PREFIX install architecture-independent files in PREFIX"
- echo " [/usr/local]"
- echo " --bindir=DIR user executables [PREFIX/bin]"
- echo " --datadir=DIR read-only architecture-independent data [PREFIX/share]"
- echo " --libdir=DIR object code libraries [PREFIX/lib]"
- echo
- echo "Configurations available :"
- for c in $configurations; do
- if [ "$c" = "$config" ]; then
- echo " $c (Default)"
- else
- echo " $c"
- fi
- done
-}
-
-validate_config ()
-{
- test -z "$1" && return 0
- for c in $configurations; do
- if [ "$c" = "$1" ]; then
- return 1
- fi
- done
- return 0
-}
-
-check_package ()
-{
- name=`echo $1 | cut -d\; -f1`
- version=`echo $1 | cut -d\; -f2`
-
- echo -n "Checking for package '$name'.." | tee -a config.log
- pkg-config --atleast-version=$version $name
- if [ $? -ne 0 ]; then
- echo " ERROR: Package named '$name' >= $version not found." | tee -a config.log
- echo "Try adjusting your PKG_CONFIG_PATH environment variable." | tee -a config.log
- return 1
- fi
- echo " found." | tee -a config.log
-}
-
-check_required_packages ()
-{
- echo "Looking for required packages" | tee config.log
- var=required_packages_$config
- for pkg in $common_packages ${!var}; do
- check_package $pkg
- retval=$?
- [ $retval -ne 0 ] && return $retval
- done
- return 0
-}
-
-while test x$1 != x; do
- case $1 in
- --prefix=*)
- prefix=`echo $1 | sed 's/--prefix=//'`
- ;;
- --prefix)
- shift
- prefix=$1
- ;;
- --libdir=*)
- libdir=`echo $1 | sed 's/--libdir=//'`
- ;;
- --libdir)
- shift
- libdir=$1
- ;;
- --bindir=*)
- bindir=`echo $1 | sed 's/--bindir=//'`
- ;;
- --bindir)
- shift
- bindir=$1
- ;;
- --datadir=*)
- datadir=`echo $1 | sed 's/--datadir=//'`
- ;;
- --datadir)
- shift
- datadir=$1
- ;;
- --config=*)
- conf=`echo $1 | sed 's/--config=//'`
- validate_config "$conf"
- if [ $? -eq 1 ]; then
- config=$conf
- else
- echo "Invalid config name - $conf"
- usage
- exit 1
- fi
- ;;
- --help)
- usage
- exit
- ;;
- *)
- echo Unknown argument $1 >&2
- usage
- exit 1
- ;;
- esac
- shift
-done
-
-check_required_packages
-[ $? -eq 1 ] && exit 1
-
-if [ -z "$libdir" ]; then
- libdir=$prefix/lib
-fi
-if [ -z "$bindir" ]; then
- bindir=$prefix/bin
-fi
-if [ -z "$datadir" ]; then
- datadir=$prefix/share
-fi
-
-echo "prefix=$prefix" > config.make
-echo "libdir=$libdir" >> config.make
-echo "bindir=$bindir" >> config.make
-echo "datadir=$datadir" >> config.make
-echo "RUNTIME=mono" >> config.make
-echo "ASSEMBLY_VERSION=$VERSION.0.0" >> config.make
-echo "VERSION=$VERSION" >> config.make
-echo "PACKAGE=$PACKAGE" >> config.make
-echo "CONFIG=$config" >> config.make
-echo "CSC=dmcs" >> config.make
-
-echo
-echo "$PACKAGE has been configured with "
-echo " prefix = $prefix"
-if [ "$libdir" != "$prefix/lib" ]; then
- echo " libdir = $libdir"
-fi
-if [ "$bindir" != "$prefix/bin" ]; then
- echo " bindir = $bindir"
-fi
-if [ "$datadir" != "$prefix/share" ]; then
- echo " datadir = $datadir"
-fi
-echo " config = $config"
-echo
diff --git a/extras/MonoDevelop.Debugger.Mdb/rules.make b/extras/MonoDevelop.Debugger.Mdb/rules.make
deleted file mode 100644
index a4f37a1fd1..0000000000
--- a/extras/MonoDevelop.Debugger.Mdb/rules.make
+++ /dev/null
@@ -1,42 +0,0 @@
-clean-local:
- make pre-clean-local-hook
- make $(CONFIG)_BeforeClean
- -rm -f $(call quote_each,$(CLEANFILES))
- make $(CONFIG)_AfterClean
- make post-clean-local-hook
-
-install-local:
-uninstall-local:
-
-q2quote = '$(subst ?, ,$1)'
-quote_each = $(foreach f,$(call s2q,$1),$(call q2quote,$f))
-
-dist-local:
- make pre-dist-local-hook "distdir=$$distdir"
- for f in Makefile $(call quote_each,$(EXTRA_DIST)); do \
- d=`dirname "$$f"`; \
- test -d "$(distdir)/$$d" || \
- mkdir -p "$(distdir)/$$d"; \
- cp -p "$$f" "$(distdir)/$$d" || exit 1; \
- done
- make post-dist-local-hook "distdir=$$distdir"
-
-dist-local-recursive:
- for dir in $(call quote_each,$(SUBDIRS)); do \
- mkdir -p "$(distdir)/$$dir" || true; \
- case "$$dir" in \
- .) make dist-local "distdir=$(distdir)" || exit 1;; \
- *) (cd "$$dir"; make dist-local "distdir=$(distdir)/$$dir") || exit 1; \
- esac \
- done
-
-#hooks: Available hooks - all, clean, install, uninstall and dist
-# and their *-local variants
-pre-%-hook: ; @:
-post-%-hook: ; @:
-
-#targets for custom commands
-%_BeforeBuild: ; @:
-%_AfterBuild: ; @:
-%_BeforeClean: ; @:
-%_AfterClean: ; @:
diff --git a/extras/extras.mdw b/extras/extras.mdw
index 10a171f1f7..0781b242dd 100644
--- a/extras/extras.mdw
+++ b/extras/extras.mdw
@@ -1,10 +1,8 @@
<WorkspaceItem name="extras" ctype="Workspace">
<Items>
<Item>MonoDevelop.AddinAuthoring/MonoDevelop.AddinAuthoring.sln</Item>
- <Item>MonoDevelop.Profiling/MonoDevelop.Profiling.mds</Item>
<Item>ValaBinding/ValaBinding.sln</Item>
<Item>PyBinding/PyBinding.sln</Item>
- <Item>MonoDevelop.Debugger.Mdb/MonoDevelop.Debugger.Mdb.sln</Item>
<Item>MonoDevelop.Debugger.Gdb/MonoDevelop.Debugger.Gdb.sln</Item>
<Item>MonoDevelop.Database/MonoDevelop.Database.sln</Item>
<Item>MonoDevelop.CodeAnalysis/MonoDevelop.CodeAnalysis.sln</Item>