comp.lang.ada
 help / color / mirror / Atom feed
* Re: GNAT debugger.
  1996-10-17  0:00 GNAT debugger G PRESTON
  1996-10-17  0:00 ` Robert Dewar
@ 1996-10-17  0:00 ` Hal Manuel
  1996-10-17  0:00 ` Gautier
  2 siblings, 0 replies; 12+ messages in thread
From: Hal Manuel @ 1996-10-17  0:00 UTC (permalink / raw)



You can use GDB 4.15.1 with patch gdb-4.15.1.gnat.1.10
GDB is a line oriented debugger, but there are several front ends
for it, two of which are ddd & xxgdb.  Personally, I think ddd
is MUCH better.  You can retrieve all of these at:

GDB 4.15.1:  (I've got this source....I can only find 4.16 on the net)
GDB patch:   (I've got this as well)
XXGDB1.12:   ftp://ftp.x.org/contrib/utilities/xxgdb-1.12.tar.gz
DDD 2.0:     http://www.cs.tu-bs.de/softech/ddd

If you can't find the gdb 4.15 stuff on the net, let me know & I'll
see if I can get it to you.

Hal

--
 *************************************************************
**  Hal Manuel, Software Eng.  | "If you're in a vehicle     **
**  Raytheon E-Systems         |  going the speed of light,  **
**  (972)205-8921              |  what happens when you turn **
**  HEManuel@ESY.Com           |  on the headlights?"        **
 *************************************************************
**/\  /|  Opinions expressed are my own and do not    |\  /\ **
**  \/ |  reflect the opinions of Raytheon E-Systems  | \/  \**
 *************************************************************




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

* Re: GNAT debugger.
  1996-10-17  0:00 GNAT debugger G PRESTON
@ 1996-10-17  0:00 ` Robert Dewar
  1996-10-18  0:00   ` Jon S Anthony
  1996-10-21  0:00   ` Michael Feldman
  1996-10-17  0:00 ` Hal Manuel
  1996-10-17  0:00 ` Gautier
  2 siblings, 2 replies; 12+ messages in thread
From: Robert Dewar @ 1996-10-17  0:00 UTC (permalink / raw)



Gary asks

"        Is there a graphical or command based debugger for gnat which allows
inspection of and stepping though ada code. For example the borland turbo
c++ debugger allows you to step through each line of code and displays
the values stored in variables as your code changes. It doesnt need to look
as good as the turbo interface.
        This help speed up the finding that an loop only goes through 9
times when you want it to loop 10 etc instead of tediously going line
by line through the source code.
"

The answer to your first question is yes, DDD, a freely available
GUI front end for GDB.

However, I suspect from your message that you have not yet learned a lot
of what gdb can do -- for instance do you know how to set conditoinal
breakpoints? If not you are seriously handicapped in your use of gdb.
There are many other facilities, many of them are worth learning.
Graphical user interfaces can be quite useful, but many people who
know gdb well and know its capabilities would not find them particularly
helpful. Certainly finding that "an loop only goes through 9 times when
you want it to loop 10 etc" does NOT require "tediously going line by
line through the source code".

You also must learn how to code gdb macros, and also use the call 
command in gdb. All these and many others are critical features to
make good use of this tool.

We often run into people who complain about gdb and it turns out they
simply don't know what it can do. There are many legitimate complaints
and suggestions for improvement, and I am certainly not suggesting
that all complaints are in this category. However, it is definitely
worth while learning GDB if you are using it. You may want to get hold
of the nice GDB manual and reference card from FSF. You can find these
in many bookstores, or order direct from FSF.





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

* GNAT debugger.
@ 1996-10-17  0:00 G PRESTON
  1996-10-17  0:00 ` Robert Dewar
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: G PRESTON @ 1996-10-17  0:00 UTC (permalink / raw)



	Is there a graphical or command based debugger for gnat which allows 
inspection of and stepping though ada code. For example the borland turbo 
c++ debugger allows you to step through each line of code and displays
the values stored in variables as your code changes. It doesnt need to look
as good as the turbo interface. 
	This help speed up the finding that an loop only goes through 9 
times when you want it to loop 10 etc instead of tediously going line 
by line through the source code.

Gary.





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

* Re: GNAT debugger.
  1996-10-17  0:00 GNAT debugger G PRESTON
  1996-10-17  0:00 ` Robert Dewar
  1996-10-17  0:00 ` Hal Manuel
@ 1996-10-17  0:00 ` Gautier
  2 siblings, 0 replies; 12+ messages in thread
