coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Noob question: mv is hard to debug with GDB


From: Mike Hodson
Subject: Re: Noob question: mv is hard to debug with GDB
Date: Mon, 26 Dec 2022 16:40:33 -0700

Hello Stéphane,

I suspect you are compiling the source for Coreutils against system
libraries. If so, you should also install the debug symbols or separate
library packages (depending on distro they can be provided somewhat
differently) for the packages you have installed, at least, for the
dependency tree of Coreutils, down to and inclusive of glibc itself.

Otherwise you would have to compile the entire dependency tree of
middleware all the way down to glibc yourself, ala linux-from-scratch
style, likely in a chroot or virtual machine.

Those are the only 2 ways I see it working, one being far easier :)

Hope this helps,

Mike


On Mon, Dec 26, 2022 at 4:12 PM Stéphane Archer <archerstephane@gmail.com>
wrote:

> Dear Coreutils community,
>
> I have a hard debugging the mv binary using GDB.
> I modify the Makefile at the root with the following flag hopping it help:
> CFLAGS = -g -ggdb -Og -O0
> But many of the variables have been optimized out and it's a bit hard to
> step into the code.
> I think it's probably because I'm stepping in gnulib witch is maybe not
> using the same CFLAGS.
>
> Is there anything I should do to make my life easier?
>
> --
> Best Regards,
>
> Stephane Archer
>


reply via email to

[Prev in Thread] Current Thread [Next in Thread]