Path: nntp.gmd.de!newsserver.jvnc.net!netnews.upenn.edu!news.amherst.edu!
news.mtholyoke.edu!uhog.mit.edu!news.mathworks.com!yeshua.marcam.com!
charnel.ecst.csuchico.edu!csusac!csus.edu!gdaswani
From: gdasw...@silicon.csci.csusb.edu (George Daswani)
Newsgroups: gnu.gcc.help
Subject: Can somebody help me with gdb.
Date: 11 Nov 1994 07:53:14 GMT
Organization: California State University Sacramento
Lines: 27
Message-ID: <39v7ta$ngn@news.csus.edu>
NNTP-Posting-Host: sun35.csci.csusb.edu
X-Newsreader: TIN [version 1.2 PL2]

Hello out there,

	Can somebody help me with gdb?  Well I can't seem to make
it work...

Well I compile my program with

cc -g -o program program.c

gdb program

.. this is the part where i'm stuck..  I can't do anything.  I have
been using "dbx" for a while and it is good but I would rather use
gdb...  On dbx when I type step, it goes step by step , etc..  However
when I do the same on gdb all I get is "program is not running" or
something like that..  When I type the run command it just runs the
program but it doesn't do it step by step...  I'm pretty sure I'm doing
something really stupid and missing something... 
program however it doesn't stop step by step..  

I would like to know how I can make gdb act like dbx..  When I type
help running, it shows me a list of the commands..  However I can't
run them because the program needs to be running..

Any help appreciated..

Newsgroups: gnu.gcc.help
From: lo...@caren.demon.co.uk (Loris Caren)
Path: nntp.gmd.de!newsserver.jvnc.net!news.edu.tw!news.cc.nctu.edu.tw!
nctuccca.edu.tw!howland.reston.ans.net!pipex!demon!caren!loris
Subject: Re: Can somebody help me with gdb.
X-Newsreader: TIN [UNIX 1.3 941006BETA PL0]
Organization: Caren Electronic Consultants
Lines: 8
References: <39v7ta$ngn@news.csus.edu> <3a9r1o$c0j@news.tuwien.ac.at>
Date: Fri, 18 Nov 1994 10:19:23 +0000
Message-ID: <1994Nov18.101923.323@caren.demon.co.uk>
Sender: use...@demon.co.uk

The functionality may not be what you want but there is logic to it.
If you haven't 'started', you can't step. Most programmes would take too 
long to step through the whole thing, so one puts a break at the start of 
the suspicous section and then 'runs' it. Once you've broken, you can 
look at variables and step.
If for some reason you always want to start stepping from the start (main)
a break at main and a run command can be placed in the gdb initialization 
file.
-- 
Loris Caren                  | I run Linux on my PC, it's the best
Hampshire, England           | thing since sliced bread.

Path: nntp.gmd.de!newsserver.jvnc.net!darwin.sura.net!convex!cs.utexas.edu!
howland.reston.ans.net!Germany.EU.net!EU.net!Austria.EU.net!newsfeed.ACO.net!
news.tuwien.ac.at!rs6.iaee.tuwien.ac.at!sor
From: s...@rs6.iaee.tuwien.ac.at (Zhenya Sorokin)
Newsgroups: gnu.gcc.help
Subject: Re: Can somebody help me with gdb.
Date: 21 Nov 1994 11:13:17 GMT
Organization: Vienna University of Technology, Austria
Lines: 38
Message-ID: <3apvcd$drr@news.tuwien.ac.at>
References: <39v7ta$ngn@news.csus.edu> <3a9r1o$c0j@news.tuwien.ac.at> 
<1994Nov18.101923.323@caren.demon.co.uk>
NNTP-Posting-Host: rs6.iaee.tuwien.ac.at
X-Newsreader: TIN [version 1.2 PL2]

Loris Caren (lo...@caren.demon.co.uk) wrote:
>The functionality may not be what you want but there is logic to it.
>If you haven't 'started', you can't step. 

