This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: DDD
- From: Russell Shaw <rjshaw at netspace dot net dot au>
- To: ddd at gnu dot org, "gdb at sourceware dot org" <gdb at sourceware dot org>
- Date: Sat, 14 Mar 2015 22:38:22 +1100
- Subject: Re: DDD
- Authentication-results: sourceware.org; auth=none
- References: <55005028 dot 107 at netspace dot net dot au> <55011D85 dot 8070700 at uns dot ac dot rs> <CAKw9LJnXeee=KQDWZBfNG7hqF05isNJr3ZR_yHrui9-OT9QAcQ at mail dot gmail dot com>
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)