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: Pádraig Brady
Subject: Re: Noob question: mv is hard to debug with GDB
Date: Tue, 27 Dec 2022 12:54:36 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.0

On 26/12/2022 23:11, Stéphane Archer 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?

CFLAGS can be overridden, so you could do something like:

  $ cd coreutils
  $ make clean
  $ make CFLAGS='-g -ggdb -Og -O0' -j4
  $ gdb --directory=lib -tui -args src/mv

cheers,
Pádraig



reply via email to

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