summaryrefslogtreecommitdiffstats
path: root/src/progs/sdcdb/base
diff options
context:
space:
mode:
Diffstat (limited to 'src/progs/sdcdb/base')
-rw-r--r--src/progs/sdcdb/base/Makefile724
-rw-r--r--src/progs/sdcdb/base/Makefile.am6
-rw-r--r--src/progs/sdcdb/base/base.pro6
-rw-r--r--src/progs/sdcdb/base/sdcdb_debug.cpp281
-rw-r--r--src/progs/sdcdb/base/sdcdb_debug.h95
5 files changed, 1112 insertions, 0 deletions
diff --git a/src/progs/sdcdb/base/Makefile b/src/progs/sdcdb/base/Makefile
new file mode 100644
index 0000000..a2e6af5
--- /dev/null
+++ b/src/progs/sdcdb/base/Makefile
@@ -0,0 +1,724 @@
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# KDE tags expanded automatically by am_edit - $Revision: 877 $
+# src/progs/sdcdb/base/Makefile. Generated from Makefile.in by configure.
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+
+
+srcdir = .
+top_srcdir = ../../../..
+
+pkgdatadir = $(datadir)/piklab
+pkglibdir = $(libdir)/piklab
+pkgincludedir = $(includedir)/piklab
+top_builddir = ../../../..
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = /usr/bin/install -c -p
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = i486-pc-linux-gnu
+host_triplet = i486-pc-linux-gnu
+target_triplet = i486-pc-linux-gnu
+subdir = src/progs/sdcdb/base
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
+ $(top_srcdir)/configure.in
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(SHELL) $(top_srcdir)/admin/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+LTLIBRARIES = $(noinst_LTLIBRARIES)
+libsdcdb_la_LIBADD =
+am_libsdcdb_la_OBJECTS = sdcdb.lo sdcdb_debug.lo
+#>- libsdcdb_la_OBJECTS = $(am_libsdcdb_la_OBJECTS)
+#>+ 5
+libsdcdb_la_final_OBJECTS = libsdcdb_la.all_cpp.lo
+libsdcdb_la_nofinal_OBJECTS = sdcdb.lo sdcdb_debug.lo\
+sdcdb_debug.moc.lo
+libsdcdb_la_OBJECTS = $(libsdcdb_la_nofinal_OBJECTS)
+#libsdcdb_la_OBJECTS = $(libsdcdb_la_final_OBJECTS)
+DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/admin/depcomp
+am__depfiles_maybe = depfiles
+#>- CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+#>- $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+#>+ 2
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) $(KDE_CXXFLAGS)
+#>- LTCXXCOMPILE = $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) \
+#>- $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+#>- $(AM_CXXFLAGS) $(CXXFLAGS)
+#>+ 3
+LTCXXCOMPILE = $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CXXFLAGS) $(CXXFLAGS) $(KDE_CXXFLAGS)
+CXXLD = $(CXX)
+#>- CXXLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+#>- $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+#>+ 2
+CXXLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+ $(CXXFLAGS) $(KDE_CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+SOURCES = $(libsdcdb_la_SOURCES)
+DIST_SOURCES = $(libsdcdb_la_SOURCES)
+ETAGS = etags
+CTAGS = ctags
+#>- DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+#>+ 1
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) $(KDE_DIST)
+ACLOCAL = ${SHELL} /home/miriam/piklab/piklab-0.15.2/admin/missing --run aclocal-1.9
+AMDEP_FALSE = #
+AMDEP_TRUE =
+AMTAR = ${SHELL} /home/miriam/piklab/piklab-0.15.2/admin/missing --run tar
+AR = ar
+ARTSCCONFIG = /usr/bin/artsc-config
+AUTOCONF = $(SHELL) $(top_srcdir)/admin/cvs.sh configure || touch configure
+AUTODIRS =
+AUTOHEADER = ${SHELL} /home/miriam/piklab/piklab-0.15.2/admin/missing --run autoheader
+AUTOMAKE = ${SHELL} /home/miriam/piklab/piklab-0.15.2/admin/missing --run automake-1.9
+AWK = mawk
+BSD_FALSE =
+BSD_TRUE = #
+CC = i486-linux-gnu-gcc
+CCDEPMODE = depmode=gcc3
+CFLAGS = -std=iso9899:1990 -W -Wall -Wchar-subscripts -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -O2 -Wall -g -O2 -Wformat-security -Wmissing-format-attribute
+CONF_FILES = $(top_srcdir)/./admin/configure.in.min $(top_srcdir)/configure.in.in $(top_srcdir)/configure.in.mid
+CPP = i486-linux-gnu-gcc -E
+CPPFLAGS = -DQT_THREAD_SUPPORT -D_REENTRANT -L/usr/lib
+CXX = i486-linux-gnu-g++
+CXXCPP = i486-linux-gnu-g++ -E
+CXXDEPMODE = depmode=gcc3
+CXXFLAGS = -Wno-long-long -Wundef -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -Wchar-subscripts -Wall -W -Wpointer-arith -O2 -Wformat-security -Wmissing-format-attribute -Wno-non-virtual-dtor -fno-exceptions -fno-check-new -fno-common -DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST -DQT_NO_STL -DQT_NO_COMPAT -DQT_NO_TRANSLATION
+CYGPATH_W = echo
+DCOPIDL = /usr/bin/dcopidl
+DCOPIDL2CPP = /usr/bin/dcopidl2cpp
+DCOPIDLNG =
+DCOP_DEPENDENCIES = $(DCOPIDL)
+DEFS = -DHAVE_CONFIG_H
+DEPDIR = .deps
+ECHO = echo
+ECHO_C =
+ECHO_N = -n
+ECHO_T =
+EGREP = /bin/grep -E
+ENABLE_PERMISSIVE_FLAG = -fpermissive
+EXEEXT =
+F77 =
+FFLAGS =
+FRAMEWORK_COREAUDIO =
+GMSGFMT = /usr/bin/msgfmt
+GREP = /bin/grep
+HAVE_GCC_VISIBILITY = 0
+INSTALL_DATA = ${INSTALL} -m 644
+INSTALL_PROGRAM = ${INSTALL} $(INSTALL_STRIP_FLAG)
+INSTALL_SCRIPT = ${INSTALL}
+INSTALL_STRIP_PROGRAM = ${SHELL} $(install_sh) -c -s
+KCFG_DEPENDENCIES =
+KCONFIG_COMPILER =
+KDECONFIG = /usr/bin/kde-config
+KDE_CHECK_PLUGIN = $(KDE_PLUGIN) -rpath $(libdir)
+KDE_EXTRA_RPATH =
+KDE_INCLUDES = -I/usr/include/kde
+KDE_LDFLAGS = -L/usr/lib
+KDE_MT_LDFLAGS =
+KDE_MT_LIBS = -lpthread
+KDE_NO_UNDEFINED = -Wl,--no-undefined -Wl,--allow-shlib-undefined
+KDE_PLUGIN = -avoid-version -module -no-undefined $(KDE_NO_UNDEFINED) $(KDE_RPATH) $(KDE_MT_LDFLAGS)
+KDE_RPATH = -R $(libdir) -R $(kde_libraries) -R $(qt_libraries) -R $(x_libraries)
+KDE_USE_CLOSURE_FALSE =
+KDE_USE_CLOSURE_TRUE = #
+KDE_USE_FINAL_FALSE =
+KDE_USE_FINAL_TRUE = #
+KDE_USE_FPIE = -fPIE
+KDE_USE_NMCHECK_FALSE =
+KDE_USE_NMCHECK_TRUE = #
+KDE_USE_PIE = -pie
+KDE_XSL_STYLESHEET = /usr/share/apps/ksgmltools2/customization/kde-chunk.xsl
+LDFLAGS = -Wl,-z,defs -Wl,--as-needed
+LDFLAGS_AS_NEEDED =
+LDFLAGS_NEW_DTAGS =
+LIBCOMPAT =
+LIBCRYPT = -lcrypt
+LIBDL = -ldl
+LIBJPEG = -ljpeg
+LIBOBJS =
+LIBPNG = -lpng -lz -lm
+LIBPTHREAD = -lpthread
+LIBREADLINE_LIBS = -lhistory -lreadline -lcurses
+LIBRESOLV = -lresolv
+LIBS =
+LIBSM = -lSM -lICE
+LIBSOCKET =
+LIBTOOL = $(SHELL) $(top_builddir)/libtool --silent
+LIBUCB =
+LIBUSBCONFIG = yes
+LIBUSB_CFLAGS =
+LIBUSB_LIBS = -L/usr/lib -lusb
+LIBUTIL = -lutil
+LIBZ = -lz
+LIB_KAB = -lkab
+LIB_KABC = -lkabc
+LIB_KDECORE = -lkdecore
+LIB_KDED =
+LIB_KDEPIM = -lkdepim
+LIB_KDEPRINT = -lkdeprint
+LIB_KDEUI = -lkdeui
+LIB_KDNSSD = -lkdnssd
+LIB_KFILE = -lkio
+LIB_KFM =
+LIB_KHTML = -lkhtml
+LIB_KIMPROXY = -lkimproxy
+LIB_KIO = -lkio
+LIB_KJS = -lkjs
+LIB_KNEWSTUFF = -lknewstuff
+LIB_KPARTS = -lkparts
+LIB_KSPELL = -lkspell
+LIB_KSYCOCA = -lkio
+LIB_KUNITTEST = -lkunittest
+LIB_KUTILS = -lkutils
+LIB_POLL =
+LIB_QPE =
+LIB_QT = -lqt-mt $(LIBZ) $(LIBPNG) -lXext $(LIB_X11) $(LIBSM) -lpthread
+LIB_SMB = -lsmb
+LIB_X11 = -lX11 $(LIBSOCKET)
+LIB_XEXT = -lXext
+LIB_XRENDER =
+LINUX_FALSE = #
+LINUX_TRUE =
+LN_S = ln -s
+LTLIBOBJS =
+MAKEINFO = ${SHELL} /home/miriam/piklab/piklab-0.15.2/admin/missing --run makeinfo
+MAKEKDEWIDGETS =
+MCOPIDL = /usr/bin/mcopidl
+MEINPROC = /usr/bin/meinproc
+MOC = /usr/share/qt3/bin/moc
+MSGFMT = /usr/bin/msgfmt
+NOOPT_CFLAGS = -O0
+NOOPT_CXXFLAGS = -O0
+NULL_FALSE =
+NULL_TRUE = #
+OBJEXT = o
+PACKAGE = piklab
+PACKAGE_BUGREPORT =
+PACKAGE_NAME =
+PACKAGE_STRING =
+PACKAGE_TARNAME =
+PACKAGE_VERSION =
+PATH_SEPARATOR = :
+PERL = /usr/bin/perl
+QTE_NORTTI =
+QT_INCLUDES = -I/usr/share/qt3/include
+QT_LDFLAGS = -L/usr/share/qt3/lib
+RANLIB = ranlib
+SET_MAKE =
+SHELL = /bin/sh
+STRIP = strip
+TOPSUBDIRS = doc man po src
+UIC = /usr/share/qt3/bin/uic -L $(kde_widgetdir) -nounload
+UIC_TR = tr2i18n
+USER_INCLUDES =
+USER_LDFLAGS =
+USE_EXCEPTIONS = -fexceptions
+USE_RTTI =
+USE_THREADS =
+VERSION = 0.15.2
+WOVERLOADED_VIRTUAL =
+XGETTEXT = /usr/bin/xgettext
+XMKMF =
+XMLLINT = /usr/bin/xmllint
+X_EXTRA_LIBS =
+X_INCLUDES = -I.
+X_LDFLAGS = -L/usr/lib
+X_PRE_LIBS =
+X_RPATH = -R $(x_libraries)
+ac_ct_CC =
+ac_ct_CXX =
+ac_ct_F77 =
+all_includes = -I/usr/include/kde -I/usr/share/qt3/include -I.
+all_libraries = -L/usr/share/qt3/lib -L/usr/lib
+am__fastdepCC_FALSE = #
+am__fastdepCC_TRUE =
+am__fastdepCXX_FALSE = #
+am__fastdepCXX_TRUE =
+am__include = include
+am__leading_dot = .
+am__quote =
+am__tar = ${AMTAR} chof - "$$tardir"
+am__untar = ${AMTAR} xf -
+bindir = ${exec_prefix}/bin
+build = i486-pc-linux-gnu
+build_alias = i486-linux-gnu
+build_cpu = i486
+build_os = linux-gnu
+build_vendor = pc
+datadir = ${datarootdir}
+datarootdir = ${prefix}/share
+doc_SUBDIR_included_FALSE = #
+doc_SUBDIR_included_TRUE =
+docdir = ${datarootdir}/doc/${PACKAGE}
+dvidir = ${docdir}
+exec_prefix = ${prefix}
+host = i486-pc-linux-gnu
+host_alias = i486-linux-gnu
+host_cpu = i486
+host_os = linux-gnu
+host_vendor = pc
+htmldir = ${docdir}
+include_ARTS_FALSE = #
+include_ARTS_TRUE =
+include_x11_FALSE = #
+include_x11_TRUE =
+includedir = ${prefix}/include
+infodir = ${prefix}/share/info
+install_sh = /home/miriam/piklab/piklab-0.15.2/admin/install-sh
+kde_appsdir = ${datadir}/applnk
+kde_bindir = ${exec_prefix}/bin
+kde_confdir = ${datadir}/config
+kde_datadir = ${datadir}/apps
+kde_htmldir = ${datadir}/doc/HTML
+kde_icondir = ${datadir}/icons
+kde_includes = /usr/include/kde
+kde_kcfgdir = ${datadir}/config.kcfg
+kde_libraries = /usr/lib
+kde_libs_htmldir = /usr/share/doc/kde/HTML
+kde_libs_prefix = /usr
+kde_locale = ${datadir}/locale
+kde_mimedir = ${datadir}/mimelnk
+kde_moduledir = ${libdir}/kde3
+kde_qtver = 3
+kde_servicesdir = ${datadir}/services
+kde_servicetypesdir = ${datadir}/servicetypes
+kde_sounddir = ${datadir}/sounds
+kde_styledir = ${libdir}/kde3/plugins/styles
+kde_templatesdir = ${datadir}/templates
+kde_wallpaperdir = ${datadir}/wallpapers
+kde_widgetdir = /usr/lib/kde3/plugins/designer
+kdeinitdir = $(kde_moduledir)
+libdir = ${exec_prefix}/lib
+libexecdir = ${exec_prefix}/libexec
+localedir = ${datarootdir}/locale
+localstatedir = ${prefix}/var
+man_SUBDIR_included_FALSE = #
+man_SUBDIR_included_TRUE =
+mandir = ${prefix}/share/man
+mkdir_p = mkdir -p --
+oldincludedir = /usr/include
+pdfdir = ${docdir}
+po_SUBDIR_included_FALSE = #
+po_SUBDIR_included_TRUE =
+prefix = /usr
+program_transform_name = s,x,x,
+psdir = ${docdir}
+qt_includes = /usr/share/qt3/include
+qt_libraries = /usr/share/qt3/lib
+sbindir = ${exec_prefix}/sbin
+sharedstatedir = ${prefix}/com
+src_SUBDIR_included_FALSE = #
+src_SUBDIR_included_TRUE =
+sysconfdir = ${prefix}/etc
+target = i486-pc-linux-gnu
+target_alias =
+target_cpu = i486
+target_os = linux-gnu
+target_vendor = pc
+unsermake_enable_pch_FALSE =
+unsermake_enable_pch_TRUE = #
+x_includes = .
+x_libraries = /usr/lib
+xdg_appsdir = ${datadir}/applications/kde
+xdg_directorydir = ${datadir}/desktop-directories
+xdg_menudir = ${sysconfdir}/xdg/menus
+INCLUDES = -I$(top_srcdir)/src $(all_includes)
+#>- METASOURCES = AUTO
+noinst_LTLIBRARIES = libsdcdb.la
+libsdcdb_la_LDFLAGS = $(all_libraries)
+libsdcdb_la_SOURCES = sdcdb.cpp sdcdb_debug.cpp
+#>- all: all-am
+#>+ 1
+all: docs-am all-am
+
+.SUFFIXES:
+.SUFFIXES: .cpp .lo .o .obj
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+#>- @for dep in $?; do \
+#>- case '$(am__configure_deps)' in \
+#>- *$$dep*) \
+#>- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+#>- && exit 0; \
+#>- exit 1;; \
+#>- esac; \
+#>- done; \
+#>- echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/progs/sdcdb/base/Makefile'; \
+#>- cd $(top_srcdir) && \
+#>- $(AUTOMAKE) --gnu src/progs/sdcdb/base/Makefile
+#>+ 12
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/progs/sdcdb/base/Makefile'; \
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --gnu src/progs/sdcdb/base/Makefile
+ cd $(top_srcdir) && perl admin/am_edit src/progs/sdcdb/base/Makefile.in
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+clean-noinstLTLIBRARIES:
+ -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
+ @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \
+ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+ test "$$dir" != "$$p" || dir=.; \
+ echo "rm -f \"$${dir}/so_locations\""; \
+ rm -f "$${dir}/so_locations"; \
+ done
+libsdcdb.la: $(libsdcdb_la_OBJECTS) $(libsdcdb_la_DEPENDENCIES)
+ $(CXXLINK) $(libsdcdb_la_LDFLAGS) $(libsdcdb_la_OBJECTS) $(libsdcdb_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+include ./$(DEPDIR)/sdcdb.Plo
+include ./$(DEPDIR)/sdcdb_debug.Plo
+
+.cpp.o:
+ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+# source='$<' object='$@' libtool=no \
+# DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) \
+# $(CXXCOMPILE) -c -o $@ $<
+
+.cpp.obj:
+ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
+ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+# source='$<' object='$@' libtool=no \
+# DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) \
+# $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cpp.lo:
+ if $(LTCXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+# source='$<' object='$@' libtool=yes \
+# DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) \
+# $(LTCXXCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+distclean-libtool:
+ -rm -f libtool
+uninstall-info-am:
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$tags $$unique; \
+ fi
+ctags: CTAGS
+CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ test -z "$(CTAGS_ARGS)$$tags$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$tags $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && cd $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+ list='$(DISTFILES)'; for file in $$list; do \
+ case $$file in \
+ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+ esac; \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+ dir="/$$dir"; \
+ $(mkdir_p) "$(distdir)$$dir"; \
+ else \
+ dir=''; \
+ fi; \
+ if test -d $$d/$$file; then \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ fi; \
+ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+ else \
+ test -f $(distdir)/$$file \
+ || cp -p $$d/$$file $(distdir)/$$file \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile $(LTLIBRARIES)
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+#>- clean: clean-am
+#>+ 1
+clean: kde-rpo-clean clean-am
+
+#>- clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \
+#>- mostlyclean-am
+#>+ 2
+clean-am: clean-metasources clean-bcheck clean-final clean-generic clean-libtool clean-noinstLTLIBRARIES \
+ mostlyclean-am
+
+distclean: distclean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-libtool distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-exec-am:
+
+install-info: install-info-am
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-info-am
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+ clean-libtool clean-noinstLTLIBRARIES ctags distclean \
+ distclean-compile distclean-generic distclean-libtool \
+ distclean-tags distdir dvi dvi-am html html-am info info-am \
+ install install-am install-data install-data-am install-exec \
+ install-exec-am install-info install-info-am install-man \
+ install-strip installcheck installcheck-am installdirs \
+ maintainer-clean maintainer-clean-generic mostlyclean \
+ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+ pdf pdf-am ps ps-am tags uninstall uninstall-am \
+ uninstall-info-am
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
+
+#>+ 3
+sdcdb_debug.moc.cpp: $(srcdir)/sdcdb_debug.h
+ $(MOC) $(srcdir)/sdcdb_debug.h -o sdcdb_debug.moc.cpp
+
+#>+ 2
+mocs: sdcdb_debug.moc.cpp
+
+#>+ 3
+clean-metasources:
+ -rm -f sdcdb_debug.moc.cpp
+
+#>+ 2
+KDE_DIST=base.pro Makefile.in sdcdb_debug.h Makefile.am
+
+#>+ 2
+docs-am:
+
+#>+ 15
+force-reedit:
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/progs/sdcdb/base/Makefile'; \
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --gnu src/progs/sdcdb/base/Makefile
+ cd $(top_srcdir) && perl admin/am_edit src/progs/sdcdb/base/Makefile.in
+
+
+#>+ 21
+clean-bcheck:
+ rm -f *.bchecktest.cc *.bchecktest.cc.class a.out
+
+bcheck: bcheck-am
+
+bcheck-am:
+ @for i in ; do \
+ if test $(srcdir)/$$i -nt $$i.bchecktest.cc; then \
+ echo "int main() {return 0;}" > $$i.bchecktest.cc ; \
+ echo "#include \"$$i\"" >> $$i.bchecktest.cc ; \
+ echo "$$i"; \
+ if ! $(CXXCOMPILE) --dump-class-hierarchy -c $$i.bchecktest.cc; then \
+ rm -f $$i.bchecktest.cc; exit 1; \
+ fi ; \
+ echo "" >> $$i.bchecktest.cc.class; \
+ perl $(top_srcdir)/admin/bcheck.pl $$i.bchecktest.cc.class || { rm -f $$i.bchecktest.cc; exit 1; }; \
+ rm -f a.out; \
+ fi ; \
+ done
+
+
+#>+ 11
+libsdcdb_la.all_cpp.cpp: $(srcdir)/Makefile.in sdcdb.cpp $(srcdir)/sdcdb_debug.cpp sdcdb_debug.moc.cpp
+ @echo 'creating libsdcdb_la.all_cpp.cpp ...'; \
+ rm -f libsdcdb_la.all_cpp.files libsdcdb_la.all_cpp.final; \
+ echo "#define KDE_USE_FINAL 1" >> libsdcdb_la.all_cpp.final; \
+ for file in sdcdb.cpp sdcdb_debug.cpp sdcdb_debug.moc.cpp ; do \
+ echo "#include \"$$file\"" >> libsdcdb_la.all_cpp.files; \
+ test ! -f $(srcdir)/$$file || egrep '^#pragma +implementation' $(srcdir)/$$file >> libsdcdb_la.all_cpp.final; \
+ done; \
+ cat libsdcdb_la.all_cpp.final libsdcdb_la.all_cpp.files > libsdcdb_la.all_cpp.cpp; \
+ rm -f libsdcdb_la.all_cpp.final libsdcdb_la.all_cpp.files
+
+#>+ 3
+clean-final:
+ -rm -f libsdcdb_la.all_cpp.cpp
+
+#>+ 3
+final:
+ $(MAKE) libsdcdb_la_OBJECTS="$(libsdcdb_la_final_OBJECTS)" all-am
+
+#>+ 3
+final-install:
+ $(MAKE) libsdcdb_la_OBJECTS="$(libsdcdb_la_final_OBJECTS)" install-am
+
+#>+ 3
+no-final:
+ $(MAKE) libsdcdb_la_OBJECTS="$(libsdcdb_la_nofinal_OBJECTS)" all-am
+
+#>+ 3
+no-final-install:
+ $(MAKE) libsdcdb_la_OBJECTS="$(libsdcdb_la_nofinal_OBJECTS)" install-am
+
+#>+ 3
+kde-rpo-clean:
+ -rm -f *.rpo
+
+#>+ 3
+nmcheck:
+nmcheck-am: nmcheck
diff --git a/src/progs/sdcdb/base/Makefile.am b/src/progs/sdcdb/base/Makefile.am
new file mode 100644
index 0000000..4ceb14f
--- /dev/null
+++ b/src/progs/sdcdb/base/Makefile.am
@@ -0,0 +1,6 @@
+INCLUDES = -I$(top_srcdir)/src $(all_includes)
+METASOURCES = AUTO
+
+noinst_LTLIBRARIES = libsdcdb.la
+libsdcdb_la_LDFLAGS = $(all_libraries)
+libsdcdb_la_SOURCES = sdcdb.cpp sdcdb_debug.cpp
diff --git a/src/progs/sdcdb/base/base.pro b/src/progs/sdcdb/base/base.pro
new file mode 100644
index 0000000..c01db02
--- /dev/null
+++ b/src/progs/sdcdb/base/base.pro
@@ -0,0 +1,6 @@
+STOPDIR = ../../../..
+include($${STOPDIR}/lib.pro)
+
+TARGET = sdcdb
+HEADERS += sdcdb.h sdcdb_debug.h
+SOURCES += sdcdb.cpp sdcdb_debug.cpp
diff --git a/src/progs/sdcdb/base/sdcdb_debug.cpp b/src/progs/sdcdb/base/sdcdb_debug.cpp
new file mode 100644
index 0000000..fcccf22
--- /dev/null
+++ b/src/progs/sdcdb/base/sdcdb_debug.cpp
@@ -0,0 +1,281 @@
+/***************************************************************************
+ * Copyright (C) 2006 Nicolas Hadacek <hadacek@kde.org> *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ ***************************************************************************/
+#include "gpsim_debug.h"
+
+#include <signal.h>
+#include <qregexp.h>
+
+#include "devices/list/device_list.h"
+#include "devices/pic/pic/pic_debug.h"
+#include "devices/pic/base/pic_register.h"
+#include "coff/base/coff.h"
+
+//----------------------------------------------------------------------------
+GPSim::Debugger::Debugger(Programmer &programmer)
+ : ::Debugger::PicBase(programmer), _nbBreakpoints(0)
+{}
+
+bool GPSim::Debugger::internalInit()
+{
+ if ( !hardware()->execute("processor pic" + device()->name().lower(), true) ) return false;
+ if ( _inputType==PURL::Cod ) return hardware()->execute("load s " + _filename, true);
+ Q_ASSERT( _inputType==PURL::Hex );
+ return hardware()->execute("load h " + _filename, true);
+}
+
+bool GPSim::Debugger::internalRun()
+{
+ return hardware()->execute("run", false);
+}
+
+bool GPSim::Debugger::hardHalt()
+{
+ log(Log::Warning, i18n("Failed to halt target: kill process."));
+ _programmer.disconnectHardware();
+ return true;
+}
+
+bool GPSim::Debugger::softHalt(bool &success)
+{
+ success = hardware()->signal(SIGINT, true);
+ return true;
+}
+
+bool GPSim::Debugger::internalStep()
+{
+ return hardware()->execute("step", true);
+}
+
+bool GPSim::Debugger::setBreakpoints(const QValueList<Address> &list)
+{
+ for (uint i=0; i<_nbBreakpoints; i++)
+ if ( !hardware()->execute("clear " + QString::number(i), true) ) return false;
+ for (uint i=0; i<uint(list.count()); i++)
+ if ( !hardware()->execute("break e 0x" + toHex(list[i], nbChars(list[i].toUInt())), true) ) return false;
+ _nbBreakpoints = list.count();
+ return true;
+}
+
+bool GPSim::Debugger::internalReset()
+{
+ if ( _programmer.state()==::Programmer::Running && !halt() ) return false;
+ return hardware()->execute("reset", true);
+}
+
+bool GPSim::Debugger::updateState()
+{
+ if ( hardware()->isReady() ) _programmer.setState(::Programmer::Halted);
+ else _programmer.setState(::Programmer::Running);
+ return true;
+}
+
+bool GPSim::Debugger::findRegExp(const QStringList &lines, const QString &pattern,
+ const QString &label, QString &value) const
+{
+ QRegExp rexp(pattern);
+ uint i = 0;
+ for (; i<uint(lines.count()); i++) {
+ int offset = 0;
+ for (;;) {
+ offset = rexp.search(lines[i], offset, QRegExp::CaretAtOffset);
+ if ( offset==-1 || rexp.cap(1)==label ) break;
+ offset += rexp.cap(0).length();
+ }
+ if ( offset!=-1 ) break;
+ }
+ if ( i==uint(lines.count()) ) return false;
+ value = rexp.cap(2);
+ return true;
+}
+
+bool GPSim::Debugger::readWreg(BitValue &value)
+{
+ // #### only known for version 4 and 11
+ if ( hardware()->version()<=VersionData(0, 21, 7) || hardware()->version()>=VersionData(0, 22, 0) )
+ return getRegister("W", value);
+ QStringList lines;
+ if ( !hardware()->execute("dump s", true, &lines) ) return false;
+ QString s;
+ if ( !findRegExp(lines, "^\\s*[0-9A-Fa-f]+\\s+(\\w+)\\s*=\\s*([0-9A-Fa-f]+)", "W", s) ) {
+ log(Log::Error, i18n("Error reading register \"W\""));
+ return false;
+ }
+ value = fromHex(s, 0);
+ return true;
+}
+
+bool GPSim::Debugger::getRegister(const QString &name, BitValue &value)
+{
+ QStringList lines;
+ QRegExp r;
+ if ( hardware()->version()<VersionData(0, 22, 0) ) {
+ if ( !hardware()->execute("x " + name, true, &lines) ) return false;
+ r.setPattern("\\w+\\s*[][\\w]+\\s*=\\s*(?:0x|)([0-9A-Fa-f]+)(?:\\W.*|)");
+ } else {
+ if ( !hardware()->execute(name, true, &lines) ) return false;
+ r.setPattern("[^=]*=\\s*(?:0x|\\$)([0-9A-Fa-f]+)(?:\\W.*|)");
+ }
+ uint i = 0;
+ for (; i<uint(lines.count()); i++)
+ if ( r.exactMatch(lines[i]) ) break;
+ if ( i==uint(lines.count()) ) {
+ log(Log::Error, i18n("Error reading register \"%1\"").arg(name));
+ return false;
+ }
+ value = fromHex(r.cap(1), 0);
+ return true;
+}
+
+bool GPSim::Debugger::getRegister(Address address, BitValue &value)
+{
+ const Pic::RegistersData &rdata = device()->registersData();
+ QString name = toHex(address, rdata.nbCharsAddress());
+ if ( hardware()->version()<VersionData(0, 22, 0) ) return getRegister("0x" + name, value);
+ return getRegister(QString("ramData[$%1]").arg(name), value);
+}
+
+bool GPSim::Debugger::readRegister(const Register::TypeData &data, BitValue &value)
+{
+ if ( data.type()==Register::Special ) {
+ if ( data.name()=="WREG" ) return readWreg(value);
+ if ( data.name()=="PC" ) return getRegister("pc", value);
+ Q_ASSERT(false);
+ return true;
+ }
+ QString name = device()->registersData().sfrNames[data.address()];
+ if ( name=="WREG" ) return readWreg(value);
+ if ( !name.isEmpty() ) return getRegister(name.lower(), value);
+ return getRegister(data.address(), value);
+}
+
+bool GPSim::Debugger::setRegister(const QString &name, BitValue value)
+{
+ if ( hardware()->version()<VersionData(0, 22, 0) ) {
+ log(Log::Warning, i18n("Writing registers is not supported by this version of gpsim"));
+ return true;
+ }
+ const Pic::RegistersData &rdata = device()->registersData();
+ QString s = QString("%1 = %2").arg(name).arg(toHexLabel(value, rdata.nbChars()));
+ return hardware()->execute(s, true);
+}
+
+bool GPSim::Debugger::setRegister(Address address, BitValue value)
+{
+ const Pic::RegistersData &rdata = device()->registersData();
+ QString s = QString("ramData[$%1]").arg(toHex(address, rdata.nbCharsAddress()));
+ return setRegister(s, value);
+}
+
+bool GPSim::Debugger::writeRegister(const Register::TypeData &data, BitValue value)
+{
+ if ( data.type()==Register::Special ) {
+ if ( data.name()=="WREG" ) return writeWreg(value);
+ if ( data.name()=="PC" ) {
+ log(Log::Warning, i18n("Writing PC is not supported by gpsim"));
+ return true;
+ }
+ Q_ASSERT(false);
+ return false;
+ }
+ const Pic::RegistersData &rdata = device()->registersData();
+ QString name = rdata.sfrNames[data.address()];
+ if ( !name.isEmpty() ) return setRegister(name.lower(), value);
+ return setRegister(data.address(), value);
+}
+
+bool GPSim::Debugger::writeWreg(BitValue value)
+{
+ return setRegister("W", value);
+}
+
+bool GPSim::Debugger::updatePortStatus(uint index, QMap<uint, Device::PortBitData> &bits)
+{
+ for (uint i=0; i<Device::MAX_NB_PORT_BITS; i++) {
+ if ( !device()->registersData().hasPortBit(index, i) ) continue;
+ QString name = device()->registersData().portName(index).lower() + QString::number(i);
+ QStringList lines;
+ if ( !hardware()->execute("symbol " + name, true, &lines) ) return false;
+ QString pattern = "^(\\w+)=([^\\s])+\\s*", value;
+ if ( !findRegExp(lines, pattern, "bitState", value) || value.length()!=1 ) {
+ log(Log::Error, i18n("Error reading state of IO bit: %1").arg(name));
+ return false;
+ }
+ switch (value[0].latin1()) {
+ case 'H':
+ case '1': bits[i].state = Device::High; break;
+ case 'L':
+ case '0': bits[i].state = Device::Low; break;
+ case 'W': bits[i].state = Device::WeakPullUp; break;
+ case 'w': bits[i].state = Device::WeakPullDown; break;
+ case 'Z': bits[i].state = Device::HighImpedance; break;
+ case 'X': bits[i].state = Device::Unknown; break;
+ default:
+ bits[i].state = Device::Unknown;
+ log(Log::Warning, i18n("Unknown state for IO bit: %1 (%2)").arg(name).arg(value));
+ break;
+ }
+ if ( !findRegExp(lines, pattern, "Driving", value) || value.length()!=1 ) {
+ log(Log::Error, i18n("Error reading driving state of IO bit: %1").arg(name));
+ return false;
+ }
+ bits[i].driving = ( value[0]=='1' );
+ if (bits[i].driving) {
+ if ( !findRegExp(lines, pattern, "drivingState", value) || value.length()!=1 ) {
+ log(Log::Error, i18n("Error reading driving state of IO bit: %1").arg(name));
+ return false;
+ }
+ bits[i].drivingState = (value[0]=='0' ? Device::IoLow : Device::IoHigh);
+ bits[i].drivenState = Device::IoUnknown;
+ } else {
+ if ( !findRegExp(lines, pattern, "drivenState", value) || value.length()!=1 ) {
+ log(Log::Error, i18n("Error reading driven state of IO bit: %1").arg(name));
+ return false;
+ }
+ bits[i].drivenState = (value[0]=='0' ? Device::IoLow : Device::IoHigh);
+ bits[i].drivingState = Device::IoUnknown;
+ }
+ }
+ return true;
+}
+
+//----------------------------------------------------------------------------
+QString GPSim::Group::statusLabel() const
+{
+ return i18n("GPSim (4MHz)"); // #### FIXME: add config
+}
+
+void GPSim::Group::initSupported()
+{
+ ProcessManager manager(0);
+ if ( !manager.start() ) return;
+ VersionData version;
+ if ( !manager.getVersion(version) ) return;
+ bool oldGpsim = ( version<VersionData(0, 21, 11) );
+ if ( !manager.sendCommand("processor list", true) ) return;
+ QStringList devices = QStringList::split(" ", manager.process().sout().join(" "));
+ for (uint i=0; i<uint(devices.count()); i++) {
+ QString s = devices[i].upper();
+ if ( s.startsWith("PIC") ) s = s.mid(3);
+ const Pic::Data *data = static_cast<const Pic::Data *>(Device::lister().data(s));
+ if (data) {
+ if ( data->architecture()==Pic::Architecture::P18F && oldGpsim ) continue;
+ addDevice(data->name(), data, ::Group::Tested);
+ }
+ }
+}
+
+Programmer::Hardware *GPSim::Group::createHardware(::Programmer::Base &base, const ::Programmer::HardwareDescription &) const
+{
+ return new Hardware(base);
+}
+
+Programmer::DeviceSpecific *GPSim::Group::createDeviceSpecific(::Programmer::Base &base) const
+{
+ return new DeviceSpecific(base);
+}
diff --git a/src/progs/sdcdb/base/sdcdb_debug.h b/src/progs/sdcdb/base/sdcdb_debug.h
new file mode 100644
index 0000000..55cda75
--- /dev/null
+++ b/src/progs/sdcdb/base/sdcdb_debug.h
@@ -0,0 +1,95 @@
+/***************************************************************************
+ * Copyright (C) 2007 Nicolas Hadacek <hadacek@kde.org> *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ ***************************************************************************/
+#ifndef SDCDB_DEBUG_H
+#define SDCDB_DEBUG_H
+
+#include "sdcdb.h"
+#include "devices/pic/pic/pic_prog.h"
+#include "devices/pic/pic/pic_debug.h"
+
+namespace SDCDB
+{
+//-----------------------------------------------------------------------------
+class Programmer : public ::Programmer::PicBase
+{
+Q_OBJECT
+public:
+ Programmer(const ::Programmer::Group &group, const Pic::Data *data)
+ : Programmer::PicBase(group, data, "sdcdb_programmer") {}
+
+private:
+ virtual VersionData minVersion() const { return VersionData(0, 8, 0); }
+ virtual bool verifyDeviceId() { return true; }
+ virtual bool checkErase() { return false; }
+ virtual bool internalErase(const Device::MemoryRange &) { return false; }
+ virtual bool checkRead() { return false; }
+ virtual bool internalRead(Device::Memory &, const Device::MemoryRange &) { return false; }
+ virtual bool checkProgram(const Device::Memory &) { return false; }
+ virtual bool internalProgram(const Device::Memory &, const Device::MemoryRange &) { return false; }
+ virtual bool checkVerify() { return false; }
+ virtual bool internalVerify(const Device::Memory &, const Device::MemoryRange &, ::Programmer::VerifyActions) { return false; }
+};
+
+//-----------------------------------------------------------------------------
+class Debugger : public ::Debugger::PicBase
+{
+public:
+ Debugger(Programmer &programmer);
+ virtual bool setBreakpoints(const QValueList<Address> &list);
+ virtual bool readRegister(const Register::TypeData &data, BitValue &value);
+ virtual bool writeRegister(const Register::TypeData &data, BitValue value);
+ virtual bool updatePortStatus(uint index, QMap<uint, Device::PortBitData> &bits);
+
+private:
+ uint _nbBreakpoints;
+
+ bool findRegExp(const QStringList &lines, const QString &pattern,
+ const QString &label, QString &value) const;
+ bool getRegister(const QString &name, BitValue &value);
+ bool setRegister(const QString &name, BitValue value);
+ bool getRegister(Address address, BitValue &value);
+ bool setRegister(Address address, BitValue value);
+ Hardware *hardware() { return static_cast<Hardware *>(_programmer.hardware()); }
+ const Pic::Data *device() const { return static_cast<const Pic::Data *>(_programmer.device()); }
+ virtual bool internalInit();
+ virtual bool updateState();
+ virtual bool internalRun();
+ virtual bool internalStep();
+ virtual bool softHalt(bool &success);
+ virtual bool hardHalt();
+ virtual bool internalReset();
+ bool readWreg(BitValue &value);
+ bool writeWreg(BitValue value);
+};
+
+//-----------------------------------------------------------------------------
+class Group : public ::Programmer::PicGroup
+{
+public:
+ virtual QString name() const { return "sdcdb"; }
+ virtual QString label() const { return i18n("SDCDB"); }
+ virtual QString statusLabel() const;
+ virtual ::Programmer::Properties properties() const { return ::Programmer::Debugger | ::Programmer::HasConnectedState; }
+ virtual ::Programmer::TargetPowerMode targetPowerMode() const { return ::Programmer::TargetSelfPowered; }
+ virtual bool isPortSupported(Port::Type) const { return false; }
+ virtual uint maxNbBreakpoints(const Device::Data *) const { return 100; }
+ virtual bool isInputFileTypeSupported(PURL::FileType type) const { return ( type==PURL::Cod || type==PURL::Hex ); }
+
+protected:
+ virtual void initSupported();
+ virtual ::Programmer::Base *createBase(const Device::Data *data) const { return new Programmer(*this, static_cast<const Pic::Data *>(data)); }
+ virtual ::Programmer::Hardware *createHardware(::Programmer::Base &base, const ::Programmer::HardwareDescription &hd) const;
+ virtual ::Programmer::DeviceSpecific *createDeviceSpecific(::Programmer::Base &base) const;
+ virtual ::Debugger::Base *createDebuggerBase(::Programmer::Base &base) const { return new Debugger(static_cast<Programmer &>(base)); }
+ virtual ::Debugger::Specific *createDebuggerSpecific(::Debugger::Base &) const { return 0; }
+};
+
+} // namespace
+
+#endif