From: Gautier @ 1996-10-17  0:00 UTC (permalink / raw)



gpreston@comp.brad.ac.uk (G PRESTON) writes:
> 	Is there a graphical or command based debugger for gnat which allows 
> inspection of and stepping though ada code. For example the borland turbo 
> c++ debugger allows you to step through each line of code and displays
> the values stored in variables as your code changes. It doesnt need to look
> as good as the turbo interface. 
> 	This help speed up the finding that an loop only goes through 9 
> times when you want it to loop 10 etc instead of tediously going line 
> by line through the source code.
> 
> Gary.
> 
For the DOS version:

a first step (but not yet step by step): ad.exe, in archive AD.ZIP at:

    http://www.unine.ch/math/Personnel/Assistants/Gautier/Gaut_FTP.htm
                         





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

* Re: GNAT debugger.
  1996-10-17  0:00 ` Robert Dewar
@ 1996-10-18  0:00   ` Jon S Anthony
  1996-10-21  0:00   ` Michael Feldman
  1 sibling, 0 replies; 12+ messages in thread
From: Jon S Anthony @ 1996-10-18  0:00 UTC (permalink / raw)



In article <dewar.845590880@merv> dewar@merv.cs.nyu.edu (Robert Dewar) writes:

> The answer to your first question is yes, DDD, a freely available
> GUI front end for GDB.

This stuff is really quite nice (having used it on Solaris quite a bit).  But, is this it available for Win(NT/95)??????

/Jon
-- 
Jon Anthony
Organon Motives, Inc.
Belmont, MA 02178
617.484.3383
jsa@organon.com





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

* Re: GNAT debugger.
  1996-10-17  0:00 ` Robert Dewar
  1996-10-18  0:00   ` Jon S Anthony
@ 1996-10-21  0:00   ` Michael Feldman
  1 sibling, 0 replies; 12+ messages in thread
From: Michael Feldman @ 1996-10-21  0:00 UTC (permalink / raw)



In article <dewar.845590880@merv>, Robert Dewar <dewar@merv.cs.nyu.edu> wrote:
>Gary asks

>"        Is there a graphical or command based debugger for gnat which allows
>inspection of and stepping though ada code. For example the borland turbo
>c++ debugger allows you to step through each line of code and displays
>the values stored in variables as your code changes. It doesnt need to look
>as good as the turbo interface.

>The answer to your first question is yes, DDD, a freely available
>GUI front end for GDB.

Having just checked the web site for DDD, I reconfirmed that DDD seems
to be a wonderful debugger front end _if_ you happen to have an
X-based terminal lying around. It depends on C++ and Motif. Don;t 
expect this to work on your Win 95 or DOS box. Linux is possible.

Mike Feldman




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

* GNAT Debugger
@ 2006-01-05 15:47 AndyA
  2006-01-05 19:05 ` Wiljan Derks
  0 siblings, 1 reply; 12+ messages in thread
From: AndyA @ 2006-01-05 15:47 UTC (permalink / raw)


This is a follow up to an earlier thread about using the GNAT Debugger.

Using GDB, is there anyway to manually break into a running
multithreaded program, set breakpoints where they are needed and start
the program running again. I have been through most of the
documentation and have yet to find anything that does the trick.




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

* Re: GNAT Debugger
  2006-01-05 15:47 GNAT Debugger AndyA
@ 2006-01-05 19:05 ` Wiljan Derks
  2006-01-09 13:35   ` AndyA
  0 siblings, 1 reply; 12+ messages in thread
From: Wiljan Derks @ 2006-01-05 19:05 UTC (permalink / raw)


On Xp you can do the following:
Just run the program
Then check with the task manager what the process id is of the process.
Then start gdb with the image that is running
Then give the command:  "attach xxxx" where xxxx is the process id
Then one can set breakpoints and continue the program to run. 





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

* Re: GNAT Debugger
  2006-01-05 19:05 ` Wiljan Derks
