This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gdbmi.el not working with emacs 22


On 3/1/07, Nick Roberts <nickrob@snap.net.nz> wrote:
 > > I gave it a shot.  Looks like that doesn't work either.
 > > Break points show up, which is an improvement, but current-line
 > > display doesn't work.
 >
 > You need to use a version of gdb-mi.el that comes with the version of
 > GDB you're using.  If you take the latest gdb-mi.el from CVS, you need
 > to build GDB from CVS too.

I'm not sure that Bill has the latest gdb-mi.el from CVS.

I downloaded 1.11 from the CVS web interface: http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/mi/gdb-mi.el?cvsroot=src

But it does indeed seem to be different from the version you sent.  Is
the web interface to CVS not showing the latest?

I think some of the
problems come from the versions of the gdb and emacs executables.  So I have
privately sent him the latest gdb-mi.el as it might just work (as an update to
Emacs), although it's probably unlikely.

No it didn't fix the problems. Debugging with cygwin's gdb 6.5.50 seems the same. Breakpoint display works, but current line does not.

BUT -- I just tried this -- it seems that cygwin's gdb 6.5.50 doesn't
work with regular M-x gdb and --annotate=3 mode either.  So maybe
there's something else going on there, like line-ending conversion
problems.

Or not.  FWIW, here's the console output of cygwin's GDB 6.5.50:
--------------------------------
gdb -interp=mi cyghello.exe
~"GNU gdb 6.5.50.20060706-cvs (cygwin-special)\n"
~"Copyright (C) 2006 Free Software Foundation, Inc.\n"
~"GDB is free software, covered by the GNU General Public License, and
you are\n"
~"welcome to change it and/or distribute copies of it under certain
conditions.\n"
~"Type \"show copying\" to see the conditions.\n"
~"There is absolutely no warranty for GDB.  Type \"show warranty\" for
details.\n"
~"This GDB was configured as \"i686-pc-cygwin\"..."
~"\n"
(gdb)
b 20
&"b 20\n"
~"Breakpoint 1 at 0x40107a: file hello.c, line 20.\n"
^done
(gdb)
run
&"run\n"
~"Starting program: /cygdrive/c/tmp/gdbtest/cyghello.exe \n"
~"Loaded symbols for /cygdrive/c/WINDOWS/system32/ntdll.dll\n"
~"Loaded symbols for /cygdrive/c/WINDOWS/system32/kernel32.dll\n"
~"Loaded symbols for /usr/bin/cygwin1.dll\n"
~"Loaded symbols for /cygdrive/c/WINDOWS/system32/advapi32.dll\n"
~"Loaded symbols for /cygdrive/c/WINDOWS/system32/rpcrt4.dll\n"
~"\n"
~"Breakpoint 1, main (argc=1, argv=0x6630e0) at hello.c:20\n"
~"20\t  printf(\"Hello\\n\");\n"
^done
(gdb)

&"\n"
^done
(gdb)
next
&"next\n"
~"21\t  f=1.0;\n"
^done
(gdb)
next
&"next\n"
~"22\t  for (i=1; i<=10; i++) {\n"
^done
(gdb)
----------------------------------------------------

And also FWIW here's what MinGW's gives:
------------------------------------------------------
gdb -interp=mi mingwhello.exe
~"GNU gdb 6.3\n"
~"Copyright 2004 Free Software Foundation, Inc.\n"
~"GDB is free software, covered by the GNU General Public License, and
you are\n"
~"welcome to change it and/or distribute copies of it under certain
conditions.\n"
~"Type \"show copying\" to see the conditions.\n"
~"There is absolutely no warranty for GDB.  Type \"show warranty\" for
details.\n"
~"This GDB was configured as \"i686-pc-mingw32\"..."
~"\n"
(gdb)
b 20
&"b 20\n"
^done
(gdb)
run
&"run\n"
^done,reason="breakpoint-hit",bkptno="1",thread-id="1",frame={addr="0x0040131a",func="main",args=[{name="argc",value="1"},{name="argv",value="0x3d4e50"}],file="hello.c",line="20"}
(gdb)
next
&"next\n"
Hello
^done,reason="end-stepping-range",thread-id="1",frame={addr="0x00401326",func="main",args=[{name="argc",value="1"},{name="argv",value="0x3d4e50"}],file="hello.c",line="21"}
(gdb)

------------------------------------------------


Anyway, is there concise spec for GDB/MI anywhere that a developer trying to implement a the interface can follow?

--bb


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]