This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFA] Fix file name generation in edit_command (was: Ver 6.3 edit command failing)
> Date: Wed, 27 Apr 2005 14:04:10 -0400
> From: Daniel Jacobowitz <drow@false.org>
> Cc: bug-gdb@rich-paul.net, bug-gdb@gnu.org, gdb-patches@sources.redhat.com
>
> It strikes me as odd that you can use "edit" if GDB doesn't know where
> the source file is.
I thought about that, and decided to leave that code alone: GDB might
indeed not know where's the source, but the user could know more.
Most editors let you open files from inside the editor, so a user
could still edit the file.
> Also, symtab_to_fullname includes the cached fullname check. So what's
> your opinion of boiling the whole thing down to:
>
> fn = symtab_to_fullname (sal.symtab);
> if (fn == NULL)
> error (_("Could not find file \"%s\""), sal.symtab->filename);
> p = xstrprintf ("%s +%d %s", editor, sal.line, fn);
>
> Mark, can I have those bonus points? :-)
Well, perhaps you should commit this, then. There's not a single line
written by me in this snippet, so it would be misleading for me to
claim the credits in the logs.