@ 2006-01-09 13:35   ` AndyA
  2006-01-09 15:45     ` AndyA
  0 siblings, 1 reply; 12+ messages in thread
From: AndyA @ 2006-01-09 13:35 UTC (permalink / raw)


Thanks very much .. that works. Much appreciated!




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

* Re: GNAT Debugger
  2006-01-09 13:35   ` AndyA
@ 2006-01-09 15:45     ` AndyA
  2006-01-09 18:48       ` Wiljan Derks
  2006-01-14  1:12       ` Craig Carey <research@ijs.co.nz>
  0 siblings, 2 replies; 12+ messages in thread
From: AndyA @ 2006-01-09 15:45 UTC (permalink / raw)


Upon further expermentation, I wonder if you might know a way to
accomplish the following procedure:

1. Run the program
2. Determine the process id and attach to the process in the debugger.
4. Set a break point and observe the breakpoint is reached
5. Remove breakpoint and set program running again.
6. Stop the task AGAIN and set a new breakpoint

I tried "detach", however, if I detach from the process while in a
breakpoint, the process is forever stopped and cannot be attached to
once again. Likewise, if I set the program running in the debugger with
no breakpoints, then there seems to be no way to command gdb to detach
command. Is there anyway to enter gdb commands while the program is
running??




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

* Re: GNAT Debugger
  2006-01-09 15:45     ` AndyA
@ 2006-01-09 18:48       ` Wiljan Derks
  2006-01-14  1:12       ` Craig Carey <research@ijs.co.nz>
  1 sibling, 0 replies; 12+ messages in thread
From: Wiljan Derks @ 2006-01-09 18:48 UTC (permalink / raw)


Depends on the platform.
In the past on NT4, the process whould always be killed if gdb was detached.
I know on XP you can detach without killing the process.
Later on you can attach the process again.
I think this is caused by de debug api which has more functionality on xp. 





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

* Re: GNAT Debugger
  2006-01-09 15:45     ` AndyA
  2006-01-09 18:48       ` Wiljan Derks
@ 2006-01-14  1:12       ` Craig Carey <research@ijs.co.nz>
  1 sibling, 0 replies; 12+ messages in thread
From: Craig Carey <research@ijs.co.nz> @ 2006-01-14  1:12 UTC (permalink / raw)


What could be done it done is to write a task that runs in parallel
that accepts commands for Gdb via TCP.

>From what I saw of Gdb, it won't stop or catch exceptions when
attaching has been done. Maybe workarounds are needed.

---

This C community is starting to look like that ADA: that has most
vendors, especially including GNAT and IBM, put all their core
discussions on substantive improvements to ADA, in a the single zip
file of the chief censor (eg. a censor since censoring  reasoning for
censoring).

| Newsgroups: comp.std.c++
| From: John Nagle <n...@animats.com> - Find messages by this author
| Date: Fri, 21 Sep 2001 11:24:50 CST
| Subject: Re: why no new types from typedef?
|
|     If you want a new type, you can write
|
|         class A: public B {};
|
| Admittedly you can't subclass the built-in types, something
| Java and Smalltalk allow but C++ does not.
|
|                                         John Nagle
|                                         Animats
|
| Tinct wrote:
|
| > In Pascal/ADA, "TYPE B is A" generates a new type B, the behavior
| > of A and B are the identical. But B is not A. That is,
...
*| In c++, "typedef A B" means that B is a replacer/abbreviation of A.
*| No new type B is generated!

It seems that Java or Python could be a remedy.

Craig Carey




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

end of thread, other threads:[~2006-01-14  1:12 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-01-05 15:47 GNAT Debugger AndyA
2006-01-05 19:05 ` Wiljan Derks
2006-01-09 13:35   ` AndyA
2006-01-09 15:45     ` AndyA
2006-01-09 18:48       ` Wiljan Derks
2006-01-14  1:12       ` Craig Carey <research@ijs.co.nz>
  -- strict thread matches above, loose matches on Subject: below --
1996-10-17  0:00 GNAT debugger G PRESTON
1996-10-17  0:00 ` Robert Dewar
1996-10-18  0:00   ` Jon S Anthony
1996-10-21  0:00   ` Michael Feldman
1996-10-17  0:00 ` Hal Manuel
1996-10-17  0:00 ` Gautier

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