Date: Fri, 29 Mar 2024 11:51:29 +0100 (CET)
Message-ID: <329640581.111676.1711709489574@srvdoc.doc.ipesoft.com>
Subject: Exported From Confluence
MIME-Version: 1.0
Content-Type: multipart/related;
boundary="----=_Part_111675_1398810961.1711709489574"
------=_Part_111675_1398810961.1711709489574
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Content-Location: file:///C:/exported.html
Debugging of OEM protocols on Linux/RaspberryPI platforms
Debugging of OEM protocols on Linux/RaspberryPI platforms
- Disable the autostart of the KOM process (in the process configuration =
using CNF) and turn off the KOM process (using Sysconsole).
- Modify the Makefile for th=
e OEM protocol and add the "-g" flag to it so that the compiler includes de=
bugging information. Example: change from
CFLAGS=3D -I ../h
to
CFLAGS=3D-g -I ../h
=
em>
- Recompile the OEM protocol and copy the resulting library to the&=
nbsp;protdll directory:
cd=
/home/d2000/oem
rm template.o template.so
make<=
br>cp template.so /opt/d2000/protdll/oem_prot11.so
- In the directory where the source codes of the OEM protocol are, start =
the debugger and set the breakpoint to a specific line/lines in the OEM pro=
tocol (e.g. within the Init or=
ReadAllPoints procedure)
Confirm "y" that you want to activate the breakpoint when loading future s=
hared libraries.
cd /home/d2000/oem
gdb /opt/d2000/bin/kom
(gdb) break template.c:73
No symbol table is loaded. Use the "file" command.
Make breakpoint pending on future shared library load? (y or [n])&nb=
sp;y
- Start the KOM process (the /F0 paramete=
r is used to turn off the watchdog)
run /F0
- The debugger stops on the specified line of the OEM protocol source lin=
e:
[Switching to Thread 0x72f161a0 (LWP 3369)]
Thread 14=
"S204b" hit Breakpoint 1, ReadAllPoints (St=3D0x75847580)
at t=
emplate.c:73
73 template.c: Permission denied.
(gdb=
) bt
#0 ReadAllPoints (St=3D=
0x75847580) at template.c:73
#1 0x00eb00b0 in ?? ()
#2 0x006ae364 in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)=
- Continue debugging with the standard gdb debugger commands.
------=_Part_111675_1398810961.1711709489574--