# Copyright (C) March 2023- Linaro Limited (or its affiliates). All rights reserved.

# Copyright (C) 1995-2023 Arm Limited (or its affiliates). All rights reserved.

# 
# 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 3 of the License, or
# (at your option) any later version.
# 
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
# 
                    README for GDB-INTEL release

This is GDB-INTEL, the GNU source-level debugger.

A summary of new features is in the file `NEWS-INTEL'.

Check the GDB-INTEL home page at 
http://software.intel.com/en-us/forums/intel-many-integrated-core/
for up to date release information, mailing list links and archives, etc.

The file PROBLEMS-INTEL contains information on problems identified
late in the release cycle.  GDB's bug tracking database at
http://software.intel.com/en-us/forums/intel-many-integrated-core/
contains a more complete list of bugs.


Unpacking and Installation -- Quick Overview
============================================

  The release is provided as a gzipped tar file called
'gdb-intel-mic-<MPSS_VERSION>.tgz'.

The GDB-INTEL is based on the GDB 7.5 base version and INTEL'S
MIC version.
See also the README for the description of the GDB base version.


More Documentation
==================

See the README for the description of the GDB base version.


Building GDB-INTEL from the Sources
====================================
 
Building the Native GDB-INTEL
-----------------------------

The tercap library is a prerequisite. It can be built and installed to
the sysroot via:

 export TOOLCHAIN=/usr/linux-k1om-4.7
 wget http://ftp.gnu.org/gnu/termcap/termcap-1.3.1.tar.gz
 tar xzvf termcap-1.3.1.tar.gz
 cd termcap-1.3.1
 ./configure --prefix=$TOOLCHAIN/linux-k1om/usr
 make CC=$TOOLCHAIN/bin/x86_64-k1om-linux-gcc
 sudo make install 

To build the native GDB-INTEL:

 export GDB_SRC=<source folder from the tarball extraction>
 export CROSS_COMPILE=$TOOLCHAIN/bin/x86_64-k1om-linux
 $GDB_SRC/configure --host=x86_64-k1om-linux --target=x86_64-k1om-linux CC=$CROSS_COMPILE-gcc AR=$CROSS_COMPILE-ar --disable-tui
 make 

Building GDB-INTEL for Remote Debugging
---------------------------------------

To build the GDB for the host:
 
 export TOOLCHAIN=/usr/linux-k1om-4.7
 export GDB_SRC=<source folder from the tarball extraction>
 $GDB_SRC/configure --disable-gdbserver --with-sysroot=$TOOLCHAIN/linux-k1om/ --enable-targets="x86_64-k1om-linux"
 make

To build the native gdbserver:

 $GDB_SRC/gdbserver/configure --host=x86_64-k1om-linux CC=$TOOLCHAIN/bin/x86_64-k1om-linux-gcc
 make

Remote Debugging
=================

For instructions on using remote debugging please see the MPSS
readme file.


Reporting Bugs in GDB-INTEL
===========================
 
  There are several ways of reporting bugs in GDB-INTEL.  
The preferred method is to use the World Wide Web:

http://software.intel.com/en-us/forums/intel-many-integrated-core/


GDB Test Suite
==============

See the README for the description of the GDB base version.
