unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* gdb 24.0.93.1 gdb doesn't work worth a damn
@ 2012-02-29 16:15 Neal Becker
  2012-02-29 16:48 ` Juanma Barranquero
  2012-02-29 23:20 ` Kaushik Srenevasan
  0 siblings, 2 replies; 7+ messages in thread
From: Neal Becker @ 2012-02-29 16:15 UTC (permalink / raw)
  To: emacs-devel

gdb doesn't seem to be usable.  I get lots of:

error in process filter: gdb-breakpoints-list-handler-custom: Wrong type 
argument: stringp, nil
error in process filter: Wrong type argument: stringp, nil

and I can't seem to really use it at all.




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

* Re: gdb 24.0.93.1 gdb doesn't work worth a damn
  2012-02-29 16:15 gdb 24.0.93.1 gdb doesn't work worth a damn Neal Becker
@ 2012-02-29 16:48 ` Juanma Barranquero
  2012-02-29 23:20 ` Kaushik Srenevasan
  1 sibling, 0 replies; 7+ messages in thread
From: Juanma Barranquero @ 2012-02-29 16:48 UTC (permalink / raw)
  To: Neal Becker; +Cc: emacs-devel

> gdb doesn't seem to be usable.  I get lots of:
>
> error in process filter: gdb-breakpoints-list-handler-custom: Wrong type
> argument: stringp, nil
> error in process filter: Wrong type argument: stringp, nil
>
> and I can't seem to really use it at all.

Filing a bug in the bug tracker, with a recipe to reproduce the bug
starting from "emacs -Q", a concise description of the problem and a
more informative title would perhaps be useful.

    Juanma



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

* Re: gdb 24.0.93.1 gdb doesn't work worth a damn
  2012-02-29 16:15 gdb 24.0.93.1 gdb doesn't work worth a damn Neal Becker
  2012-02-29 16:48 ` Juanma Barranquero
@ 2012-02-29 23:20 ` Kaushik Srenevasan
  2012-03-01 11:53   ` Neal Becker
  2012-03-06  8:39   ` Glenn Morris
  1 sibling, 2 replies; 7+ messages in thread
From: Kaushik Srenevasan @ 2012-02-29 23:20 UTC (permalink / raw)
  To: Neal Becker; +Cc: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 942 bytes --]

On Wed, Feb 29, 2012 at 8:15 AM, Neal Becker <ndbecker2@gmail.com> wrote:
> gdb doesn't seem to be usable.  I get lots of:
>
> error in process filter: gdb-breakpoints-list-handler-custom: Wrong type
> argument: stringp, nil
> error in process filter: Wrong type argument: stringp, nil
>
> and I can't seem to really use it at all.
>

I hit this yesterday too. GDB-MI doesn't seem to be able to handle
what GDB calls "multiple" breakpoints. i.e. a breakpoint that GDB sets
on every overloaded function that matches an expression. The problem
is that the MI output has an extra field - "type" only on the "parent
breakpoint", while GDB-MI expects to find it even on "child
breakpoints".

I've attached a patch. Could you check if it works for you too?

            -Kaushik

PS: While at it, I also cleaned up what gets displayed in the absence
of fields in MI output. The breakpoint table now shows "" instead of
nil.

