This is the mail archive of the gdb-patches@sourceware.org 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] Don't give spurious warnings when using thread specific breakpoints


Eli Zaretskii wrote:
If a specific language can't do something useful with it they can just leave it as " and" they've lost nothing.

Aha, and now imagine that you've been handed a program that generally displays English messages, but sometimes says "and" in Chinese, say. Would you be very happy? Please note that this is not a preposterous example: many people in many countries _really_ don't know English very well, even though they are programmers.

My point was that what it _currently_ does is just put 'and' with no option for the translator to change it, so if we give them the option to translate but they can't use it then they've lost nothing. Other languages have gained something.


Of course, if they are translating without any reference to the context in which it is displayed, and without being programmers, then I suspect the translation would read rather like a Chinese road sign.

No, you don't need to do that.  Instead, you should rewrite the code
like this:

ALL_BREAKPOINTS (b)
if (b->loc->address == pc) /* address match / overlay match */
if (!b->pending && (!overlay_debugging || b->loc->section == section))
{
others--;
if (others == 1 &&
(b->enable_state == bp_disabled || b->enable_state == bp_shlib_disabled || b->enable_state == bp_call_disabled))
printf_filtered (_("Note: breakpoint %d (disabled) also set at pc "),
b->number);
}
deprecated_print_address_numeric (pc, 1, gdb_stdout);
printf_filtered (".\n");


and similarly for the other combinations of the inline conditionals.


No, you misunderstand the code. There can be an arbitrary number breakpoints, each of which can have zero, one or two annotations, and they are all presented as one message.


Andrew


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