summaryrefslogtreecommitdiffstats
path: root/template.d/gdb-on-target.ini.in
blob: 20c8d30eba30cc77e3885878894f0c04a6b0520a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# gdb-remote.init file for IDE
# Object: allow to use standard gdb to remote debug a target
# Usage: remote-target-populate update script under ./build directory
# Author: Fulup Ar Foll (IoT.bzh)
# Reference: https://blog.flameeyes.eu/2010/02/remote-debugging-with-gdb-part-2-gdb/
#
# Warning:
#  - on target start with $GDB ./target/gdb-cross-root@$TARGET.ini  
#  - Netbeans impose debug-command to point on a local instance of afb-daemon binary
#  - --ldpath should be absolute as solib-search-path refuse to work as documented

# xds-gdb annotation to point where it should 
# :XDS-ENV: XDS_PROJECT_ID=@XDS_PROJECT_ID@
# :XDS-ENV: XDS_SDK_ID=@XDS_SDK_ID@
# :XDS-ENV: XDS_SERVER_URL=@XDS_SERVER_URL@

# Start gdbserver on target and connect through SSH link WARNING:
target remote | ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null @RSYNC_TARGET@ gdbserver - \
       /usr/bin/afb-daemon --port=@AFB_REMPORT@ --workdir=@RSYNC_PREFIX@/@PROJECT_NAME@ --roothttp=htdocs --ldpaths=@RSYNC_PREFIX@/@PROJECT_NAME@/lib --verbose --token=@AFB_TOKEN@

# Disable auto answer no on questions and to set breakpoint
set confirm off

# Disable auto load of libraries to improved perf
set auto-solib-add off

# Define path for project libraries
set solib-search-path ${PROJECT_PKG_BUILD_DIR}

# Replace run by continue done by xds-gdb

