--- /dev/null
+DongHee Yang <donghee.yang@samsung.com>
+Taejun Ha <taejun.ha@samsung.com>
+Jiil Hyoun <jiil.hyoun@samsung.com>
+Donghyuk Yang <donghyuk.yang@samsung.com>
+HyunGoo Kang <hyungoo1.kang@samsung.com>
--- /dev/null
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
--- /dev/null
+Copyright (c) 2013 Samsung Electronics Co., Ltd. All rights reserved.
+Except as noted, this software is licensed under Apache License, Version 2.
+Please, see the LICENSE.APLv2 file for Apache License terms and conditions.
--- /dev/null
+#!/bin/sh -e
+
+CURDIR=`pwd`
+SOURCE_TAR_DIR=${CURDIR}/sources
+GDB_SOURCE_TAR_FILE=${SOURCE_TAR_DIR}/gdb-linaro-7.5-2012.12-1.tar.bz2
+GDB_SOURCE_DIR=${CURDIR}/gdb-linaro-7.5-2012.12-1
+if [ "$1" ] ; then
+PREFIX_DIR=$1
+else
+PREFIX_DIR=${CURDIR}/install-arm-linux
+fi
+DEPENDENT_PKGS="quilt libncurses5-dev libexpat1-dev libreadline-dev"
+CI=
+CE=
+CX=
+CN=
+
+color_setting()
+{
+# tput setting when 0 and 1 file descriptor is set and tput exist
+ TPUT="`which tput`"
+ if [ -t 0 -a -t 1 -a -n "$TPUT" ]
+ then
+ CI="`$TPUT setf 6 || true`"
+ CE="`$TPUT setf 4 || true`"
+ CX="`$TPUT setf 2 || true`"
+ CN="`$TPUT sgr0 || true`"
+ fi
+}
+
+log()
+{
+ echo "$CI $@ $CN"
+}
+
+color_setting
+
+
+# checking dependency package
+log "[Checking ${DEPENDENT_PKGS}]"
+for pkg in ${DEPENDENT_PKGS}
+do
+ dpkg -s ${pkg} > /dev/null
+ if [ "x$?" = "x0" ]
+ then
+ log "[checking ${pkg}.. ok]"
+ else
+ log "[checking ${pkg}.. failed]"
+ exit 1
+ fi
+done
+
+# clean directories
+log "[remove prefix, build dir]"
+rm -rf ${PREFIX_DIR}
+
+# extract/patch GCC
+log "[Extracting GDB source]"
+rm -rf ${GDB_SOURCE_DIR}
+tar xf ${GDB_SOURCE_TAR_FILE}
+if [ -d ${GDB_SOURCE_DIR} ]
+then
+ log "[checking gdb source.. ok]"
+else
+ log "[error: there is not gdb source]"
+ exit 1
+fi
+
+# Configure/Build/Install GDB
+log "[Configuring GDB...]"
+cd ${GDB_SOURCE_DIR}
+# patch for process-attach-debugging
+# patch -p1 < ../patches/pie.patch
+mkdir tmp_build
+cd tmp_build
+CFLAGS="-g -O2" CXXFLAGS="-g -O2 -g -Wall -O2" ../configure \
+ --prefix=${PREFIX_DIR} \
+ --disable-maintainer-mode \
+ --disable-dependency-tracking \
+ --disable-silent-rules \
+ --disable-gdbtk \
+ --disable-shared \
+ --with-system-readline \
+ --target=arm-linux-gnueabi \
+ --with-expat \
+ --without-python
+
+log "[Building GDB...]"
+make -j4
+log "[Installing GDB...]"
+make install
+cd ${CURDIR}
+
+# Configure/Build/Install GDB-SERVER
+log "[Configuring GDB SERVER...]"
+cd ${GDB_SOURCE_DIR}/gdb/gdbserver
+mkdir tmp_build
+cd tmp_build
+CC=arm-linux-gnueabi-gcc CFLAGS="--sysroot=${SYSROOT_DIR}" CPPFLAGS="-I${SYSROOT_DIR}/usr/include" ../configure \
+ --prefix=${PREFIX_DIR} \
+ --host=arm-linux-gnueabi \
+ --target=arm-linux-gnueabi
+
+log "[Building GDB SERVER...]"
+make -j4
+log "[Installing GDB SERVER...]"
+make install
+cd ${CURDIR}
--- /dev/null
+#!/bin/sh -e
+
+CURDIR=`pwd`
+SOURCE_TAR_DIR=${CURDIR}/sources
+GDB_SOURCE_TAR_FILE=${SOURCE_TAR_DIR}/gdb-linaro-7.5-2012.12-1.tar.bz2
+GDB_SOURCE_DIR=${CURDIR}/gdb-linaro-7.5-2012.12-1
+if [ "$1" ] ; then
+PREFIX_DIR=$1
+else
+PREFIX_DIR=${CURDIR}/install-arm-macos
+fi
+DEPENDENT_PKGS="quilt libncurses5-dev libexpat1-dev libreadline-dev"
+CI=
+CE=
+CX=
+CN=
+
+color_setting()
+{
+# tput setting when 0 and 1 file descriptor is set and tput exist
+ TPUT="`which tput`"
+ if [ -t 0 -a -t 1 -a -n "$TPUT" ]
+ then
+ CI="`$TPUT setf 6 || true`"
+ CE="`$TPUT setf 4 || true`"
+ CX="`$TPUT setf 2 || true`"
+ CN="`$TPUT sgr0 || true`"
+ fi
+}
+
+log()
+{
+ echo "$CI $@ $CN"
+}
+
+color_setting
+
+# clean directories
+log "[remove prefix, build dir]"
+rm -rf ${PREFIX_DIR}
+
+# extract/patch GCC
+log "[Extracting GDB source]"
+rm -rf ${GDB_SOURCE_DIR}
+tar xf ${GDB_SOURCE_TAR_FILE}
+if [ -d ${GDB_SOURCE_DIR} ]
+then
+ log "[checking gdb source.. ok]"
+else
+ log "[error: there is not gdb source]"
+ exit 1
+fi
+
+# Configure/Build/Install GDB
+log "[Configuring GDB...]"
+cd ${GDB_SOURCE_DIR}
+# patch for process-attach-debugging
+# patch -p1 < ../patches/pie.patch
+mkdir tmp_build
+cd tmp_build
+CC="gcc -mmacosx-version-min=10.4" CXX="g++ -mmacosx-version-min=10.4" CFLAGS="-g -O2" CXXFLAGS="-g -O2 -Wall" ../configure \
+ --prefix=${PREFIX_DIR} \
+ --disable-maintainer-mode \
+ --disable-dependency-tracking \
+ --disable-silent-rules \
+ --disable-gdbtk \
+ --disable-shared \
+ --target=arm-linux-gnueabi \
+ --with-expat \
+ --without-python
+
+log "[Building GDB...]"
+make -j4
+log "[Installing GDB...]"
+make install
+cd ${CURDIR}
+
+# Configure/Build/Install GDB-SERVER
+log "[Configuring GDB SERVER...]"
+cd ${GDB_SOURCE_DIR}/gdb/gdbserver
+mkdir tmp_build
+cd tmp_build
+CC=arm-linux-gnueabi-gcc CFLAGS="--sysroot=${SYSROOT_DIR}" CPPFLAGS="-I${SYSROOT_DIR}/usr/include" ../configure \
+ --prefix=${PREFIX_DIR} \
+ --host=arm-linux-gnueabi \
+ --target=arm-linux-gnueabi
+
+log "[Building GDB SERVER...]"
+make -j4
+log "[Installing GDB SERVER...]"
+make install
+cd ${CURDIR}
--- /dev/null
+#!/bin/sh -e
+
+CURDIR=`pwd`
+SOURCE_TAR_DIR=${CURDIR}/sources
+GDB_SOURCE_TAR_FILE=${SOURCE_TAR_DIR}/gdb-linaro-7.5-2012.12-1.tar.bz2
+GDB_SOURCE_DIR=${CURDIR}/gdb-linaro-7.5-2012.12-1
+if [ "$1" ] ; then
+PREFIX_DIR=$1
+else
+PREFIX_DIR=${CURDIR}/install-arm-windows
+fi
+DEPENDENT_PKGS="quilt libncurses5-dev libexpat1-dev libreadline-dev mingw32"
+#DEPENDENT_PKGS="quilt libncurses5-dev libexpat1-dev libreadline-dev mingw-w64-dev"
+CI=
+CE=
+CX=
+CN=
+
+color_setting()
+{
+# tput setting when 0 and 1 file descriptor is set and tput exist
+ TPUT="`which tput`"
+ if [ -t 0 -a -t 1 -a -n "$TPUT" ]
+ then
+ CI="`$TPUT setf 6 || true`"
+ CE="`$TPUT setf 4 || true`"
+ CX="`$TPUT setf 2 || true`"
+ CN="`$TPUT sgr0 || true`"
+ fi
+}
+
+log()
+{
+ echo "$CI $@ $CN"
+}
+
+color_setting
+
+
+# checking dependency package
+log "[Checking ${DEPENDENT_PKGS}]"
+for pkg in ${DEPENDENT_PKGS}
+do
+ dpkg -s ${pkg} > /dev/null
+ if [ "x$?" = "x0" ]
+ then
+ log "[checking ${pkg}.. ok]"
+ else
+ log "[checking ${pkg}.. failed]"
+ exit 1
+ fi
+done
+
+
+# clean directories
+log "[remove prefix, build dir]"
+rm -rf ${PREFIX_DIR}
+
+# extract/patch GDB
+log "[Extracting GDB source]"
+rm -rf ${GDB_SOURCE_DIR}
+tar xf ${GDB_SOURCE_TAR_FILE}
+if [ -d ${GDB_SOURCE_DIR} ]
+then
+ log "[checking gdb source.. ok]"
+else
+ log "[error: there is not gdb source]"
+ exit 1
+fi
+
+# Configure/Build/Install GDB
+log "[Configuring GDB...]"
+cd ${GDB_SOURCE_DIR}
+# patch for process-attach-debugging
+# patch -p1 < ../patches/pie.patch
+mkdir tmp_build
+cd tmp_build
+CFLAGS="-g -O2" CXXFLAGS="-g -O2 -g -Wall -O2" ../configure \
+ LDFLAGS="-static" \
+ --prefix=${PREFIX_DIR} \
+ --disable-maintainer-mode \
+ --disable-dependency-tracking \
+ --disable-silent-rules \
+ --disable-gdbtk \
+ --disable-shared \
+ --build=i686-linux-gnu \
+ --host=i586-mingw32msvc \
+ --target=arm-linux-gnueabi \
+ --with-expat \
+ --without-python
+
+log "[Building GDB...]"
+make -j4
+log "[Installing GDB...]"
+make install
+cd ${CURDIR}
+
+# Configure/Build/Install GDB-SERVER
+log "[Configuring GDB SERVER...]"
+cd ${GDB_SOURCE_DIR}/gdb/gdbserver
+mkdir tmp_build
+cd tmp_build
+CC=arm-linux-gnueabi-gcc CFLAGS="--sysroot=${SYSROOT_DIR}" CPPFLAGS="-I${SYSROOT_DIR}/usr/include" ../configure \
+ --prefix=${PREFIX_DIR} \
+ --host=arm-linux-gnueabi \
+ --target=arm-linux-gnueabi
+
+log "[Building GDB SERVER...]"
+make -j4
+log "[Installing GDB SERVER...]"
+make install
+cd ${CURDIR}
--- /dev/null
+#!/bin/sh -e
+
+CURDIR=`pwd`
+SOURCE_TAR_DIR=${CURDIR}/sources
+GDB_SOURCE_TAR_FILE=${SOURCE_TAR_DIR}/gdb-linaro-7.5-2012.12-1.tar.bz2
+GDB_SOURCE_DIR=${CURDIR}/gdb-linaro-7.5-2012.12-1
+if [ "$1" ] ; then
+PREFIX_DIR=$1
+else
+PREFIX_DIR=${CURDIR}/install-i386-linux
+fi
+DEPENDENT_PKGS="quilt libncurses5-dev libexpat1-dev libreadline-dev"
+CI=
+CE=
+CX=
+CN=
+
+color_setting()
+{
+# tput setting when 0 and 1 file descriptor is set and tput exist
+ TPUT="`which tput`"
+ if [ -t 0 -a -t 1 -a -n "$TPUT" ]
+ then
+ CI="`$TPUT setf 6 || true`"
+ CE="`$TPUT setf 4 || true`"
+ CX="`$TPUT setf 2 || true`"
+ CN="`$TPUT sgr0 || true`"
+ fi
+}
+
+log()
+{
+ echo "$CI $@ $CN"
+}
+
+color_setting
+
+
+# checking dependency package
+log "[Checking ${DEPENDENT_PKGS}]"
+for pkg in ${DEPENDENT_PKGS}
+do
+ dpkg -s ${pkg} > /dev/null
+ if [ "x$?" = "x0" ]
+ then
+ log "[checking ${pkg}.. ok]"
+ else
+ log "[checking ${pkg}.. failed]"
+ exit 1
+ fi
+done
+
+
+# clean directories
+log "[remove prefix, build dir]"
+rm -rf ${PREFIX_DIR}
+
+# extract/patch GCC
+log "[Extracting GDB source]"
+rm -rf ${GDB_SOURCE_DIR}
+tar xf ${GDB_SOURCE_TAR_FILE}
+if [ -d ${GDB_SOURCE_DIR} ]
+then
+ log "[checking gdb source.. ok]"
+else
+ log "[error: there is not gdb source]"
+ exit 1
+fi
+
+# Configure/Build/Install GDB
+log "[Configuring GDB...]"
+cd ${GDB_SOURCE_DIR}
+# patch for process-attach-debugging
+# patch -p1 < ../patches/pie.patch
+mkdir tmp_build
+cd tmp_build
+CFLAGS="-g -O2" CXXFLAGS="-g -O2 -g -Wall -O2" ../configure \
+ --prefix=${PREFIX_DIR} \
+ --disable-maintainer-mode \
+ --disable-dependency-tracking \
+ --disable-silent-rules \
+ --disable-gdbtk \
+ --disable-shared \
+ --with-system-readline \
+ --target=i386-linux-gnueabi \
+ --with-expat \
+ --without-python
+
+log "[Building GDB...]"
+make -j4
+log "[Installing GDB...]"
+make install
+cd ${CURDIR}
+
+# Configure/Build/Install GDB-SERVER
+log "[Configuring GDB SERVER...]"
+cd ${GDB_SOURCE_DIR}/gdb/gdbserver
+mkdir tmp_build
+cd tmp_build
+CC=i386-linux-gnueabi-gcc CFLAGS="--sysroot=${SYSROOT_DIR}" CPPFLAGS="-I${SYSROOT_DIR}/usr/include" ../configure \
+ --prefix=${PREFIX_DIR} \
+ --host=i386-linux-gnueabi \
+ --target=i386-linux-gnueabi
+
+log "[Building GDB SERVER...]"
+make -j4
+log "[Installing GDB SERVER...]"
+make install
+cd ${CURDIR}
--- /dev/null
+#!/bin/sh -e
+
+CURDIR=`pwd`
+SOURCE_TAR_DIR=${CURDIR}/sources
+GDB_SOURCE_TAR_FILE=${SOURCE_TAR_DIR}/gdb-linaro-7.5-2012.12-1.tar.bz2
+GDB_SOURCE_DIR=${CURDIR}/gdb-linaro-7.5-2012.12-1
+if [ "$1" ] ; then
+PREFIX_DIR=$1
+else
+PREFIX_DIR=${CURDIR}/install-i386-macos
+fi
+DEPENDENT_PKGS="quilt libncurses5-dev libexpat1-dev libreadline-dev"
+CI=
+CE=
+CX=
+CN=
+
+color_setting()
+{
+# tput setting when 0 and 1 file descriptor is set and tput exist
+ TPUT="`which tput`"
+ if [ -t 0 -a -t 1 -a -n "$TPUT" ]
+ then
+ CI="`$TPUT setf 6 || true`"
+ CE="`$TPUT setf 4 || true`"
+ CX="`$TPUT setf 2 || true`"
+ CN="`$TPUT sgr0 || true`"
+ fi
+}
+
+log()
+{
+ echo "$CI $@ $CN"
+}
+
+color_setting
+
+# clean directories
+log "[remove prefix, build dir]"
+rm -rf ${PREFIX_DIR}
+
+# extract/patch GCC
+log "[Extracting GDB source]"
+rm -rf ${GDB_SOURCE_DIR}
+tar xf ${GDB_SOURCE_TAR_FILE}
+if [ -d ${GDB_SOURCE_DIR} ]
+then
+ log "[checking gdb source.. ok]"
+else
+ log "[error: there is not gdb source]"
+ exit 1
+fi
+
+# Configure/Build/Install GDB
+log "[Configuring GDB...]"
+cd ${GDB_SOURCE_DIR}
+# patch for process-attach-debugging
+# patch -p1 < ../patches/pie.patch
+mkdir tmp_build
+cd tmp_build
+CC="gcc -mmacosx-version-min=10.4" CXX="g++ -mmacosx-version-min=10.4" CFLAGS="-g -O2" CXXFLAGS="-g -O2 -Wall" ../configure \
+ --prefix=${PREFIX_DIR} \
+ --disable-maintainer-mode \
+ --disable-dependency-tracking \
+ --disable-silent-rules \
+ --disable-gdbtk \
+ --disable-shared \
+ --target=i386-linux-gnueabi \
+ --with-expat \
+ --without-python
+
+log "[Building GDB...]"
+make -j4
+log "[Installing GDB...]"
+make install
+cd ${CURDIR}
+
+# Configure/Build/Install GDB-SERVER
+log "[Configuring GDB SERVER...]"
+cd ${GDB_SOURCE_DIR}/gdb/gdbserver
+mkdir tmp_build
+cd tmp_build
+CC=i386-linux-gnueabi-gcc CFLAGS="--sysroot=${SYSROOT_DIR}" CPPFLAGS="-I${SYSROOT_DIR}/usr/include" ../configure \
+ --prefix=${PREFIX_DIR} \
+ --host=i386-linux-gnueabi \
+ --target=i386-linux-gnueabi
+
+log "[Building GDB SERVER...]"
+make -j4
+log "[Installing GDB SERVER...]"
+make install
+cd ${CURDIR}
--- /dev/null
+#!/bin/sh -e
+
+CURDIR=`pwd`
+SOURCE_TAR_DIR=${CURDIR}/sources
+GDB_SOURCE_TAR_FILE=${SOURCE_TAR_DIR}/gdb-linaro-7.5-2012.12-1.tar.bz2
+GDB_SOURCE_DIR=${CURDIR}/gdb-linaro-7.5-2012.12-1
+if [ "$1" ] ; then
+PREFIX_DIR=$1
+else
+PREFIX_DIR=${CURDIR}/install-i386-windows
+fi
+DEPENDENT_PKGS="quilt libncurses5-dev libexpat1-dev libreadline-dev mingw32"
+CI=
+CE=
+CX=
+CN=
+
+color_setting()
+{
+# tput setting when 0 and 1 file descriptor is set and tput exist
+ TPUT="`which tput`"
+ if [ -t 0 -a -t 1 -a -n "$TPUT" ]
+ then
+ CI="`$TPUT setf 6 || true`"
+ CE="`$TPUT setf 4 || true`"
+ CX="`$TPUT setf 2 || true`"
+ CN="`$TPUT sgr0 || true`"
+ fi
+}
+
+log()
+{
+ echo "$CI $@ $CN"
+}
+
+color_setting
+
+
+# checking dependency package
+log "[Checking ${DEPENDENT_PKGS}]"
+for pkg in ${DEPENDENT_PKGS}
+do
+ dpkg -s ${pkg} > /dev/null
+ if [ "x$?" = "x0" ]
+ then
+ log "[checking ${pkg}.. ok]"
+ else
+ log "[checking ${pkg}.. failed]"
+ exit 1
+ fi
+done
+
+
+# clean directories
+log "[remove prefix, build dir]"
+rm -rf ${PREFIX_DIR}
+
+# extract/patch GDB
+log "[Extracting GDB source]"
+rm -rf ${GDB_SOURCE_DIR}
+tar xf ${GDB_SOURCE_TAR_FILE}
+if [ -d ${GDB_SOURCE_DIR} ]
+then
+ log "[checking gdb source.. ok]"
+else
+ log "[error: there is not gdb source]"
+ exit 1
+fi
+
+# Configure/Build/Install GDB
+log "[Configuring GDB...]"
+cd ${GDB_SOURCE_DIR}
+# patch for process-attach-debugging
+# patch -p1 < ../patches/pie.patch
+mkdir tmp_build
+cd tmp_build
+CFLAGS="-g -O2" CXXFLAGS="-g -O2 -g -Wall -O2" ../configure \
+ LDFLAGS="-static" \
+ --prefix=${PREFIX_DIR} \
+ --disable-maintainer-mode \
+ --disable-dependency-tracking \
+ --disable-silent-rules \
+ --disable-gdbtk \
+ --disable-shared \
+ --build=i686-linux-gnu \
+ --host=i586-mingw32msvc \
+ --target=i386-linux-gnueabi \
+ --with-expat \
+ --without-python
+
+log "[Building GDB...]"
+make -j4
+log "[Installing GDB...]"
+make install
+cd ${CURDIR}
+
+# Configure/Build/Install GDB-SERVER
+log "[Configuring GDB SERVER...]"
+cd ${GDB_SOURCE_DIR}/gdb/gdbserver
+mkdir tmp_build
+cd tmp_build
+CC=i386-linux-gnueabi-gcc CFLAGS="--sysroot=${SYSROOT_DIR}" CPPFLAGS="-I${SYSROOT_DIR}/usr/include" ../configure \
+ --prefix=${PREFIX_DIR} \
+ --host=i386-linux-gnueabi \
+ --target=i386-linux-gnueabi
+
+log "[Building GDB SERVER...]"
+make -j4
+log "[Installing GDB SERVER...]"
+make install
+cd ${CURDIR}
--- /dev/null
+#!/bin/sh -xe
+
+# clean
+clean()
+{
+ rm -rf $SRCDIR/*.zip
+ rm -rf $SRCDIR/*.tar.bz2
+ rm -rf $SRCDIR/*.tar.gz
+ rm -rf $SRCDIR/sources
+ rm -rf $SRCDIR/package/*package.*
+ rm -rf $SRCDIR/gdb-linaro-7.5-2012.12-1
+}
+
+
+# build
+build()
+{
+ # prepare source files
+ SOURCE_TAR_DIR=${SRCDIR}/sources
+ mkdir ${SOURCE_TAR_DIR}
+ cp $ROOTDIR/gdb-linaro-7.5-2012.12-1.tar.bz2 $SOURCE_TAR_DIR/
+
+ ORG_PATH=$PATH
+ # build
+ export SYSROOT_DIR=${ROOTDIR}/platforms/tizen2.0/rootstraps/tizen-device-2.0.devel
+ export PATH=${ROOTDIR}/tools/arm-linux-gnueabi-gcc-4.5/bin:$ORG_PATH
+ ./build-armel-${TARGET_OS_CATEGORY}.sh
+ export SYSROOT_DIR=${ROOTDIR}/platforms/tizen2.0/rootstraps/tizen-emulator-2.0.devel
+ export PATH=${ROOTDIR}/tools/i386-linux-gnueabi-gcc-4.5/bin:$ORG_PATH
+ ./build-i386-${TARGET_OS_CATEGORY}.sh
+}
+
+# install
+install()
+{
+ platform_ver="tizen2.1"
+ arch_list="
+ arm
+ i386
+ "
+
+ for arch in ${arch_list}
+ do
+ # Common parameter
+ INSTALL_DIR=$SRCDIR/package/cross-${arch}-gdb-7.5.package.${TARGET_OS}
+
+ # Parameter for Build system
+ FOR_BUILDSYSTEM_DIR=${INSTALL_DIR}/data/tools
+
+ # Parameter for IDE
+ FOR_IDE_DIR=${INSTALL_DIR}/data/platforms/${platform_ver}/on-demand/gdbserver
+
+ # Common parameter
+ TARGET_DIR=${FOR_BUILDSYSTEM_DIR}/${arch}-linux-gnueabi-gdb-7.5
+
+ # Install scripts for build system
+ mkdir -p $FOR_BUILDSYSTEM_DIR
+ mv $SRCDIR/install-${arch}-${TARGET_OS_CATEGORY} $TARGET_DIR
+
+ # Install scripts for IDE
+ mkdir -p $FOR_IDE_DIR
+ cp $TARGET_DIR/bin/${arch}-linux-gnueabi-gdbserver $FOR_IDE_DIR/gdbserver
+ case ${arch} in
+ arm)
+ architecture=armel
+ ;;
+ *)
+ architecture=${arch}
+ ;;
+ esac
+ cd ${FOR_IDE_DIR}/..
+ tar -cf ${FOR_IDE_DIR}/../gdbserver_7.5.0_${architecture}.tar gdbserver
+ rm -rf ${FOR_IDE_DIR}
+ done
+}
--- /dev/null
+#!/bin/sh -xe
+
+# clean
+clean()
+{
+ rm -rf $SRCDIR/*.zip
+ rm -rf $SRCDIR/*.tar.bz2
+ rm -rf $SRCDIR/*.tar.gz
+ rm -rf $SRCDIR/sources
+ rm -rf $SRCDIR/package/*package.*
+ rm -rf $SRCDIR/gdb-linaro-7.5-2012.12-1
+}
+
+
+# build
+build()
+{
+ # prepare source files
+ SOURCE_TAR_DIR=${SRCDIR}/sources
+ mkdir ${SOURCE_TAR_DIR}
+ cp $ROOTDIR/gdb-linaro-7.5-2012.12-1.tar.bz2 $SOURCE_TAR_DIR/
+
+ ORG_PATH=$PATH
+ # build
+ export SYSROOT_DIR=${ROOTDIR}/platforms/tizen2.0/rootstraps/tizen-device-2.0.devel
+ export PATH=${ROOTDIR}/tools/arm-linux-gnueabi-gcc-4.5/bin:$ORG_PATH
+ ./build-armel-${TARGET_OS_CATEGORY}.sh
+ export SYSROOT_DIR=${ROOTDIR}/platforms/tizen2.0/rootstraps/tizen-emulator-2.0.devel
+ export PATH=${ROOTDIR}/tools/i386-linux-gnueabi-gcc-4.5/bin:$ORG_PATH
+ ./build-i386-${TARGET_OS_CATEGORY}.sh
+}
+
+# install
+install()
+{
+ platform_ver="tizen2.1"
+ arch_list="
+ arm
+ i386
+ "
+
+ for arch in ${arch_list}
+ do
+ # Common parameter
+ INSTALL_DIR=$SRCDIR/package/cross-${arch}-gdb-7.5.package.${TARGET_OS}
+
+ # Parameter for Build system
+ FOR_BUILDSYSTEM_DIR=${INSTALL_DIR}/data/tools
+
+ # Parameter for IDE
+ FOR_IDE_DIR=${INSTALL_DIR}/data/platforms/${platform_ver}/on-demand/gdbserver
+
+ # Common parameter
+ TARGET_DIR=${FOR_BUILDSYSTEM_DIR}/${arch}-linux-gnueabi-gdb-7.5
+
+ # Install scripts for build system
+ mkdir -p $FOR_BUILDSYSTEM_DIR
+ mv $SRCDIR/install-${arch}-${TARGET_OS_CATEGORY} $TARGET_DIR
+
+ # Install scripts for IDE
+ mkdir -p $FOR_IDE_DIR
+ cp $TARGET_DIR/bin/${arch}-linux-gnueabi-gdbserver $FOR_IDE_DIR/gdbserver
+ case ${arch} in
+ arm)
+ architecture=armel
+ ;;
+ *)
+ architecture=${arch}
+ ;;
+ esac
+ cd ${FOR_IDE_DIR}/..
+ tar -cf ${FOR_IDE_DIR}/../gdbserver_7.5.0_${architecture}.tar gdbserver
+ rm -rf ${FOR_IDE_DIR}
+ done
+}
--- /dev/null
+* 2.1.1
+- Applied "--with-expat" option for windows
+== donghee yang <donghee.yang@samsung.com> 2013-03-22
+* 2.1.0
+- Changed version from tizen2.0 to tizen2.1
+== donghyuk yang <donghyuk.yang@samsung.com> 2013-03-16
+* 1.1.0
+- Added "Conflicts" against GDB 7.2
+== donghee yang <donghee.yang@samsung.com> 2013-03-12
+* 1.0.2
+- Canceled applying process-attach debugging patch
+== donghee yang <donghee.yang@samsung.com> 2013-03-04
+* 1.0.1
+- Applied the patch for process-attach-debuggin
+== donghee yang <donghee.yang@samsung.com> 2013-02-25
+* 1.0.0
+- Initial commit
+== donghee yang <donghee.yang@samsung.com> 2013-02-25
--- /dev/null
+Source : gdb-7.5
+Version : 2.1.1
+Maintainer : Taejun Ha <taejun.ha@samsung.com>, Jiil Hyoun <jiil.hyoun@samsung.com>, Donghyuk Yang <donghyuk.yang@samsung.com>, Donghee Yang<donghee.yang@samsung.com>
+
+Package : cross-arm-gdb-7.5
+OS : ubuntu-32
+Build-host-os: ubuntu-32
+Build-dependency : cross-arm-gcc-4.5 [ubuntu-32], rs-device-2.0.devel [ubuntu-32]
+Source-dependency : gdb-linaro-7.5-2012.12-1.tar.bz2
+Conflicts : cross-arm-gdb-7.2
+Description : GNU debug tool 7.5 for Tizen SDK
+
+Package : cross-arm-gdb-7.5
+OS : windows-32, windows-64
+Build-host-os: ubuntu-32
+Build-dependency : cross-arm-gcc-4.5 [ubuntu-32], rs-device-2.0.devel [ubuntu-32]
+Source-dependency : gdb-linaro-7.5-2012.12-1.tar.bz2
+Conflicts : cross-arm-gdb-7.2
+Description : GNU debug tool 7.5 for Tizen SDK
+
+Package : cross-arm-gdb-7.5
+OS : macos-64
+Build-host-os: macos-64
+Build-dependency : cross-arm-gcc-4.5 [macos-64], rs-device-2.0.devel [ubuntu-32]
+Source-dependency : gdb-linaro-7.5-2012.12-1.tar.bz2
+Conflicts : cross-arm-gdb-7.2
+Description : GNU debug tool 7.5 for Tizen SDK
+
+Package : cross-arm-gdb-7.5
+OS : ubuntu-64
+Build-host-os: ubuntu-64
+Build-dependency : cross-arm-gcc-4.5 [ubuntu-64], rs-device-2.0.devel [ubuntu-32]
+Source-dependency : gdb-linaro-7.5-2012.12-1.tar.bz2
+Conflicts : cross-arm-gdb-7.2
+Description : GNU debug tool 7.5 for Tizen SDK
+
+Package : cross-i386-gdb-7.5
+OS : ubuntu-32
+Build-host-os: ubuntu-32
+Build-dependency : cross-i386-gcc-4.5 [ubuntu-32], rs-emulator-2.0.devel [ubuntu-32]
+Source-dependency : gdb-linaro-7.5-2012.12-1.tar.bz2
+Conflicts : cross-i386-gdb-7.2
+Description : GNU debug tool 7.5 for Tizen SDK
+
+Package : cross-i386-gdb-7.5
+OS : windows-32, windows-64
+Build-host-os: ubuntu-32
+Build-dependency : cross-i386-gcc-4.5 [ubuntu-32], rs-emulator-2.0.devel [ubuntu-32]
+Source-dependency : gdb-linaro-7.5-2012.12-1.tar.bz2
+Conflicts : cross-i386-gdb-7.2
+Description : GNU debug tool 7.5 for Tizen SDK
+
+Package : cross-i386-gdb-7.5
+OS : macos-64
+Build-host-os: macos-64
+Build-dependency : cross-i386-gcc-4.5 [macos-64], rs-emulator-2.0.devel [ubuntu-32]
+Source-dependency : gdb-linaro-7.5-2012.12-1.tar.bz2
+Conflicts : cross-i386-gdb-7.2
+Description : GNU debug tool 7.5 for Tizen SDK
+
+Package : cross-i386-gdb-7.5
+OS : ubuntu-64
+Build-host-os: ubuntu-64
+Build-dependency : cross-i386-gcc-4.5 [ubuntu-64], rs-emulator-2.0.devel [ubuntu-32]
+Source-dependency : gdb-linaro-7.5-2012.12-1.tar.bz2
+Conflicts : cross-i386-gdb-7.2
+Description : GNU debug tool 7.5 for Tizen SDK
--- /dev/null
+Tom
+
+2012-09-17 Tom Tromey <tromey@redhat.com>
+
+ PR gdb/13987:
+ * jit.c (jit_breakpoint_re_set_internal): Always re-create jit
+ breakpoint.
+ * breakpoint.c (internal_bkpt_re_set): Delete jit event
+ breakpoint.
+
+2012-09-17 Tom Tromey <tromey@redhat.com>
+
+ * gdb.base/jit.exp (compile_jit_test): New proc.
+ Add PIE tests.
+
+diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
+index b841bcd..4bf63ed 100644
+--- a/gdb/breakpoint.c
++++ b/gdb/breakpoint.c
+@@ -13017,12 +13017,14 @@ internal_bkpt_re_set (struct breakpoint *b)
+ {
+ switch (b->type)
+ {
+- /* Delete overlay event and longjmp master breakpoints; they
+- will be reset later by breakpoint_re_set. */
++ /* Delete overlay event, jit event and longjmp master
++ breakpoints; they will be reset later by
++ breakpoint_re_set. */
+ case bp_overlay_event:
+ case bp_longjmp_master:
+ case bp_std_terminate_master:
+ case bp_exception_master:
++ case bp_jit_event:
+ delete_breakpoint (b);
+ break;
+
+diff --git a/gdb/jit.c b/gdb/jit.c
+index 9e8f295..7c77780 100644
+--- a/gdb/jit.c
++++ b/gdb/jit.c
+@@ -967,35 +967,42 @@ jit_breakpoint_re_set_internal (struct gdbarch *gdbarch,
+ struct objfile *objf;
+ struct jit_objfile_data *objf_data;
+
+- if (inf_data->objfile != NULL)
+- return 0;
+-
+- /* Lookup the registration symbol. If it is missing, then we assume
+- we are not attached to a JIT. */
+- reg_symbol = lookup_minimal_symbol_and_objfile (jit_break_name, &objf);
+- if (reg_symbol == NULL || SYMBOL_VALUE_ADDRESS (reg_symbol) == 0)
+- return 1;
++ if (inf_data->objfile == NULL)
++ {
++ /* Lookup the registration symbol. If it is missing, then we
++ assume we are not attached to a JIT. */
++ reg_symbol = lookup_minimal_symbol_and_objfile (jit_break_name, &objf);
++ if (reg_symbol == NULL || SYMBOL_VALUE_ADDRESS (reg_symbol) == 0)
++ return 1;
+
+- desc_symbol = lookup_minimal_symbol (jit_descriptor_name, NULL, objf);
+- if (desc_symbol == NULL || SYMBOL_VALUE_ADDRESS (desc_symbol) == 0)
+- return 1;
++ desc_symbol = lookup_minimal_symbol (jit_descriptor_name, NULL, objf);
++ if (desc_symbol == NULL || SYMBOL_VALUE_ADDRESS (desc_symbol) == 0)
++ return 1;
+
+- objf_data = get_jit_objfile_data (objf);
+- objf_data->register_code = reg_symbol;
+- objf_data->descriptor = desc_symbol;
++ objf_data = get_jit_objfile_data (objf);
++ objf_data->register_code = reg_symbol;
++ objf_data->descriptor = desc_symbol;
+
+- inf_data->objfile = objf;
++ inf_data->objfile = objf;
+
+- jit_inferior_init (gdbarch);
++ jit_inferior_init (gdbarch);
++ }
++ else
++ objf_data = get_jit_objfile_data (inf_data->objfile);
+
+ if (jit_debug)
+- fprintf_unfiltered (gdb_stdlog,
+- "jit_breakpoint_re_set_internal, "
+- "breakpoint_addr = %s\n",
+- paddress (gdbarch, SYMBOL_VALUE_ADDRESS (reg_symbol)));
++ {
++ CORE_ADDR addr = SYMBOL_VALUE_ADDRESS (objf_data->descriptor);
++
++ fprintf_unfiltered (gdb_stdlog,
++ "jit_breakpoint_re_set_internal, "
++ "breakpoint_addr = %s\n",
++ paddress (gdbarch, addr));
++ }
+
+ /* Put a breakpoint in the registration symbol. */
+- create_jit_event_breakpoint (gdbarch, SYMBOL_VALUE_ADDRESS (reg_symbol));
++ create_jit_event_breakpoint (gdbarch,
++ SYMBOL_VALUE_ADDRESS (objf_data->register_code));
+
+ return 0;
+ }
+diff --git a/gdb/testsuite/gdb.base/jit.exp b/gdb/testsuite/gdb.base/jit.exp
+index 3034e6a..9fbc01a 100644
+--- a/gdb/testsuite/gdb.base/jit.exp
++++ b/gdb/testsuite/gdb.base/jit.exp
+@@ -28,28 +28,38 @@ if {[get_compiler_info]} {
+ # test running programs
+ #
+
+-set testfile jit-main
+-set srcfile ${testfile}.c
+-set binfile ${objdir}/${subdir}/${testfile}
+-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
+- untested jit.exp
+- return -1
+-}
++proc compile_jit_test {testname options} {
++ global testfile srcfile binfile srcdir subdir
++ global solib_testfile solib_srcfile solib_binfile solib_binfile_test_msg
++ global solib_binfile_target
++
++ set testfile jit-main
++ set srcfile ${testfile}.c
++ set binfile [standard_output_file $testfile]
++ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
++ executable [concat debug $options]] != "" } {
++ untested $testname
++ return -1
++ }
+
+-set solib_testfile "jit-solib"
+-set solib_srcfile "${srcdir}/${subdir}/${solib_testfile}.c"
+-set solib_binfile "${objdir}/${subdir}/${solib_testfile}.so"
+-set solib_binfile_test_msg "SHLIBDIR/${solib_testfile}.so"
++ set solib_testfile "jit-solib"
++ set solib_srcfile "${srcdir}/${subdir}/${solib_testfile}.c"
++ set solib_binfile [standard_output_file ${solib_testfile}.so]
++ set solib_binfile_test_msg "SHLIBDIR/${solib_testfile}.so"
++
++ # Note: compiling without debug info: the library goes through
++ # symbol renaming by munging on its symbol table, and that
++ # wouldn't work for .debug sections. Also, output for "info
++ # function" changes when debug info is resent.
++ if { [gdb_compile_shlib ${solib_srcfile} ${solib_binfile} {-fPIC}] != "" } {
++ untested $testname
++ return -1
++ }
+
+-# Note: compiling without debug info: the library goes through symbol
+-# renaming by munging on its symbol table, and that wouldn't work for .debug
+-# sections. Also, output for "info function" changes when debug info is resent.
+-if { [gdb_compile_shlib ${solib_srcfile} ${solib_binfile} {-fPIC}] != "" } {
+- untested jit.exp
+- return -1
+-}
++ set solib_binfile_target [gdb_download ${solib_binfile}]
+
+-set solib_binfile_target [gdb_download ${solib_binfile}]
++ return 0
++}
+
+ proc one_jit_test {count match_str} { with_test_prefix "one_jit_test-$count" {
+ global verbose testfile solib_binfile_target solib_binfile_test_msg
+@@ -93,5 +103,17 @@ proc one_jit_test {count match_str} { with_test_prefix "one_jit_test-$count" {
+ "All functions matching regular expression \"jit_function\":"
+ }}
+
++if {[compile_jit_test jit.exp {}] < 0} {
++ return
++}
+ one_jit_test 1 "${hex} jit_function_0000"
+ one_jit_test 2 "${hex} jit_function_0000\[\r\n\]+${hex} jit_function_0001"
++
++with_test_prefix PIE {
++ if {[compile_jit_test "jit.exp PIE tests" \
++ {additional_flags=-fPIE ldflags=-pie}] < 0} {
++ return
++ }
++
++ one_jit_test 1 "${hex} jit_function_0000"
++}
+