Mirror of the lttng-dev mailing list
 help / color / mirror / Atom feed
* [lttng-dev] Debugging Libaries in Babeltrace 2
@ 2023-10-24 15:52 Seidl, Aron via lttng-dev
  2023-10-24 18:51 ` Simon Marchi via lttng-dev
  0 siblings, 1 reply; 6+ messages in thread
From: Seidl, Aron via lttng-dev @ 2023-10-24 15:52 UTC (permalink / raw)
  To: lttng-dev


[-- Attachment #1.1: Type: text/plain, Size: 2042 bytes --]

Hello guys,
I'm currently a student at the company Carl Zeiss in Oberkochen Germany. I'd like to trace the Kernel from our CMM-Controller with CTF and convert it to plain text, like Babeltrace 2 does. To understand how Babeltrace 2 works with CTF, I debug the code.

However when I try to step into a function which is included via the extern Babeltrace 2 library (e.g. bt_graph_run(ctx.graph) in graph.c), the GNU Compiler steps over the function and I'm unable to look into this function.

I figured, it is because the Debugger cannot find the Debug Symbols even though I compile everything with Debug-Symbols and no compiler optimization.
I configure the Makefile as follows:

BABELTRACE_DEV_MODE=1 BABELTRACE_MINIMAL_LOG_LEVEL=TRACE BABELTRACE_DEBUG_MODE=1 CFLAGS='-g -O0' CPPFLAGS='-g -O0' LDFLAGS='-g -O0' ./configure

For test purposes, I implemented the function bt_graph_run(NULL) inside a new project to check, if I could step into the function with my debugger, or whether it is a general problem with my machine.
That actually worked and I was able to step into the function, but not with the normal Babeltrace 2 project.
None of my colleagues could explain this behavior, so my question now is, how do you guys debug the code? Is there a different way you debug these functions, or do I configure my project the wrong way?

I appreciate it if someone can help me and tell me how to configure the project so that the code is debugable.

Sincerely,
Aron

__________
Aron Seidl
DH-Student IT Education

Carl Zeiss AG
Carl-Zeiss-Strasse 22
73447 Oberkochen, Deutschland

aron.seidl@zeiss.com<mailto:aron.seidl@zeiss.com>
www.zeiss.de<http://www.zeiss.de/>
__________
Carl Zeiss AG
Sitz der Gesellschaft: Oberkochen, Deutschland
Vorsitzender des Aufsichtsrates: Dr. Michael Bolle
Vorstand: Dr. Karl Lamprecht (Vorsitzender),
Susan-Stefanie Breitkopf, Sven Hermann, Dr. Christian Müller,
Andreas Pecher, Dr. Jochen Peter, Dr. Markus Weber
Amtsgericht Ulm, HRB 501 555, USt-IdNr: DE 811 119 940



[-- Attachment #1.2: Type: text/html, Size: 8890 bytes --]

[-- Attachment #2: Type: text/plain, Size: 156 bytes --]

_______________________________________________
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-10-26 10:22 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-24 15:52 [lttng-dev] Debugging Libaries in Babeltrace 2 Seidl, Aron via lttng-dev
2023-10-24 18:51 ` Simon Marchi via lttng-dev
2023-10-25  7:29   ` Seidl, Aron via lttng-dev
2023-10-25 14:50     ` Philippe Proulx via lttng-dev
2023-10-26 10:21       ` Seidl, Aron via lttng-dev
2023-10-25 15:31     ` Simon Marchi via lttng-dev

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox