From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22521 invoked by alias); 14 Mar 2015 11:38:49 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 22512 invoked by uid 89); 14 Mar 2015 11:38:48 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 X-HELO: icp-osb-irony-out9.external.iinet.net.au Received: from icp-osb-irony-out9.external.iinet.net.au (HELO icp-osb-irony-out9.external.iinet.net.au) (203.59.1.226) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 14 Mar 2015 11:38:46 +0000 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApYBAIEdBFXSVDON/2dsb2JhbAANToc+xB2CUgKBagEBAQEBAYUNAQEEIwQRQBELDQsCAgUWCwICCQMCAQIBRQYBDAgCumRwmnoBAQEBBgEBAQEBHYEhiXaEeIJogUUBBKEujQWCIgMcgWSDHgEBAQ Received: from unknown (HELO [192.168.0.10]) ([210.84.51.141]) by icp-osb-irony-out9.iinet.net.au with ESMTP; 14 Mar 2015 19:38:19 +0800 Message-ID: <55041DAE.1060401@netspace.net.au> Date: Sat, 14 Mar 2015 11:38:00 -0000 From: Russell Shaw User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.5.0 MIME-Version: 1.0 To: ddd@gnu.org, "gdb@sourceware.org" Subject: Re: DDD References: <55005028.107@netspace.net.au> <55011D85.8070700@uns.ac.rs> In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2015-03/txt/msg00030.txt.bz2 On 12/03/15 18:19, shaunak saha wrote: > Hi, > > We are working on porting GTK port version of DDD. hopefully the first GTK > official release will be done end of this year. Will make a last motif release > before that with few fixes. I found the bug is in XmTextXYToPos(), and is caused by three unicode copyright (c) chars in my file being displayed in DDD. Each (c) consists of two bytes: 0xc2 0xa9 present in the text buffer of the text_w widget. XmTextXYToPos() only counts the (c) as one char, even though it's displayed as two chars on the screen. The same applies for any other non 7-bit-clean unicode bytes in the file. ddd-3.3.12/ddd/SourceView.C" line 5071 void SourceView::startSelectWordAct (Widget text_w, XEvent* e, String *params, Cardinal *num_params) { #if XtSpecificationRelease < 6 selection_event = *e; #endif XtCallActionProc(text_w, "grab-focus", e, params, *num_params); if (e->type != ButtonPress && e->type != ButtonRelease) return; XButtonEvent *event = &e->xbutton; XmTextPosition pos = XmTextXYToPos (text_w, event->x, event->y); XmTextPosition startpos, endpos; if (app_data.source_editing) startpos = endpos = pos; else find_word_bounds(text_w, pos, startpos, endpos); ... XmTextXYToPos() is in the debian source from: apt-get source libmotif-common The deb source adds quite a few patches, which could have an effect on the problem, but i couldn't trace into XmTextXYToPos() because of debian library dependencies involved in installing more things from source. The easy fix was to banish all chars not 7-bit clean from the source being debugged. -- regards, Russell Shaw, B.Eng, M.Eng(Research)