[-- Attachment #2: gdb-mi-multiple-breakpoint-fix.patch --]
[-- Type: application/octet-stream, Size: 1610 bytes --]

diff --git lisp/progmodes/gdb-mi.el lisp/progmodes/gdb-mi.el
index 0c45c3f..56260c3 100644
--- lisp/progmodes/gdb-mi.el
+++ lisp/progmodes/gdb-mi.el
@@ -2397,15 +2397,17 @@ HANDLER-NAME handler uses customization of CUSTOM-DEFUN. See
         (gdb-table-add-row table
                            (list
                             (bindat-get-field breakpoint 'number)
-                            type
-                            (bindat-get-field breakpoint 'disp)
+                            (if type type "")
+                            (let ((breakpoint-disp (bindat-get-field breakpoint 'disp)))
+                              (if breakpoint-disp breakpoint-disp ""))
                             (let ((flag (bindat-get-field breakpoint 'enabled)))
                               (if (string-equal flag "y")
                                   (propertize "y" 'font-lock-face  font-lock-warning-face)
                                 (propertize "n" 'font-lock-face  font-lock-comment-face)))
                             (bindat-get-field breakpoint 'addr)
-                            (bindat-get-field breakpoint 'times)
-                            (if (string-match ".*watchpoint" type)
+                            (let ((breakpoint-times (bindat-get-field breakpoint 'times)))
+                              (if breakpoint-times breakpoint-times ""))
+                            (if (and type (string-match ".*watchpoint" type))
                                 (bindat-get-field breakpoint 'what)
                               (or pending at
                                   (concat "in "

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

* Re: gdb 24.0.93.1 gdb doesn't work worth a damn
  2012-02-29 23:20 ` Kaushik Srenevasan
@ 2012-03-01 11:53   ` Neal Becker
  2012-03-01 23:05     ` Kaushik Srenevasan
  2012-03-06  8:39   ` Glenn Morris
  1 sibling, 1 reply; 7+ messages in thread
From: Neal Becker @ 2012-03-01 11:53 UTC (permalink / raw)
  To: Kaushik Srenevasan; +Cc: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 1194 bytes --]

Yes, that's a lot better.

Only noticable problem now, (with just brief test), is that when the bp is
first hit, the (gdb) prompt does not appear.

On Wed, Feb 29, 2012 at 6:20 PM, Kaushik Srenevasan
<ksrenevasan@gmail.com>wrote:

> On Wed, Feb 29, 2012 at 8:15 AM, Neal Becker <ndbecker2@gmail.com> wrote:
> > gdb doesn't seem to be usable.  I get lots of:
> >
> > error in process filter: gdb-breakpoints-list-handler-custom: Wrong type
> > argument: stringp, nil
> > error in process filter: Wrong type argument: stringp, nil
> >
> > and I can't seem to really use it at all.
> >
>
> I hit this yesterday too. GDB-MI doesn't seem to be able to handle
> what GDB calls "multiple" breakpoints. i.e. a breakpoint that GDB sets
> on every overloaded function that matches an expression. The problem
> is that the MI output has an extra field - "type" only on the "parent
> breakpoint", while GDB-MI expects to find it even on "child
> breakpoints".
>
> I've attached a patch. Could you check if it works for you too?
>
>            -Kaushik
>
> PS: While at it, I also cleaned up what gets displayed in the absence
> of fields in MI output. The breakpoint table now shows "" instead of
> nil.
>

[-- Attachment #2: Type: text/html, Size: 1750 bytes --]

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

* Re: gdb 24.0.93.1 gdb doesn't work worth a damn
  2012-03-01 11:53   ` Neal Becker
@ 2012-03-01 23:05     ` Kaushik Srenevasan
  0 siblings, 0 replies; 7+ messages in thread
From: Kaushik Srenevasan @ 2012-03-01 23:05 UTC (permalink / raw)
  To: Neal Becker; +Cc: emacs-devel

On Thu, Mar 1, 2012 at 3:53 AM, Neal Becker <ndbecker2@gmail.com> wrote:
> Yes, that's a lot better.
>
> Only noticable problem now, (with just brief test), is that when the bp is
> first hit, the (gdb) prompt does not appear.
>

I don't think they are related. While I do see what you are
describing, I have also observed the the prompt disappear a) when a
breakpoint is hit when there is no "multiple" breakpoint set, b) while
using other commands that aren't even related to breakpoints and c)
without my changes.

Also, you should still be able to enter GDB commands in the buffer
even when there is no visible (GDB) prompt.



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

* Re: gdb 24.0.93.1 gdb doesn't work worth a damn
  2012-02-29 23:20 ` Kaushik Srenevasan
  2012-03-01 11:53   ` Neal Becker
@ 2012-03-06  8:39   ` Glenn Morris
  2012-03-07 18:00     ` Kaushik Srenevasan
  1 sibling, 1 reply; 7+ messages in thread
From: Glenn Morris @ 2012-03-06  8:39 UTC (permalink / raw)
  To: Kaushik Srenevasan; +Cc: Neal Becker, emacs-devel

Kaushik Srenevasan wrote:

> I hit this yesterday too. GDB-MI doesn't seem to be able to handle
> what GDB calls "multiple" breakpoints. i.e. a breakpoint that GDB sets
> on every overloaded function that matches an expression. The problem
> is that the MI output has an extra field - "type" only on the "parent
> breakpoint", while GDB-MI expects to find it even on "child
> breakpoints".
>
> I've attached a patch. Could you check if it works for you too?

I don't know anything about gdb, but this looks reasonable, so based on
http://lists.gnu.org/archive/html/emacs-devel/2012-02/msg00075.html
I installed it. Thanks.

Note that

(if A A B)

is better written as

(or A B)

which removes the need for the `let's.



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

* Re: gdb 24.0.93.1 gdb doesn't work worth a damn
  2012-03-06  8:39   ` Glenn Morris
@ 2012-03-07 18:00     ` Kaushik Srenevasan
  0 siblings, 0 replies; 7+ messages in thread
From: Kaushik Srenevasan @ 2012-03-07 18:00 UTC (permalink / raw)
  To: Glenn Morris; +Cc: Neal Becker, emacs-devel

On Tue, Mar 6, 2012 at 12:39 AM, Glenn Morris <rgm@gnu.org> wrote:
> I don't know anything about gdb, but this looks reasonable, so based on
> http://lists.gnu.org/archive/html/emacs-devel/2012-02/msg00075.html
> I installed it. Thanks.
>

Thanks. Any chance 10597 [1] could get similar love? That was the one
Nick had reviewed in the email you'd linked to.

> Note that
>
> (if A A B)
>
> is better written as
>
> (or A B)
>
> which removes the need for the `let's.

I blame the years of imperative conditioning :-)

            -Kaushik

[1] http://debbugs.gnu.org/cgi/bugreport.cgi?bug=10597



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

end of thread, other threads:[~2012-03-07 18:00 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-29 16:15 gdb 24.0.93.1 gdb doesn't work worth a damn Neal Becker
2012-02-29 16:48 ` Juanma Barranquero
2012-02-29 23:20 ` Kaushik Srenevasan
2012-03-01 11:53   ` Neal Becker
2012-03-01 23:05     ` Kaushik Srenevasan
2012-03-06  8:39   ` Glenn Morris
2012-03-07 18:00     ` Kaushik Srenevasan

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).