User forums > Using Code::Blocks

Stepping through Ubuntu's gio command

(1/1)

spflanze:
In my Ubuntu 22.04 Jammy OS I need to step through the gio command's source code. I am doing this only to find out why it does not do what I expect. I am not interested in compiling its source code to make alterations. I would like to do this in Code::Blocks instead of doing this by using the gdb command line.

Here is the contents of my /etc/apt/sources.list file:


--- Code: ---deb http://archive.ubuntu.com/ubuntu jammy main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu jammy main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu jammy-updates main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu jammy-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu jammy-backports main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu jammy-security main restricted universe multiverse

--- End code ---

I downloaded the source code into my directory at "/home/stephen/Projects/debug_gio/src" by using the commands:


--- Code: ---sudo apt update
mkdir ~/Projects/debug_gio/src/
cd ~/Projects/debug_gio/src/
apt source glib2.0
--- End code ---

I can successfully start a gdb session by using the command:


--- Code: ---gdb -q --directory=/home/stephen/Projects/debug_gio/src --args /usr/bin/gio set "/home/stephen/Desktop/Flameshot.desktop" metadata::trusted yes
--- End code ---

How can Code::Blocks be setup to step through the code?


BlueHazzard:
And you can step trough it with gdb?

I would try to create a project with the source files, and then attach gdb to a running progess of gio...

Navigation

[0] Message Index

Go to full version