public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug cli/17911] New: gdb reports "/some/path/: Success" when trying to open a directory
@ 2015-01-31 14:44 nhaehnle at gmail dot com
  2015-09-19 22:35 ` [Bug symtab/17911] " xdje42 at gmail dot com
  2015-09-19 23:10 ` xdje42 at gmail dot com
  0 siblings, 2 replies; 3+ messages in thread
From: nhaehnle at gmail dot com @ 2015-01-31 14:44 UTC (permalink / raw)
  To: gdb-prs

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

            Bug ID: 17911
           Summary: gdb reports "/some/path/: Success" when trying to open
                    a directory
           Product: gdb
           Version: 7.8
            Status: NEW
          Severity: normal
          Priority: P2
         Component: cli
          Assignee: unassigned at sourceware dot org
          Reporter: nhaehnle at gmail dot com

Created attachment 8093
  --> https://sourceware.org/bugzilla/attachment.cgi?id=8093&action=edit
Proposed patch

(This is on 7.8, but a quick glance at the source suggests it is also present
in more recent versions).

Consider the following transcript of a GDB session:

$ gdb
...
(gdb) file /home/
/home/: Success.
...

Clearly, it would be nice if the GDB output were more helpful. (The transcript
may seem trivial; however, this problem leads to significantly more confusion
in the context of KDevelop's gdb plugin.)

I am attaching a patch proposal which changes the behavior to:

(gdb) file /home/haehnle
/home/haehnle: Is a directory.
(gdb) file /home/haehnle/asdfs
/home/haehnle/asdfs: No such file or directory.
(gdb) file /dev/null          
/dev/null: Exec format error.

(The last case is a bit of an odd one out. Unfortunately, there is no
ENOTAREGULARFILE as far as I can tell, and ENOEXEC was the best I could come up
with.)

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


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

* [Bug symtab/17911] gdb reports "/some/path/: Success" when trying to open a directory
  2015-01-31 14:44 [Bug cli/17911] New: gdb reports "/some/path/: Success" when trying to open a directory nhaehnle at gmail dot com
@ 2015-09-19 22:35 ` xdje42 at gmail dot com
  2015-09-19 23:10 ` xdje42 at gmail dot com
  1 sibling, 0 replies; 3+ messages in thread
From: xdje42 at gmail dot com @ 2015-09-19 22:35 UTC (permalink / raw)
  To: gdb-prs

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

Doug Evans <xdje42 at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |xdje42 at gmail dot com
          Component|cli                         |symtab

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


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

* [Bug symtab/17911] gdb reports "/some/path/: Success" when trying to open a directory
  2015-01-31 14:44 [Bug cli/17911] New: gdb reports "/some/path/: Success" when trying to open a directory nhaehnle at gmail dot com
  2015-09-19 22:35 ` [Bug symtab/17911] " xdje42 at gmail dot com
@ 2015-09-19 23:10 ` xdje42 at gmail dot com
  1 sibling, 0 replies; 3+ messages in thread
From: xdje42 at gmail dot com @ 2015-09-19 23:10 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #1 from Doug Evans <xdje42 at gmail dot com> ---
I tripped over this this morning, and came up with a similar patch,
posted here:
https://sourceware.org/ml/gdb-patches/2015-09/msg00491.html

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


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

end of thread, other threads:[~2015-09-19 23:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-31 14:44 [Bug cli/17911] New: gdb reports "/some/path/: Success" when trying to open a directory nhaehnle at gmail dot com
2015-09-19 22:35 ` [Bug symtab/17911] " xdje42 at gmail dot com
2015-09-19 23:10 ` xdje42 at gmail 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).