From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19913 invoked by alias); 18 Oct 2006 15:12:36 -0000 Received: (qmail 19904 invoked by uid 22791); 18 Oct 2006 15:12:35 -0000 X-Spam-Check-By: sourceware.org Received: from fra-del-04.spheriq.net (HELO fra-del-04.spheriq.net) (195.46.51.100) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 18 Oct 2006 15:12:24 +0000 Received: from fra-out-03.spheriq.net (fra-out-03.spheriq.net [195.46.51.131]) by fra-del-04.spheriq.net with ESMTP id k9IFCJrx032367 for ; Wed, 18 Oct 2006 15:12:19 GMT Received: from fra-cus-01.spheriq.net (fra-cus-01.spheriq.net [195.46.51.37]) by fra-out-03.spheriq.net with ESMTP id k9IFCIhT029193 for ; Wed, 18 Oct 2006 15:12:18 GMT Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by fra-cus-01.spheriq.net with ESMTP id k9IFCGPt015515 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=OK) for ; Wed, 18 Oct 2006 15:12:18 GMT Received: from zeta.dmz-eu.st.com (ns2.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 7841ADA44 for ; Wed, 18 Oct 2006 15:12:14 +0000 (GMT) Received: from mail1.bri.st.com (mail1.bri.st.com [164.129.8.218]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 43F9447435 for ; Wed, 18 Oct 2006 15:12:14 +0000 (GMT) Received: from [164.129.15.13] (bri1043.bri.st.com [164.129.15.13]) by mail1.bri.st.com (MOS 3.5.8-GR) with ESMTP id CIC78119 (AUTH stubbsa); Wed, 18 Oct 2006 16:12:12 +0100 (BST) Message-ID: <4536444C.9020709@st.com> Date: Wed, 18 Oct 2006 15:12:00 -0000 From: Andrew STUBBS User-Agent: Thunderbird 1.5.0.7 (Windows/20060909) MIME-Version: 1.0 To: gdb-patches@sourceware.org Subject: Re: [PATCH] Don't give spurious warnings when using thread specific breakpoints References: <452CF534.4060209@st.com> <20061011135545.GA26060@nevyn.them.org> <452D0385.6010103@st.com> <20061011204525.GA9622@nevyn.them.org> <45361793.1020202@st.com> <20061018141419.GA7771@nevyn.them.org> In-Reply-To: <20061018141419.GA7771@nevyn.them.org> Content-Type: multipart/mixed; boundary="------------060402010601050007060304" X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2006-10/txt/msg00216.txt.bz2 This is a multi-part message in MIME format. --------------060402010601050007060304 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-length: 1155 Daniel Jacobowitz wrote: > There's no useful translation for " and". If you can't group the > translatable bits into whole messages, you're pretty much stuck. > Maybe Eli will have a suggestion on how to properly mark up this. Do not most languages have a translation for these examples? Certainly many languages are happy with " and" (" et", " und" ...) and the other bits, "(permanent)", "(disabled)", "(all threads)" and "(thread %d)", are self contained and seem readily translatable to me. If a specific language can't do something useful with it they can just leave it as " and" they've lost nothing. At least they have the opportunity to gain something. I take your general point though, it's better to translate whole sentences. We could fix the 'and' problem like this: "Note: Breakpoint %s is also set at pc" "Note: Breakpoints %s and %s are also set at pc" Of course that would require collecting the strings into a buffer of some kind with all the attendant jiggery pokery that that requires. I don't know that anything can be done about the various annotations. In any case, a patch without gettext markup is attached. Andrew --------------060402010601050007060304 Content-Type: text/plain; name="threadbreak.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="threadbreak.patch" Content-length: 2235 2006-10-18 Andrew Stubbs * breakpoint.c (describe_other_breakpoints): Add thread parameter. Annotate display with thread number where appropriate. (create_breakpoints): Add thread parameter to call to describe_other_breakpoints. Index: src/gdb/breakpoint.c =================================================================== --- src.orig/gdb/breakpoint.c 2006-10-18 12:30:23.000000000 +0100 +++ src/gdb/breakpoint.c 2006-10-18 16:00:56.000000000 +0100 @@ -102,7 +102,7 @@ static void breakpoint_adjustment_warnin static CORE_ADDR adjust_breakpoint_address (CORE_ADDR bpaddr, enum bptype bptype); -static void describe_other_breakpoints (CORE_ADDR, asection *); +static void describe_other_breakpoints (CORE_ADDR, asection *, int); static void breakpoints_info (char *, int); @@ -3782,7 +3782,7 @@ maintenance_info_breakpoints (char *bnum /* Print a message describing any breakpoints set at PC. */ static void -describe_other_breakpoints (CORE_ADDR pc, asection *section) +describe_other_breakpoints (CORE_ADDR pc, asection *section, int thread) { int others = 0; struct breakpoint *b; @@ -3802,12 +3802,16 @@ describe_other_breakpoints (CORE_ADDR pc if (!b->pending && (!overlay_debugging || b->loc->section == section)) { others--; - printf_filtered ("%d%s%s ", - b->number, + printf_filtered ("%d", b->number); + if (b->thread == -1 && thread != -1) + printf_filtered (" (all threads)"); + else if (b->thread != -1) + printf_filtered (" (thread %d)", b->thread); + printf_filtered ("%s%s ", ((b->enable_state == bp_disabled || b->enable_state == bp_shlib_disabled || b->enable_state == bp_call_disabled) - ? " (disabled)" + ? " (disabled)" : b->enable_state == bp_permanent ? " (permanent)" : ""), @@ -4960,7 +4964,7 @@ create_breakpoints (struct symtabs_and_l struct symtab_and_line sal = sals.sals[i]; if (from_tty) - describe_other_breakpoints (sal.pc, sal.section); + describe_other_breakpoints (sal.pc, sal.section, thread); b = set_raw_breakpoint (sal, type); set_breakpoint_count (breakpoint_count + 1); --------------060402010601050007060304--