12-09-2019 07:07 AM
Hey guys,
is there any way to start a linux agent TCF debug session over XSCT? For standalone applications you can easily run the launch scripts that are automatically generated. For linux agent connection I cannot find any hint unfortunately.
Best regards
Marc
12-10-2019 06:45 AM
Hi @mve.recalm
Does not SDK log print any XSDB script to connect to TCF server, when launched through the GUI?
Regards
12-12-2019 02:16 AM
Hi @ibaie ,
unfortunately there is no output at all in the SDK output and I also cannot find any XSDB script. The outputs are just generated using a standalone debug configuration but not with the linux agent debug option.
Best regards
Marc
12-12-2019 03:15 AM
Hi @mve.recalm
I was just testing it on my side and talking with the developers and I can confirm that this features is no implemented in the tool. So basically the only way to debug through Linux TCF agent is using the GUI in SDK.
Regards
12-19-2019 03:14 PM
XSDB (or XSCT) does support debugging through Linux TCF agent. For example:
xsdb% connect -host my-linux-host -port 1534
tcfchan#1
xsdb% process start -stop-at-entry /bin/ls
{} {Name /bin/ls CanTerminate 1 Attached 1 StdInID VS15 StdOutID VS16 StdErrID VS17 ID P10443}
xsdb% Info: P10443.10443 (target 8) Stopped at 0x7f92b9f68090 (Suspended)
xsdb% ta
1 P10443
2 P10443.10443 (Suspended)
xsdb% ta 2
xsdb% bt
0 0x7f92b9f68090 _start()
xsdb%
I'm not sure if "process" command is documented, but you can look into Tcl source code of the function in <XSDK dir>/scripts/xsct/xsdb.tcl.
In general, all TCF agent functionality is available in XSDB, it is just matter of finding or writing right Tcl script.
01-09-2020 09:41 AM
Dear @eugenet
thank you very much for this interesting post. Besides this: is it also possible to start a linux application over the command line within a running QEMU session by this? I am able to connect from XSCT to QEMU and read the targets, but unfortunately i get an error when I am trying to download the .elf file.
gdbremote connect localhost:9000 target 3 dow hello_world.elf
results in "invalid argument" error. When using the connect -host localhost -port 1534 command I get no feedback at all and QEMU session hangs.
Best regards
Marc
01-09-2020 11:06 AM
If you connect to QEMU with gdbremote command, it starts a "bare-metal" debug session.
A Linux application will not work on bare-metal, it will crash the emulation.
Such session can be used to download and debug Linux kernel, but not a Linux application.
You need to configure QEMU to boot Linux. Configure Linux to start networking and TCF Agent.
Then you can connect XSCT to TCF Agent using IP address of the emulated QEMU machine, and debug a Linux application same way as with real machine.
01-10-2020 01:35 AM
Dear @eugenet
thank you for your fast reply. Alright I understood that gdbremote does not work in that way. Is there any description on how to configure QEMU to connect over TCF? Does a simple static IP config work?
In additon I understand now that the "process start" command runs the linux application under certain constraints. But how can you transfer the application with xsct in the first place?
Best regards
Marc