Of course, but what is wrong with the other logic, which simply
defines 'step' as 'br main(); step' in the beginning of the program
and just 'step' otherwise? It is no more illogical as to allow 'b',
'br', etc. for 'breakpoint' as long as the command is
unambiguous. 'step' or 'next' at the beginning of the program are
quite unambiguous, at least for the three debuggers I worked with so
far.  Or is there something specific with gdb?

 Now, with DJGPP available I'll bet that a majority of newcomers will
have the experience of user-friendly debuggers in DOS environment and
expect something similar. Why not help them? The UNIX environment and
gcc/gdb have already a (completely unnecessary, to my mind) reputation
of being good only for the Guru's. Just a touch of politeness towards
newbies and a little user-friendliness may do wonders :-). For the
sake of old UNIX hackers this may be something like a '-newbie'
command-line switch.

As to the facts: we installed gcc/gdb for the students
taking C++ course. The result is that all of them use TurboC, even
though many had to pay for it. When asked, they reply
that a) Error reports are much more informative, and b) gdb is unusable. 
The side effect is that they easily believe the myth that any free
software is by definition bad and utmost user-unfriendly. I had a bad time
persuading one of them to try TeX before starting to write formulas
under MS-Word.


--
Zhenya Sorokin

E-mail     : soro...@ps1.iaee.tuwien.ac.at, s...@rs6.iaee.tuwien.ac.at
Paper-mail : E. Sorokin, Gusshausstr. 27/359-9, 1040 Vienna, Austria
Voice-mail : +43(1)58801-3703, -3948
Flame-mail : /dev/null

Path: nntp.gmd.de!urmel.informatik.rwth-aachen.de!
newsserver.rrzn.uni-hannover.de!aix11.hrz.uni-oldenburg.de!
nordwest.germany.eu.net!pophh!Germany.EU.net!EU.net!
howland.reston.ans.net!math.ohio-state.edu!cis.ohio-state.edu!
gnu.ai.mit.edu!rms
From: r...@gnu.ai.mit.edu (Richard Stallman)
Newsgroups: gnu.gcc.help
Subject: Tool for error message explanations
Date: 23 Nov 1994 13:52:31 -0500
Organization: GNUs Not Usenet
Lines: 10
Sender: dae...@cis.ohio-state.edu
Distribution: gnu
Message-ID: <199411231851.NAA15782@mole.gnu.ai.mit.edu>

If beginning C users want long explanations of errors,
I think the best way to support this is to have a separate function
which looks at a GCC error message and gives you a long explanation of it.

This could be called by the `error' function within GCC, or it could be
run as a separate tool from the *Compilation* buffer in Emacs.

Would someone like to volunteer to write this?  It is not difficult
technically, but it is a substantial amount of work.

Path: nntp.gmd.de!newsserver.jvnc.net!news.cac.psu.edu!
news.pop.psu.edu!hudson.lm.com!godot.cc.duq.edu!ddsw1!
news.kei.com!sol.ctr.columbia.edu!math.ohio-state.edu!
cis.ohio-state.edu!gnu.ai.mit.edu!rms
From: r...@gnu.ai.mit.edu (Richard Stallman)
Newsgroups: gnu.gdb.bug
Subject: Re: Comments about GDB
Date: 23 Nov 1994 23:20:31 -0500
Organization: GNUs Not Usenet
Lines: 62
Sender: dae...@cis.ohio-state.edu
Approved: bug-...@prep.ai.mit.edu
Distribution: gnu
Message-ID: <9411220302.AA09493@mole.gnu.ai.mit.edu>
References: <9411211205.AA24409@vlsi1.ultra.nyu.edu>

This person is somewhat confused in what he says, but seems
to have a basically good idea.

`step' and `next' when the program is not running
might as well ask the user whether to start it.
That should take just 5 minutes to implement,
and won't hurt anyone ever.


