Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* DDD
@ 2015-03-11 14:24 Russell Shaw
  2015-03-11 16:23 ` DDD vose
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Russell Shaw @ 2015-03-11 14:24 UTC (permalink / raw)
  To: ddd, gdb

Hi,
When i set a breakpoint at "main", it appears half way between the first and 
second line:

int main(int argc, char *argv[])
{
         int ret = EXIT_SUCCESS;
<-- red dot
         ...

Is there any fix for that?

I tried recompiling, so the source is not out of sync with the binary.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: DDD
  2015-03-11 14:24 DDD Russell Shaw
@ 2015-03-11 16:23 ` vose
       [not found] ` <CALeOzZ_Zk1hfMbkC37qLe7fDHxkie2w33f=RuvW_YU6u8WPXXw@mail.gmail.com>
       [not found] ` <55011D85.8070700@uns.ac.rs>
  2 siblings, 0 replies; 4+ messages in thread
From: vose @ 2015-03-11 16:23 UTC (permalink / raw)
  To: Russell Shaw; +Cc: ddd, gdb


My (so called) "answer" to strange ddd behavior used to be a wipe and
re-install of ddd.  These days, I have had good luck with recursively
removing the '.ddd' directory ;-)


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: DDD
       [not found] ` <CALeOzZ_Zk1hfMbkC37qLe7fDHxkie2w33f=RuvW_YU6u8WPXXw@mail.gmail.com>
@ 2015-03-12 14:13   ` Russell Shaw
  0 siblings, 0 replies; 4+ messages in thread
From: Russell Shaw @ 2015-03-12 14:13 UTC (permalink / raw)
  Cc: ddd, gdb

On 12/03/15 20:02, Shahbaz Youssefi wrote:
> Do you have optimization enabled when you compile your code?

No. I always compile with CFLAGS="-g -O0"

> On Wed, Mar 11, 2015 at 3:24 PM, Russell Shaw <rjshaw@netspace.net.au
> <mailto:rjshaw@netspace.net.au>> wrote:
>
>     Hi,
>     When i set a breakpoint at "main", it appears half way between the first and
>     second line:
>
>     int main(int argc, char *argv[])
>     {
>              int ret = EXIT_SUCCESS;
>     <-- red dot
>              ...
>
>     Is there any fix for that?
>
>     I tried recompiling, so the source is not out of sync with the binary.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: DDD
       [not found]   ` <CAKw9LJnXeee=KQDWZBfNG7hqF05isNJr3ZR_yHrui9-OT9QAcQ@mail.gmail.com>
@ 2015-03-14 11:38     ` Russell Shaw
  0 siblings, 0 replies; 4+ messages in thread
From: Russell Shaw @ 2015-03-14 11:38 UTC (permalink / raw)
  To: ddd, gdb

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)


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-03-14 11:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-11 14:24 DDD Russell Shaw
2015-03-11 16:23 ` DDD vose
     [not found] ` <CALeOzZ_Zk1hfMbkC37qLe7fDHxkie2w33f=RuvW_YU6u8WPXXw@mail.gmail.com>
2015-03-12 14:13   ` DDD Russell Shaw
     [not found] ` <55011D85.8070700@uns.ac.rs>
     [not found]   ` <CAKw9LJnXeee=KQDWZBfNG7hqF05isNJr3ZR_yHrui9-OT9QAcQ@mail.gmail.com>
2015-03-14 11:38     ` DDD Russell Shaw

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox