GNU bug report logs - #6500
rm 8.1

Previous Next

Package: coreutils;

Reported by: Jim Meyering <jim <at> meyering.net>

Date: Wed, 23 Jun 2010 19:59:02 UTC

Severity: normal

Done: Jim Meyering <jim <at> meyering.net>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Jim Meyering <jim <at> meyering.net>
To: Brad <b.mells <at> outwild.net>
Cc: bug-coreutils <at> gnu.org
Subject: bug#6500: rm 8.1
Date: Wed, 23 Jun 2010 23:13:06 +0200
Brad wrote:
> Thanks for your help Jim. I tried to debug the program by running
> gdb. I'm not sure if the backtrace has the information you need.
...
> Please let me know if you have any
> suggestions to get more information.

Thanks for the details.
Here's how to get more:

First, recompile at least lib/fts.c using with -g added to CFLAGS,
and relink say rm.

Create a tiny tree in src/ that we'll remove:

  cd src # if you weren't there already
  mkdir -p a/b/c/d

Then run gdb on rm:

  gdb rm

set a breakpoint in fts_open (not xfts_open):

  b fts_open

run rm on that tree:

  run -rf a/b/c/d

Now, you'll see that gdb has stopped in fts_open.
gdb's output will show the values of the function parameters,
including the "options" variable.
That's probably all I need, but just to be sure, continue
a little further, and single step through it using "n" (for "next")
until it returns:

One of the following three return statements should trigger:

        if (options & ~FTS_OPTIONMASK) {
                __set_errno (EINVAL);
                return (NULL);
        }
        if ((options & FTS_NOCHDIR) && (options & FTS_CWDFD)) {
                __set_errno (EINVAL);
                return (NULL);
        }
        if ( ! (options & (FTS_LOGICAL | FTS_PHYSICAL))) {
                __set_errno (EINVAL);
                return (NULL);
        }

Then show us the output of the above commands.

Thanks.




This bug report was last modified 14 years and 331 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.