This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [PATCH] improved error message
On Mon, Dec 16, 2002 at 11:46:48AM -0500, Andrew Cagney wrote:
> >On Mon, Dec 16, 2002 at 11:25:32AM -0500, Andrew Cagney wrote:
> >
> >>>There are like five places in thread-db.c that all give the same
> >>>error message. This just adds the function name, so you have a
> >>>chance of figuring out where the error occurred.
> >>>
> >>>2002-12-13 Michael Snyder <msnyder@to-limbo.toronto.redhat.com>
> >>>
> >>> * thread-db.c (thread_from_lwp): Uniquify error msg.
> >>> (lwp_from_thread): Ditto.
> >>> (check_event): Ditto.
> >>> (find_new_threads_callback): Ditto.
> >>> (thread_db_pid_to_str): Ditto.
> >
> >>
> >>Er, this looks wrong. A normal user visible error message should not
> >>include references to internal function names. Can you either reword
> >>the messages or, perhaphs, add a debug mode that displys this additional
> >>information?
> >
> >
> >These are essentially internal error messages - none of them should
> >ever happen. They do now, of course.
> >
> >IMVHO I like Michael's change; now when people report these error
> >messages I'll know automatically which one they are. They tend to be
> >only spontaneously reproducible.
>
> If it is a internal error, call internal_error().
>From a practicality viewpoint, I refuse to do that when we know of
multiple situations which trigger these problems. I still get them
reported to me every couple of weeks.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer