unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#7132: 23.1; gdb toggling breakpoints in fringe fails when brbkpt number > 9
@ 2010-09-29 14:02 richard_sharman
  2010-10-03  1:34 ` Chong Yidong
  0 siblings, 1 reply; 6+ messages in thread
From: richard_sharman @ 2010-09-29 14:02 UTC (permalink / raw)
  To: 7132

The control mouse 1 in the fringe area is supposed to toggle whether
breakpoints are enabled or not.  It fails to do this when the
breakpoint number exceeds 9.  This is because it only picks up the
a single digit of a breakpoint number due to a bug in the string-match
regexp argument.


Here is a fix:

sharmanpc 7% diff -c gdb-ui.el.orig gdb-ui.el
*** gdb-ui.el.orig	Wed Sep 29 09:41:10 2010
--- gdb-ui.el	Wed Sep 29 09:42:05 2010
***************
*** 2098,2104 ****
  	      (setq obj (overlay-get overlay 'before-string))))
  	  (when (stringp obj)
  	    (let* ((bptno (get-text-property 0 'gdb-bptno obj)))
! 	      (string-match "\\([0-9+]\\)*" bptno)
  	      (gdb-enqueue-input
  	       (list
  		(concat gdb-server-prefix
--- 2098,2104 ----
  	      (setq obj (overlay-get overlay 'before-string))))
  	  (when (stringp obj)
  	    (let* ((bptno (get-text-property 0 'gdb-bptno obj)))
! 	      (string-match "\\([0-9]+\\)*" bptno)
  	      (gdb-enqueue-input
  	       (list
  		(concat gdb-server-prefix
sharmanpc 8% diff -c gdb-ui.el.orig gdb-ui.el > gdb-ui.el.cdif
sharmanpc 9% 



In GNU Emacs 23.1.1 (i686-pc-linux-gnu, X toolkit)
 of 2009-11-20 on sharmanpc.mitel.com
Windowing system distributor `The X.Org Foundation', version 11.0.60802000
configured using `configure  '--with-x-toolkit=athena' '--without-toolkit-scroll-bars' '--without-sound''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: C
  value of $XMODIFIERS: nil
  locale-coding-system: nil
  default-enable-multibyte-characters: t

Major mode: Shell

Minor modes in effect:
  shell-dirtrack-mode: t
  global-highlight-changes-mode: t
  highlight-changes-visible-mode: t
  tooltip-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  global-auto-composition-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t

Recent input:
C-f C-a C-k ~ / t m p / g d b - u i <tab> . e l C-g 
C-x C-b C-x o C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n 
C-n C-p <return> C-x o M-x s h e <tab> <return> p u 
s n d SPC ~ / <backspace> <backspace> <backspace> <backspace> 
<backspace> h d SPC ~ / t m p <return> C-x o C-x M-f 
C-x o c p SPC C-y SPC . <return> g u n z i p SPC f 
g <backspace> <backspace> g d b u <backspace> - u I 
<backspace> I <backspace> <tab> <return> M-p C-a C-k 
C-p C-f C-f C-f C-f C-f C-f C-f C-2 C-M-f M-w C-n C-x 
4 C-f C-y . e l <return> C-x o l <backspace> m v SPC 
C-p C-f C-f C-f C-f C-2 C-M-f C-M-f M-w C-n C-y SPC 
C-y . o r i g <return> C-x o C-x C-b C-x o C-n C-n 
C-s c h g e C-a C-n C-n C-n C-n <return> C-M-b C-s 
C-w C-w C-w C-w C-w C-x o C-s C-s C-a C-x o C-a <kp-enter> 
C-a C-s C-w C-w C-w C-w C-w C-w C-w <kp-add> C-s C-s 
C-a <kp-add> C-a <kp-enter> C-x o C-f C-t <end> C-a 
C-x C-s M-x e v a l - c u <tab> <return> C-x o M-x 
s h e <tab> <return> d i f f SPC c <backspace> - c 
SPC C-p C-f C-f C-f C-f C-f C-f C-b C-2 C-e M-w C-n 
C-y C-x u C-e C-y SPC C-y <backspace> <backspace> <backspace> 
<backspace> <backspace> <return> M-p SPC > S-SPC M-b 
M-b M-b C-2 C-M-f C-M-f M-w C-e C-y . c d i f <return> 
<switch-frame> <switch-frame> <help-echo> M-x r e p 
o r t - e m a <tab> <return>

Recent messages:
Mark saved where search started [2 times]
Mark set [2 times]
Saving file /home/gx5000/sharman/tmp/gdb-ui.el...
Wrote /home/gx5000/sharman/tmp/gdb-ui.el
ad-handle-definition: `gdb-invalidate-frames' got redefined
Mark set [2 times]
Undo!
Mark set [2 times]
History item: 1
Mark set [2 times]





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

