public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug gdb/17002] New: Passing a directory to the "file" command gives wrong error.
@ 2014-05-30 20:28 dje at google dot com
  2014-06-12  5:55 ` [Bug gdb/17002] " sergiodj at redhat dot com
  0 siblings, 1 reply; 2+ messages in thread
From: dje at google dot com @ 2014-05-30 20:28 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=17002

            Bug ID: 17002
           Summary: Passing a directory to the "file" command gives wrong
                    error.
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: gdb
          Assignee: unassigned at sourceware dot org
          Reporter: dje at google dot com

(gdb) file testsuite/gdb.base
testsuite/gdb.base: Success.
(gdb) file testsuite
testsuite: No such file or directory.

The first one fails, openp returns -1, but errno is zero so the error message
says "Success."

The second one fails, but I would have expected EISDIR or some such.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug gdb/17002] Passing a directory to the "file" command gives wrong error.
  2014-05-30 20:28 [Bug gdb/17002] New: Passing a directory to the "file" command gives wrong error dje at google dot com
@ 2014-06-12  5:55 ` sergiodj at redhat dot com
  0 siblings, 0 replies; 2+ messages in thread
From: sergiodj at redhat dot com @ 2014-06-12  5:55 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=17002

Sergio Durigan Junior <sergiodj at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |sergiodj at redhat dot com

--- Comment #1 from Sergio Durigan Junior <sergiodj at redhat dot com> ---
After a quick investigation...

The first error is easily fixed (I have a patch for it).

The second error is a little more complex.  If GDB doesn't find a directory
separator in the filename (as is the case), then it tries to find in the $PATH
for the filename.  Only when it fails is that it decides to print the error.

Anyway, those are just my findings so far.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-06-12  5:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-30 20:28 [Bug gdb/17002] New: Passing a directory to the "file" command gives wrong error dje at google dot com
2014-06-12  5:55 ` [Bug gdb/17002] " sergiodj at redhat dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).