Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* GDB frontends, MI-speak and object notation
@ 2009-05-28 12:00 Dmitry Dzhus
  2009-05-28 13:32 ` Marc Khouzam
  2009-05-30 16:44 ` Dmitry Dzhus
  0 siblings, 2 replies; 8+ messages in thread
From: Dmitry Dzhus @ 2009-05-28 12:00 UTC (permalink / raw)
  To: gdb

Hi all.

This summer I'm working on improvement for GDB Emacs frontend using
GDB/MI as a part of Google Summer of Code, and I'm looking for advice.

I wonder how other front-end developers handle GDB/MI output messages.
In the code I'm working on, regular expressions are used to parse MI
messages and extract certain values from them. This is pretty
straightforward to write, but doesn't seem to fully use the
«structuredness» of MI-speak, and lacks the spirit of MI. I'm reviewing
means of mapping MI (which seems to be a subset of JSON with a few
cosmetic differences and exceptions) to object-like structures so I can
work with it on a higher level. Has anyone had similar ideas?

I work with Lisp, so the mapping might be as follows:


    threads=[{id="1", target-id="LWP18334", frame={level="0",
    addr="0x08048b9a", func="mult_matrices_mt", args=[{name="m1",
    value="0x804ba30"}, {name="m2", value="0x804ba30"}], file="test.c",
    fullname="/home/sphinx/projects/gsoc/test.c", line="142"},
    state="stopped"}], current-thread-id="1"

to

    ((threads . (((id . "1")
                  (target-id . "LWP18334")
                  (frame . ((level . "0")
                            (addr . "0x08048b9a")
                            (func . "mult_matrices_mt")
                            (args . (((name . "m1")
                                      (value . "0x804ba30"))
                                     ((name . "m2")
                                      (value . "0x804ba30"))))
                            (file . "test.c")
                            (fullname . "/home/sphinx/projects/gsoc/test.c")
                            (line . "142")))
                  (state . "stopped"))))
     (current-thread-id . "1"))
-- 
Happy Hacking.

http://sphinx.net.ru
ã‚€


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

end of thread, other threads:[~2009-05-30 21:27 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-05-28 12:00 GDB frontends, MI-speak and object notation Dmitry Dzhus
2009-05-28 13:32 ` Marc Khouzam
2009-05-28 13:57   ` André Pönitz
2009-05-29  9:25     ` Dmitry Dzhus
2009-05-29 15:30       ` Marc Khouzam
2009-05-30 16:44 ` Dmitry Dzhus
2009-05-30 19:24   ` Vladimir Prus
2009-05-30 21:27   ` Tom Tromey

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