* bug#7132: 23.1; gdb toggling breakpoints in fringe fails when brbkpt number > 9
  2010-09-29 14:02 bug#7132: 23.1; gdb toggling breakpoints in fringe fails when brbkpt number > 9 richard_sharman
@ 2010-10-03  1:34 ` Chong Yidong
  2010-10-04 10:28   ` Nick Roberts
  0 siblings, 1 reply; 6+ messages in thread
From: Chong Yidong @ 2010-10-03  1:34 UTC (permalink / raw)
  To: richard_sharman, Nick Roberts; +Cc: 7132

richard_sharman@mitel.com writes:

> The control mouse 1 in the fringe area is supposed to toggle whether
> breakpoints are enabled or not.  It fails to do this when the
> breakpoint number exceeds 9.  This is because it only picks up the
> a single digit of a breakpoint number due to a bug in the string-match
> regexp argument.

In Emacs 23.2, the graphical gdb code base was revamped, and I don't
think this bug exists any more.

Nick, could you check?


> Here is a fix:
>
> sharmanpc 7% diff -c gdb-ui.el.orig gdb-ui.el
> *** gdb-ui.el.orig	Wed Sep 29 09:41:10 2010
> --- gdb-ui.el	Wed Sep 29 09:42:05 2010
> ***************
> *** 2098,2104 ****
>   	      (setq obj (overlay-get overlay 'before-string))))
>   	  (when (stringp obj)
>   	    (let* ((bptno (get-text-property 0 'gdb-bptno obj)))
> ! 	      (string-match "\\([0-9+]\\)*" bptno)
>   	      (gdb-enqueue-input
>   	       (list
>   		(concat gdb-server-prefix
> --- 2098,2104 ----
>   	      (setq obj (overlay-get overlay 'before-string))))
>   	  (when (stringp obj)
>   	    (let* ((bptno (get-text-property 0 'gdb-bptno obj)))
> ! 	      (string-match "\\([0-9]+\\)*" bptno)
>   	      (gdb-enqueue-input
>   	       (list
>   		(concat gdb-server-prefix
> sharmanpc 8% diff -c gdb-ui.el.orig gdb-ui.el > gdb-ui.el.cdif
> sharmanpc 9% 
>
>
>
> In GNU Emacs 23.1.1 (i686-pc-linux-gnu, X toolkit)
>  of 2009-11-20 on sharmanpc.mitel.com
> Windowing system distributor `The X.Org Foundation', version 11.0.60802000
> configured using `configure  '--with-x-toolkit=athena' '--without-toolkit-scroll-bars' '--without-sound''
>
> Important settings:
>   value of $LC_ALL: nil
>   value of $LC_COLLATE: nil
>   value of $LC_CTYPE: nil
>   value of $LC_MESSAGES: nil
>   value of $LC_MONETARY: nil
>   value of $LC_NUMERIC: nil
>   value of $LC_TIME: nil
>   value of $LANG: C
>   value of $XMODIFIERS: nil
>   locale-coding-system: nil
>   default-enable-multibyte-characters: t
>
> Major mode: Shell
>
> Minor modes in effect:
>   shell-dirtrack-mode: t
>   global-highlight-changes-mode: t
>   highlight-changes-visible-mode: t
>   tooltip-mode: t
>   mouse-wheel-mode: t
>   menu-bar-mode: t
>   file-name-shadow-mode: t
>   global-font-lock-mode: t
>   font-lock-mode: t
>   blink-cursor-mode: t
>   global-auto-composition-mode: t
>   auto-composition-mode: t
>   auto-encryption-mode: t
>   auto-compression-mode: t
>   line-number-mode: t
>
> Recent input:
> C-f C-a C-k ~ / t m p / g d b - u i <tab> . e l C-g 
> C-x C-b C-x o C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n 
> C-n C-p <return> C-x o M-x s h e <tab> <return> p u 
> s n d SPC ~ / <backspace> <backspace> <backspace> <backspace> 
> <backspace> h d SPC ~ / t m p <return> C-x o C-x M-f 
> C-x o c p SPC C-y SPC . <return> g u n z i p SPC f 
> g <backspace> <backspace> g d b u <backspace> - u I 
> <backspace> I <backspace> <tab> <return> M-p C-a C-k 
> C-p C-f C-f C-f C-f C-f C-f C-f C-2 C-M-f M-w C-n C-x 
> 4 C-f C-y . e l <return> C-x o l <backspace> m v SPC 
> C-p C-f C-f C-f C-f C-2 C-M-f C-M-f M-w C-n C-y SPC 
> C-y . o r i g <return> C-x o C-x C-b C-x o C-n C-n 
> C-s c h g e C-a C-n C-n C-n C-n <return> C-M-b C-s 
> C-w C-w C-w C-w C-w C-x o C-s C-s C-a C-x o C-a <kp-enter> 
> C-a C-s C-w C-w C-w C-w C-w C-w C-w <kp-add> C-s C-s 
> C-a <kp-add> C-a <kp-enter> C-x o C-f C-t <end> C-a 
> C-x C-s M-x e v a l - c u <tab> <return> C-x o M-x 
> s h e <tab> <return> d i f f SPC c <backspace> - c 
> SPC C-p C-f C-f C-f C-f C-f C-f C-b C-2 C-e M-w C-n 
> C-y C-x u C-e C-y SPC C-y <backspace> <backspace> <backspace> 
> <backspace> <backspace> <return> M-p SPC > S-SPC M-b 
> M-b M-b C-2 C-M-f C-M-f M-w C-e C-y . c d i f <return> 
> <switch-frame> <switch-frame> <help-echo> M-x r e p 
> o r t - e m a <tab> <return>
>
> Recent messages:
> Mark saved where search started [2 times]
> Mark set [2 times]
> Saving file /home/gx5000/sharman/tmp/gdb-ui.el...
> Wrote /home/gx5000/sharman/tmp/gdb-ui.el
> ad-handle-definition: `gdb-invalidate-frames' got redefined
> Mark set [2 times]
> Undo!
> Mark set [2 times]
> History item: 1
> Mark set [2 times]





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

* bug#7132: 23.1; gdb toggling breakpoints in fringe fails when brbkpt number > 9
  2010-10-03  1:34 ` Chong Yidong
@ 2010-10-04 10:28   ` Nick Roberts
  2010-10-06 19:32     ` Stefan Monnier
  0 siblings, 1 reply; 6+ messages in thread
From: Nick Roberts @ 2010-10-04 10:28 UTC (permalink / raw)
  To: Chong Yidong; +Cc: richard_sharman, 7132

 > In Emacs 23.2, the graphical gdb code base was revamped, and I don't
 > think this bug exists any more.
 > 
 > Nick, could you check?

It looks like it exists in 23.2 (which is similar to 23.1) but not in trunk.
I can't remember why a string match was done on bptno but bptno is used
directly in gdb-mi.el so I think there is no problem there.  Richard might like
to check.  I can check a change in on the emacs-23 branch if you like.

Nick





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

* bug#7132: 23.1; gdb toggling breakpoints in fringe fails when brbkpt number > 9
  2010-10-04 10:28   ` Nick Roberts
@ 2010-10-06 19:32     ` Stefan Monnier
  2010-10-09 11:00       ` Nick Roberts
  0 siblings, 1 reply; 6+ messages in thread
From: Stefan Monnier @ 2010-10-06 19:32 UTC (permalink / raw)
  To: Nick Roberts; +Cc: richard_sharman, Chong Yidong, 7132

>> In Emacs 23.2, the graphical gdb code base was revamped, and I don't
>> think this bug exists any more.
>> Nick, could you check?
> It looks like it exists in 23.2 (which is similar to 23.1) but not in
> trunk.  I can't remember why a string match was done on bptno but
> bptno is used directly in gdb-mi.el so I think there is no problem
> there.  Richard might like to check.  I can check a change in on the
> emacs-23 branch if you like.

A fix for the emacs-23 branch would be welcome, yes,


        Stefan







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

* bug#7132: 23.1; gdb toggling breakpoints in fringe fails when brbkpt number > 9
  2010-10-06 19:32     ` Stefan Monnier
@ 2010-10-09 11:00       ` Nick Roberts
  2010-10-09 12:15         ` Juanma Barranquero
  0 siblings, 1 reply; 6+ messages in thread
From: Nick Roberts @ 2010-10-09 11:00 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: richard_sharman, Chong Yidong, 7132-done

 > A fix for the emacs-23 branch would be welcome, yes,

I've done this and hopefully closed the report.

-- 
Nick                                           http://users.snap.net.nz/~nickrob





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

* bug#7132: 23.1; gdb toggling breakpoints in fringe fails when brbkpt number > 9
  2010-10-09 11:00       ` Nick Roberts
@ 2010-10-09 12:15         ` Juanma Barranquero
  0 siblings, 0 replies; 6+ messages in thread
From: Juanma Barranquero @ 2010-10-09 12:15 UTC (permalink / raw)
  To: 7132, nickrob

> I've done this and hopefully closed the report.

Could you please add a note to the ChangeLog entry stating that this
change is not for the trunk? It'll help with the merging.

    Juanma





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

end of thread, other threads:[~2010-10-09 12:15 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-29 14:02 bug#7132: 23.1; gdb toggling breakpoints in fringe fails when brbkpt number > 9 richard_sharman
2010-10-03  1:34 ` Chong Yidong
2010-10-04 10:28   ` Nick Roberts
2010-10-06 19:32     ` Stefan Monnier
2010-10-09 11:00       ` Nick Roberts
2010-10-09 12:15         ` Juanma Barranquero

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).