Date: Mon, 21 Nov 94 07:05:33 -0500
From: ken...@vlsi1.ultra.nyu.edu (Richard Kenner)
To: r...@gnu.ai.mit.edu
Subject: Comments about GDB

FYI:

To: help-...@prep.ai.mit.edu
Date: 21 Nov 1994 11:13:17 GMT
Organization: Vienna University of Technology, Austria
From: s...@rs6.iaee.tuwien.ac.at (Zhenya Sorokin)
Subject: Re: Can somebody help me with gdb.

Loris Caren (lo...@caren.demon.co.uk) wrote:
>The functionality may not be what you want but there is logic to it.
>If you haven't 'started', you can't step. 

Of course, but what is wrong with the other logic, which simply
defines 'step' as 'br main(); step' in the beginning of the program
and just 'step' otherwise? It is no more illogical as to allow 'b',
'br', etc. for 'breakpoint' as long as the command is
unambiguous. 'step' or 'next' at the beginning of the program are
quite unambiguous, at least for the three debuggers I worked with so
far.  Or is there something specific with gdb?

 Now, with DJGPP available I'll bet that a majority of newcomers will
have the experience of user-friendly debuggers in DOS environment and
expect something similar. Why not help them? The UNIX environment and
gcc/gdb have already a (completely unnecessary, to my mind) reputation
of being good only for the Guru's. Just a touch of politeness towards
newbies and a little user-friendliness may do wonders :-). For the
sake of old UNIX hackers this may be something like a '-newbie'
command-line switch.

As to the facts: we installed gcc/gdb for the students
taking C++ course. The result is that all of them use TurboC, even
though many had to pay for it. When asked, they reply
that a) Error reports are much more informative, and b) gdb is unusable. 
The side effect is that they easily believe the myth that any free
software is by definition bad and utmost user-unfriendly. I had a bad time
persuading one of them to try TeX before starting to write formulas
under MS-Word.


--
Zhenya Sorokin

E-mail     : soro...@ps1.iaee.tuwien.ac.at, s...@rs6.iaee.tuwien.ac.at
Paper-mail : E. Sorokin, Gusshausstr. 27/359-9, 1040 Vienna, Austria
Voice-mail : +43(1)58801-3703, -3948
Flame-mail : /dev/null

Path: nntp.gmd.de!newsserver.jvnc.net!news.cac.psu.edu!news.pop.psu.edu!
psuvax1!uwm.edu!math.ohio-state.edu!magnus.acs.ohio-state.edu!
cis.ohio-state.edu!gnu.ai.mit.edu!rms
From: r...@gnu.ai.mit.edu (Richard Stallman)
Newsgroups: gnu.gcc.help
Subject: Is free software good in quality?
Date: 26 Nov 1994 12:45:07 -0500
Organization: GNUs Not Usenet
Lines: 24
Sender: dae...@cis.ohio-state.edu
Distribution: gnu
Message-ID: <9411220421.AA09718@mole.gnu.ai.mit.edu>

    As to the facts: we installed gcc/gdb for the students
    taking C++ course. The result is that all of them use TurboC, even
    though many had to pay for it. When asked, they reply
    that a) Error reports are much more informative, and b) gdb is unusable. 

This response amazes me, given the number of people who say just the
opposite.  Especially people say GCC has very good error messages.  So
I would hesitate to conclude this reflects any actual problem with GCC
and GDB.  The criticism is vague, so there's no way of telling what
it's based on.  Perhaps GCC and GDB are just different from what these
people are used to.

Because the criticism is so vague, there's no indication of what sort
of change would make those people happier.  Criticism has to be
specific to be useful.

