Thanks Greg and everyone,
Actually, the "gdb/mi" is working. The only thing for me is the
screen output in the console window is a little lag for me,
previously, the Cygwin gdb popped out a dos window, it was
convenient for me in debugging. For example, it printed out the
current time step, if it stopped, I know my code was jammed here. So
my question is, in the "gdb/mi" mode, is it possible to trigger a
"dos" window to monitor the screen output?
Best Regards,
Xi
On 11/3/2010 10:56 AM, Greg Watson wrote:
Hi Daniel,
The "mi" part of "gdb/mi" refers to the gdb machine
interface. This is a mode that is designed to allow gdb to work
more easily with GUIs such as Eclipse, and is invoked using the
"-i" option on gdb. The MI protocol has evolved over the years
as new features have been added. "mi1" is the oldest version,
but there are also more recent "mi2" and "mi3" versions. If
you're trying to debug using an old version of gdb, then you
might need to select a specific version of the protocol in order
to get around a bug in gdb. Otherwise it is best to leave it as
"mi" which means "use the latest version".
Regards,
Greg
On Nov 3, 2010, at 10:09 AM, Daniel Harenberg wrote:
Thanks a lot for the
info. Indeed I have only gdb/mi and gdbserver. Since we
are at it, I have one more question and a hint.
Question: In the 'Edit launch configuration properties'
window -> 'Debugger' tab, what do 'GDB command set' and
'Protocol' (mi,mi1, mi2) mean?
Hint: The Intel Fortran Debugger works very well with
Photran. If you have a standard Linux installation, simply
replace 'gdb' with 'idbc' in the field 'GDB debugger' in
the window/tab described above (and -as always- uncheck
the box 'Stop on startup at').
Best
Daniel
On 11/03/2010 02:26 PM, Greg Watson wrote:
The debuggers visible in the "Debugger" drop
down menu depend on a number of things, including your
platform and which CDT plugins you have installed. Older
versions of CDT had the following debuggers:
Cygwin gdb
gdb
gdb/mi
gdbserver
MinGW gdb
The "Cygwin gdb" and "gdb" debuggers are old
implementations and have been removed in more recent
versions of CDT (including Helios I believe). If
you're still seeing "gdb" then you probably have an
old CDT plugin in your workspace.
For debugging local C/C++ (and Fortran) programs,
the correct choices are "gdb/mi" or "MinGW gdb". The
"gdbserver" debugger is used for remote debugging,
usually when the target is an embedded system.
gdbserver is a light-weight server that can be run on
systems with a very small amount of memory.
Photran does not provide its own debugger, but
rather relies on the CDT debugger which is designed
for sequential C/C++ programs. This is why debugging
Fortran programs is often problematic. Unfortunately
this is likely to remain the case until someone either
improves the CDT debugger to work better with Photran,
or creates a Fortran debugger for Photran.
Regards,
Greg
On Nov 3, 2010, at 6:53 AM, Daniel
Harenberg wrote:
Hi,
I am also a heavy user of Photran but
couldn't figure out the differences between
gdb and gdb/mi (and gdbserver, for that
matter), so I also would be very grateful
for some clarification.
Michel, as for your debug perspective
problem: you can set the behavior globally
in
Menu 'Window' -> Preferences ->
Run/Debug -> Perspectives
In the field 'Application types/Launchers'
select 'Fortran Local Application', then on
the right hand side you can choose the
perspectives corresponding to the run
settings.
Best
Daniel
On 11/03/2010 11:48 AM, DEVEL Michel wrote:
Le 03/11/2010 04:55, Xi Chen
a écrit :
Hi Huacheng and everyone,
I tried to Google the solution but
couldn't find any similar case. I don't
know if I missed something very
fundamental...Maybe it is useful to
describe my problem again more clearly.
If I go to the menu "run"->"debug
configurations", and pick a executable
file e.g. "hello.exe", then under the
"Debugger" tab, the drop down menu
contains three options: gdb/mi,
gdbserver and MinGW gdb. Is there a
"cygwin gdb debugger" missing from my
settings?
Hi Xi Chen;
I am just a normal user of photran, but it
seems to me that the list of debuggers
that you will have depend on your
environment (Windows/Linux/...) and the
Tool Chains available for the type of
project you have chosen: especially on
windows, you can have gfortran provided by
MinGW or cygwin or native (e.g. the one
from http://www.equation.com/servlet/equation.cmd?fa=fortran
that I warmly recommend).
In my experience, I even had only gdb/mi
and gdbserver as possible choices in some
instances.
However, although I have been using
photran for several years on Linux, Win32
and Win64 now, I must admit that I am
still often unable to debug properly my
codes (but it may come from the fact that
I often transfer projects between Linux
and Windows back and forth), so that the
link to the debugger is probably the
weakest point of photran in my opinion.
For example, just at the moment, I have a
code under Linux in a makefile project
(compiled with -g) that execute without
opening the debug perspective when I click
on the bug button...
PS1: a priori, gdbserver will be useful
only if you debug code on another machine
using PTP.
PS2: if someone could recall briefly the
differences between plain gdb and gdb/mi I
would be grateful! ;)
--
Sincerely yours,
Michel DEVEL
_______________________________________________
photran mailing list
photran@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/photran
_______________________________________________
photran mailing list
photran@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/photran
_______________________________________________
photran mailing list
photran@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/photran
_______________________________________________
photran mailing list
photran@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/photran
_______________________________________________
photran mailing list
photran@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/photran
|