This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
GDB/MI absolute path
- From: Bob Rossi <bob_rossi at cox dot net>
- To: gdb at sources dot redhat dot com
- Date: Thu, 6 Feb 2003 16:55:25 -0500
- Subject: GDB/MI absolute path
Hello,
I've asked this question twice on the gdb mailing list, and received no
response. Does anyone know the answer?
I am tring to successfully get positive information out of GDB/MI.
Should I be using gdb-5.3 or the latest cvs? They act different.
Also, what is the best way to ask mi for the absolute path to the
current source file. This wasn't a problem using annotate 1 or 2, and I
can't figure out how to get it using mi.
I used to just do this:
(gdb) list test.c:1,1
1 #include <stdio.h>
(gdb) info source
Current source file is test.c
Compilation directory is /home/bob/cvs/gdb/gdb/
Located in /home/bob/cvs/gdb/gdb/test.c
Contains 9 lines.
Source language is c.
Compiled with stabs debugging format.
(gdb)
But with mi I get this:
(gdb)
list test.c:1,1
&"list test.c:1,1\n"
^done,line="1",file="test.c"
(gdb)
info source
&"info source\n"
~"Current source file is test.c\n"
~"Compilation directory is /home/bob/cvs/gdb/gdb/\n"
~"Source language is c.\n"
~"Compiled with stabs debugging format.\n"
~"Does not include preprocessor macro info.\n"
^done
(gdb)
GDB/MI does not have the 'Located in' section. Is this done on purpose?
I am looking at gdb/mi/mi-cmds.c for a command that would be helpfull
but I don't see any.
Thanks,
Bobby