Author Topic: Stepping through Ubuntu's gio command  (Read 2223 times)

Offline spflanze

  • Almost regular
  • **
  • Posts: 134
Stepping through Ubuntu's gio command
« on: April 09, 2023, 05:42:30 am »
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

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

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

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


« Last Edit: May 08, 2023, 01:22:31 am by spflanze »

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: Stepping through Ubuntu's gio command
« Reply #1 on: April 12, 2023, 09:51:32 pm »
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...