# Manually load project libraries when loaded by afb-daemon
tbreak @GDB_INITIAL_BREAK@
commands
sharedlibrary @RSYNC_PREFIX@/@PROJECT_NAME@
continue
end
{ color: #cc0000; font-weight: bold } /* Comment.Preproc */ .highlight .cpf { color: #888888 } /* Comment.PreprocFile */ .highlight .c1 { color: #888888 } /* Comment.Single */ .highlight .cs { color: #cc0000; font-weight: bold; background-color: #fff0f0 } /* Comment.Special */ .highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */ .highlight .ge { font-style: italic } /* Generic.Emph */ .highlight .gr { color: #aa0000 } /* Generic.Error */ .highlight .gh { color: #333333 } /* Generic.Heading */ .highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */ .highlight .go { color: #888888 } /* Generic.Output */ .highlight .gp { color: #555555 } /* Generic.Prompt */ .highlight .gs { font-weight: bold } /* Generic.Strong */ .highlight .gu { color: #666666 } /* Generic.Subheading */ .highlight .gt { color: #aa0000 } /* Generic.Traceback */ .highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */ .highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */ .highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */ .highlight .kp { color: #008800 } /* Keyword.Pseudo */ .highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */ .highlight .kt { color: #888888; font-weight: bold } /* Keyword.Type */ .highlight .m { color: #0000DD; font-weight: bold } /* Literal.Number */ .highlight .s { color: #dd2200; background-color: #fff0f0 } /* Literal.String */ .highlight .na { color: #336699 } /* Name.Attribute */ .highlight .nb { color: #003388 } /* Name.Builtin */ .highlight .nc { color: #bb0066; font-weight: bold } /* Name.Class */ .highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ .highlight .nd { color: #555555 } /* Name.Decorator */ .highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */ .highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */ .highlight .nl { color: #336699; font-style: italic } /* Name.Label */ .highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */ .highlight .py { color: #336699; font-weight: bold } /* Name.Property */ .highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ }
<?xml version="1.0" encoding="UTF-8"?>
<configurationDescriptor version="97">
  <logicalFolder name="root" displayName="root" projectFiles="true" kind="ROOT">
    <df root="." name="0">
      <df name="src">
        <in>afbs-api.c</in>
        <in>alsa-api.c</in>
        <in>config.c</in>
        <in>dbus-api.c</in>
        <in>http-svc.c</in>
        <in>main.c</in>
        <in>radio-api.c</in>
        <in>rest-api.c</in>
        <in>session.c</in>
      </df>
    </df>
    <df root="." name="1">
    </df>
    <logicalFolder name="ExternalFiles"
                   displayName="Important Files"
                   projectFiles="false"
                   kind="IMPORTANT_FILES_FOLDER">
      <itemPath>CMakeLists.txt</itemPath>
      <itemPath>build/Makefile</itemPath>
      <itemPath>nbproject/private/launcher.properties</itemPath>
    </logicalFolder>
    <logicalFolder name="ExternalFiles"
                   displayName="Important Files"
                   projectFiles="false"
                   kind="IMPORTANT_FILES_FOLDER">
      <itemPath>CMakeLists.txt</itemPath>
      <itemPath>build/Makefile</itemPath>
      <itemPath>nbproject/private/launcher.properties</itemPath>
    </logicalFolder>
  </logicalFolder>
  <sourceFolderFilter>^(nbproject)$</sourceFolderFilter>
  <sourceRootList>
    <Elem>.</Elem>
    <Elem>.</Elem>
  </sourceRootList>
  <projectmakefile>build/Makefile</projectmakefile>
  <confs>
    <conf name="Default" type="0">
      <toolsSet>
        <compilerSet>default</compilerSet>
        <dependencyChecking>false</dependencyChecking>
        <rebuildPropChanged>false</rebuildPropChanged>
      </toolsSet>
      <flagsDictionary>
        <element flagsID="0" commonFlags="-fPIE"/>
        <element flagsID="1" commonFlags="-mtune=generic -march=x86-64 -fPIC"/>
        <element flagsID="2" commonFlags="-mtune=generic -march=x86-64 -fPIE"/>
      </flagsDictionary>
      <codeAssistance>
      </codeAssistance>
      <makefileType>
        <makeTool>
          <buildCommandWorkingDir>build</buildCommandWorkingDir>
          <buildCommand>${MAKE} -f Makefile</buildCommand>
          <cleanCommand>${MAKE} -f Makefile clean</cleanCommand>
          <executablePath>build/src/afb-daemon</executablePath>
        </makeTool>
        <preBuild>
          <preBuildCommandWorkingDir>build</preBuildCommandWorkingDir>
          <preBuildCommand>cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_COMPILER=${IDE_CC} -DCMAKE_CXX_COMPILER=${IDE_CXX} -DCMAKE_C_FLAGS_DEBUG="-g3 -gdwarf-2" -DCMAKE_CXX_FLAGS_DEBUG="-g3 -gdwarf-2" -DCMAKE_EXPORT_COMPILE_COMMANDS=ON ..</preBuildCommand>
          <preBuildFirst>true</preBuildFirst>
        </preBuild>
      </makefileType>
      <item path="plugins/audio/audio-api.c" ex="false" tool="0" flavor2="2">
        <cTool flags="1">
          <incDir>
            <pElem>plugins/audio</pElem>
            <pElem>/usr/include/json-c</pElem>
            <pElem>include</pElem>
            <pElem>/usr/include/uuid</pElem>
            <pElem>build/plugins</pElem>
          </incDir>
        </cTool>
      </item>
      <item path="plugins/samples/HelloWorld.c" ex="false" tool="0" flavor2="2">
        <cTool flags="1">
          <incDir>
            <pElem>plugins/samples</pElem>
            <pElem>/usr/include/json-c</pElem>
            <pElem>include</pElem>
            <pElem>/usr/include/uuid</pElem>
            <pElem>build/plugins</pElem>
          </incDir>
        </cTool>
      </item>
      <item path="plugins/session/token-api.c" ex="false" tool="0" flavor2="2">
        <cTool flags="1">
          <incDir>
            <pElem>plugins/session</pElem>
            <pElem>/usr/include/json-c</pElem>
            <pElem>include</pElem>
            <pElem>/usr/include/uuid</pElem>
            <pElem>build/plugins</pElem>
          </incDir>
        </cTool>
      </item>
      <item path="src/afbs-api.c" ex="false" tool="0" flavor2="2">
        <cTool flags="0">
          <incDir>
            <pElem>include</pElem>
            <pElem>/usr/include/json-c</pElem>
            <pElem>build/src</pElem>
          </incDir>
        </cTool>
      </item>
      <item path="src/alsa-api.c" ex="false" tool="0" flavor2="2">
        <cTool flags="0">
          <incDir>
            <pElem>include</pElem>
            <pElem>/usr/include/json-c</pElem>
            <pElem>build/src</pElem>
          </incDir>
        </cTool>
      </item>
      <item path="src/config.c" ex="false" tool="0" flavor2="2">
        <cTool flags="2">
          <incDir>
            <pElem>src</pElem>
            <pElem>/usr/include/json-c</pElem>
            <pElem>include</pElem>
            <pElem>/usr/include/uuid</pElem>
            <pElem>build/src</pElem>
          </incDir>
          <preprocessorList>
            <Elem>__PIC__=2</Elem>
            <Elem>__PIE__=2</Elem>
            <Elem>__REGISTER_PREFIX__=</Elem>
            <Elem>__USER_LABEL_PREFIX__=</Elem>
            <Elem>__pic__=2</Elem>
            <Elem>__pie__=2</Elem>
          </preprocessorList>
        </cTool>
      </item>
      <item path="src/dbus-api.c" ex="false" tool="0" flavor2="2">
        <cTool flags="0">
          <incDir>
            <pElem>include</pElem>
            <pElem>/usr/include/json-c</pElem>
            <pElem>build/src</pElem>
          </incDir>
        </cTool>
      </item>
      <item path="src/http-svc.c" ex="false" tool="0" flavor2="2">
        <cTool flags="1">
          <incDir>
            <pElem>src</pElem>
            <pElem>/usr/include/json-c</pElem>
            <pElem>include</pElem>
            <pElem>/usr/include/uuid</pElem>
            <pElem>build/src</pElem>
          </incDir>
        </cTool>
      </item>
      <item path="src/main.c" ex="false" tool="0" flavor2="2">
        <cTool flags="2">
          <incDir>
            <pElem>src</pElem>
            <pElem>/usr/include/json-c</pElem>
            <pElem>include</pElem>
            <pElem>/usr/include/uuid</pElem>
            <pElem>build/src</pElem>
          </incDir>
          <preprocessorList>
            <Elem>__PIC__=2</Elem>
            <Elem>__PIE__=2</Elem>
            <Elem>__REGISTER_PREFIX__=</Elem>
            <Elem>__USER_LABEL_PREFIX__=</Elem>
            <Elem>__pic__=2</Elem>
            <Elem>__pie__=2</Elem>
          </preprocessorList>
        </cTool>
      </item>
      <item path="src/radio-api.c" ex="false" tool="0" flavor2="2">
        <cTool flags="0">
          <incDir>
            <pElem>include</pElem>
            <pElem>/usr/include/json-c</pElem>
            <pElem>/usr/include/libusb-1.0</pElem>
            <pElem>build/src</pElem>
          </incDir>
          <preprocessorList>
            <Elem>WITH_RADIO_PLUGIN=1</Elem>
          </preprocessorList>
        </cTool>
      </item>
      <item path="src/rest-api.c" ex="false" tool="0" flavor2="2">
        <cTool flags="2">
          <incDir>
            <pElem>src</pElem>
            <pElem>/usr/include/json-c</pElem>
            <pElem>include</pElem>
            <pElem>/usr/include/uuid</pElem>
            <pElem>build/src</pElem>
          </incDir>
        </cTool>
      </item>
      <item path="src/session.c" ex="false" tool="0" flavor2="2">
        <cTool flags="2">
          <incDir>
            <pElem>src</pElem>
            <pElem>/usr/include/json-c</pElem>
            <pElem>/usr/include/uuid</pElem>
            <pElem>include</pElem>
            <pElem>build/src</pElem>
          </incDir>
          <preprocessorList>
            <Elem>__PIC__=2</Elem>
            <Elem>__PIE__=2</Elem>
            <Elem>__REGISTER_PREFIX__=</Elem>
            <Elem>__USER_LABEL_PREFIX__=</Elem>
            <Elem>__pic__=2</Elem>
            <Elem>__pie__=2</Elem>
          </preprocessorList>
        </cTool>
      </item>
    </conf>
  </confs>
</configurationDescriptor>