When you have *specific* ideas for improving either GCC or GDB (like
the idea about using `step' while the program is not running), please
suggest them.  That is useful.

It's best to send GDB suggestions to bug-...@prep.ai.mit.edu.  The GDB
maintainers probably don't read gnu.gcc.help.

Path: nntp.gmd.de!urmel.informatik.rwth-aachen.de!
newsserver.rrzn.uni-hannover.de!aix11.hrz.uni-oldenburg.de!
nordwest.germany.eu.net!pophh!Germany.EU.net!howland.reston.ans.net!
math.ohio-state.edu!cis.ohio-state.edu!allwise.ATt.COM!liyuan
From: liy...@allwise.ATt.COM (Yuan P. Li)
Newsgroups: gnu.gcc.help
Subject: Is free software good in quality?
Date: 25 Nov 1994 14:02:07 -0500
Organization: GNUs Not Usenet
Lines: 59
Sender: dae...@cis.ohio-state.edu
Distribution: gnu
Message-ID: <9411251901.AA08951@allwise.att.com>
References: <9411220421.AA09718@mole.gnu.ai.mit.edu>

s...@rs6.iaee.tuwien.ac.at:
>    As to the facts: we installed gcc/gdb for the students
>    taking C++ course. The result is that all of them use TurboC, even
>    though many had to pay for it. When asked, they reply
>    that a) Error reports are much more informative, and
>    b) gdb is unusable. 

r...@gnu.ai.mit.edu:
>Subject: Is free software good in quality?
>This response amazes me, given the number of people who say just the
>opposite.  Especially people say GCC has very good error messages.  So
>I would hesitate to conclude this reflects any actual problem with GCC
>and GDB.  The criticism is vague, so there's no way of telling what
>it's based on.  Perhaps GCC and GDB are just different from what these
>people are used to.

I believe the problem here is not the quality of gnu
software which is great on unix. s...@rs6.iaee.tuwien.ac.at
just pointed out that gcc and gdb is not as user friendly as
Borland C. And I agree.

I used to play with the DOS PC and Mactintosh back in
school. I believe the personal computer technology,
including MSDOS and WINDOWS which some of you appear to hate
so much, has brought two great advances in the world of
computing: (1) It has made computers available to almost
everyone. (2) It has made software a lot more user friendly.

Borland-C and other PC base compilers except early versions
of Watcom C, come with easy-to-use editors and debuggers,
online-help documents and examples. It takes far less effort
and is much more enjoyable to figure out how to work in
these PC based enviroments than with gcc+gdb. In some sense,
Borland-C with its integrated development environment and
tools (Turbo Debugger, Project-Expert, Target-Expert, Win
Inspector, etc) compared to gcc+gdb+emacs+gmake (assuming
you are lucky that your unix system manager made all these
working consistently for you), feels much like vi compared
to emacs (as editors only). When it comes to windowing and
graphical programming, and the so-called multimedia, the
visual design tools in Borland-C or MS visual-C++ are also
outstanding.  I can imagine starting students prefer Borland
C to gcc. The same way they would prefer WordPerfect or
MSWord to Tex to write a paper or thesis.  Unix gurus:
perhaps something can be learned from the feeble MSDOS.

To be more specific? Check out Borland c++ 4.5 with its
database kit. You may also want to plug in some PC
speakers. Think about what emacs would look like if its
memus and windows are replaced by something like
TurboVision.

Note I am just an average computer user but have never taken
any computer courses in school (except one IC cource
explained how a 8088 chip worked). I am looking at the
problem in a different perspective. Do not flame me on that.

Yuan P Li

Path: nntp.gmd.de!newsserver.jvnc.net!news.cac.psu.edu!news.pop.psu.edu!
psuvax1!uwm.edu!math.ohio-state.edu!magnus.acs.ohio-state.edu!
cis.ohio-state.edu!csrl.aoyama.ac.jp!rms
From: r...@csrl.aoyama.ac.jp (Richard Stallman)
Newsgroups: gnu.gcc.help
Subject: Re: Is free software good in quality?
Date: 26 Nov 1994 20:15:18 -0500
Organization: GNUs Not Usenet
Lines: 6
Sender: dae...@cis.ohio-state.edu
Distribution: gnu
Message-ID: <9411270112.AA14336@green-hill.csrl.aoyama.ac.jp>
References: <9411251901.AA08951@allwise.att.com>
Reply-To: r...@gnu.ai.mit.edu

I can't get a copy of Borland C, because it is proprietary software
and I cannot agree to the terms for it.  But I can believe it has some
features worth imitating.

If they are substantial features, imitating them will probably be the
work of a long time, and require help from a number of volunteers.

Path: nntp.gmd.de!urmel.informatik.rwth-aachen.de!
newsserver.rrzn.uni-hannover.de!aix11.hrz.uni-oldenburg.de!
nordwest.germany.eu.net!pophh!Germany.EU.net!howland.reston.ans.net!
swrinde!sgiblab!cs.uoregon.edu!reuter.cse.ogi.edu!netnews.nwnet.net!
news.u.washington.edu!ghogenso
From: ghoge...@u.washington.edu (Gordon Hogenson)
Newsgroups: gnu.gcc.help
Subject: Re: Is free software good in quality?
Date: 27 Nov 1994 07:43:20 GMT
Organization: University of Washington
Lines: 40
Distribution: gnu
Message-ID: <3b9dao$bo0@nntp1.u.washington.edu>
References: <9411220421.AA09718@mole.gnu.ai.mit.edu>
NNTP-Posting-Host: stein1.u.washington.edu

r...@gnu.ai.mit.edu (Richard Stallman) writes:

>    As to the facts: we installed gcc/gdb for the students
>    taking C++ course. The result is that all of them use TurboC, even
>    though many had to pay for it. When asked, they reply
>    that a) Error reports are much more informative, and b) gdb is unusable. 

>This response amazes me, given the number of people who say just the
>opposite.  Especially people say GCC has very good error messages.  So
>I would hesitate to conclude this reflects any actual problem with GCC
>and GDB.  The criticism is vague, so there's no way of telling what
>it's based on.  Perhaps GCC and GDB are just different from what these
>people are used to.

I can tell you what it's based on--it sounds as though they're using
the DJGPP port of GDB, which is *very* alpha at this point.  A unix GDB
it is not.  It does not support C++ very well.  I believe this is due to
limitations in the debug information format.  It still crashes with
alarming frequency.

I'm less certain what they may have meant about error messages, since I
agree that GNU error messages tend to be very relevant and informative
most of the time.  However, if they were using the version of DJGPP
that was packaged with GDB, they almost certainly were using version
2.6.0 of the C++ compiler (which I am now using under DJGPP).  This
version of the compiler tends to crash frequently in the MSDOS 
environment.  The students would have seen a stack traceback and
a register dump in this case.  Under the current version, each
undeclared identifer results in a segmentation fault during compilation. 
(This is a bug reported and patched, but the patched version is not
yet available.)

Also, if the machines these students were using were at all short on
memory, compile times for cc1plus could be excruciatingly slow.

I would not advise instructors to use DJGPP for C++ instruction at
this point.     However, I should point out that the DJGPP C environment
is used by many people and is quite stable.

Gordon Hogenson

Path: bga.com!news.sprintlink.net!howland.reston.ans.net!
math.ohio-state.edu!cis.ohio-state.edu!cygnus.com!shebs
From: sh...@cygnus.com (Stan Shebs)
Newsgroups: gnu.gdb.bug
Subject: Comments about GDB
Date: 28 Nov 1994 13:12:00 -0500
Organization: GNUs Not Usenet
Lines: 16
Sender: dae...@cis.ohio-state.edu
Approved: bug-...@prep.ai.mit.edu
Distribution: gnu
Message-ID: <199411281808.KAA01381@andros.cygnus.com>
References: <9411220302.AA09493@mole.gnu.ai.mit.edu>


   Date: Mon, 21 Nov 94 22:02:35 -0500
   From: rms@gnu.ai.mit.edu (Richard Stallman)

   [...]

   `step' and `next' when the program is not running
   might as well ask the user whether to start it.
   That should take just 5 minutes to implement,
   and won't hurt anyone ever.

This has been on my agenda for awhile; you can expect it to see it
in the next release of GDB.

							Stan Shebs
							sh...@cygnus.com

Path: bga.com!news.sprintlink.net!howland.reston.ans.net!EU.net!
Austria.EU.net!newsfeed.ACO.net!news.tuwien.ac.at!rs6.iaee.tuwien.ac.at!sor
From: s...@rs6.iaee.tuwien.ac.at (Zhenya Sorokin)
Newsgroups: gnu.gcc.help
Subject: Re: Is free software good in quality?
Date: 29 Nov 1994 23:51:02 GMT
Organization: Vienna University of Technology, Austria
Lines: 61
Distribution: gnu
Message-ID: <3bgep6$d3b@news.tuwien.ac.at>
References: <9411220421.AA09718@mole.gnu.ai.mit.edu> 
<3b9dao$bo0@nntp1.u.washington.edu>
NNTP-Posting-Host: rs6.iaee.tuwien.ac.at
X-Newsreader: TIN [version 1.2 PL2]

Gordon Hogenson (ghoge...@u.washington.edu) wrote:


>I can tell you what it's based on--it sounds as though they're using
>the DJGPP port of GDB, which is *very* alpha at this point.  A unix GDB

Good point. I just checked Linux version. Yes, its help and info are
more verbose and structured, thus helping an unexperienced user.  One
of the "features" of DJGPP version is that source lines are wiped out
at the beginning (where line number + one tab stop comes).  Linux port
is better: it randomly shows lines of source (including pure comments...),
but does not wipe them.

>I'm less certain what they may have meant about error messages, since I
>agree that GNU error messages tend to be very relevant and informative

They meant compiler messages (they are _learning_ C++, so this is what
they get most of the time). And I tend to agree with them. On the
average, TC will produce longer error report, and additionally you may
get some 5..20 lines of explanation to every report, suggesting a
number of frequent causes, right at the moment. It helps, really. I
tried to find additional information on gcc error reports, but failed,
not even speaking about online info (maybe I should have tried
longer). To add, on many occasions error reports may be specific,
pointing out the position of probable error, giving identifier name,
etc. TC also seems to be somewhat better on the average.

In TC, there exists online-help for all the standard libraries + C++
syntaxis + all options, using a "flat name space":-) (i.e. one gets help
for "strn..." , no matter in which library and in which header file it
is), including usage, remarks, examples and crossrefs. For gcc on
Linux, "man "strn*"" in another virtual console will do the trick, but
there is no man for PC's. Using "info" is not a substitute, because
one spends at least half a minute to get to the item (start info,
think if "strn.." is in libc or libgpp, go to the right menu, type "s strn"
and get just a half-line remark + definition like in header file, no
crossrefs). If the support here were increased, it may have been a
great deal. Especially gcc-own functions need this. 
  

>I would not advise instructors to use DJGPP for C++ instruction at
>this point.
Have to agree :-(.
However, this may be best time to win new users. The students of today
will become main user space after 2..4 years. If the idea of free
software is going to expand, then students/newbies on PC's is a right
time and place to start. GCC has won most of the workstations' user
space available, and is approaching a standard software status (it is
also often unavoidable, too). PC's (of all sorts) is now a main
challenge (of the decade?).  Besides, workstation users will equally
benefit from adding of proven user-friendly technologies. Wasn't it a
good idea to use Mac's windowing technology?


--
Zhenya Sorokin

E-mail     : soro...@ps1.iaee.tuwien.ac.at, s...@rs6.iaee.tuwien.ac.at
Paper-mail : E. Sorokin, Gusshausstr. 27/359-9, 1040 Vienna, Austria
Voice-mail : +43(1)58801-3703, -3948
Flame-mail : /dev/null