This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch/5.2/commit] Zap __func__


Remember this is a branch and those ``__func__''s were only printed when
there was an internal_error() - I don't think anyone is going to notice :-). The correct clean fix was committed to the mainline a few hours earlier (I looked at back patching it but noticed too many differences).

-           internal_error (__FILE__, __LINE__,
-                           "%s: unknown register rule", __func__);
+           internal_error (__FILE__, __LINE__, "bad switch");

Is there any reason not to leave the error message as it was?  It's
just a matter of "update_context: unknown register rule".  Replacing a
clear internal error with "bad switch" doesn't seem like a good move.
If it really is an internal error due to a messed up switch then I think the message is sufficient. However ....

(having an internal_error here is a little shady anyway, it's like
abort()ing on user input)
.... it sounds like these should be replaced by error() (or complain()). If it is triggered by a bad input file then, yes, you are correct.

Andrew



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]