unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* How to set break points in C?
@ 2008-08-24 19:38 Louise Hoffman
  2008-08-24 20:04 ` Pascal J. Bourguignon
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Louise Hoffman @ 2008-08-24 19:38 UTC (permalink / raw)
  To: help-gnu-emacs

Dear readers,

I am about to learn C, and the teacher recommends that we use Eclipse-
CDT.

I would prefer to use emacs, but how do I set break points?

Does there exist a guide on debugging C code using emacs?

Lots of love,
Louise


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

* Re: How to set break points in C?
  2008-08-24 19:38 How to set break points in C? Louise Hoffman
@ 2008-08-24 20:04 ` Pascal J. Bourguignon
  2008-08-24 20:08 ` Richard G Riley
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 6+ messages in thread
From: Pascal J. Bourguignon @ 2008-08-24 20:04 UTC (permalink / raw)
  To: help-gnu-emacs

Louise Hoffman <louise.hoffman@gmail.com> writes:

> Dear readers,
>
> I am about to learn C, and the teacher recommends that we use Eclipse-
> CDT.
>
> I would prefer to use emacs, but how do I set break points?

Start with M-x gdb RET

> Does there exist a guide on debugging C code using emacs?

I guess so.  To answer precisely, I would have to use google.  Perhaps
you could try it yourself.


-- 
__Pascal Bourguignon__                     http://www.informatimago.com/

"By filing this bug report you have challenged the honor of my
family. Prepare to die!"


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

* Re: How to set break points in C?
  2008-08-24 19:38 How to set break points in C? Louise Hoffman
  2008-08-24 20:04 ` Pascal J. Bourguignon
@ 2008-08-24 20:08 ` Richard G Riley
  2008-08-24 22:19 ` Peter Dyballa
  2008-08-24 23:51 ` David Hansen
  3 siblings, 0 replies; 6+ messages in thread
From: Richard G Riley @ 2008-08-24 20:08 UTC (permalink / raw)
  To: help-gnu-emacs

Louise Hoffman <louise.hoffman@gmail.com> writes:

> Dear readers,
>
> I am about to learn C, and the teacher recommends that we use Eclipse-
> CDT.
>
> I would prefer to use emacs, but how do I set break points?
>
> Does there exist a guide on debugging C code using emacs?
>
> Lots of love,
> Louise

http://www.emacswiki.org/cgi-bin/wiki/GrandUnifiedDebugger


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

* Re: How to set break points in C?
  2008-08-24 19:38 How to set break points in C? Louise Hoffman
  2008-08-24 20:04 ` Pascal J. Bourguignon
  2008-08-24 20:08 ` Richard G Riley
@ 2008-08-24 22:19 ` Peter Dyballa
  2008-08-24 23:51 ` David Hansen
  3 siblings, 0 replies; 6+ messages in thread
From: Peter Dyballa @ 2008-08-24 22:19 UTC (permalink / raw)
  To: Louise Hoffman; +Cc: help-gnu-emacs


Am 24.08.2008 um 21:38 schrieb Louise Hoffman:

> I would prefer to use emacs, but how do I set break points?

By writing statements into the .gdbinit file – one comes with GNU  
Emacs source. It's more fun preparing this file than doing so many  
things interactively. You'll need gdb, the GNU Debugger, on your  
system. It does not come with GNU Emacs.

>
> Does there exist a guide on debugging C code using emacs?


In info-mode you'll find the Gdb node. The node comes with Gdb.

--
Greetings

   Pete

It's not the valleys in life I dread so much as the dips.
				– Garfield







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

* Re: How to set break points in C?
  2008-08-24 19:38 How to set break points in C? Louise Hoffman
                   ` (2 preceding siblings ...)
  2008-08-24 22:19 ` Peter Dyballa
@ 2008-08-24 23:51 ` David Hansen
  2008-08-28 17:48   ` giglio robbo' d'acciaio
  3 siblings, 1 reply; 6+ messages in thread
From: David Hansen @ 2008-08-24 23:51 UTC (permalink / raw)
  To: help-gnu-emacs

On Sun, 24 Aug 2008 12:38:14 -0700 (PDT) Louise Hoffman wrote:

> I would prefer to use emacs, but how do I set break points?

With the shiny GDB UI: Just C-x SPC in the source buffer (note that you
may have to interrupt the program first if it's running).

> Does there exist a guide on debugging C code using emacs?

The Emacs and GDB manuals.

David





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

* Re: How to set break points in C?
  2008-08-24 23:51 ` David Hansen
@ 2008-08-28 17:48   ` giglio robbo' d'acciaio
  0 siblings, 0 replies; 6+ messages in thread
From: giglio robbo' d'acciaio @ 2008-08-28 17:48 UTC (permalink / raw)
  To: help-gnu-emacs

David Hansen <david.hansen@gmx.net> writes:

>> Does there exist a guide on debugging C code using emacs?
>
> The Emacs and GDB manuals.

Don't forget to compile you C sources with the gdb option otherwise the
debugger won't be able to debug anything.
-- 
      Daniele Giglio      Dona i tuoi cicli di clock alla ricerca!
      email in ROT13      http://boinc.berkeley.edu/
      qtvtyvb@vby.vg
                          --------------------
  "I miei genitori mi mandano spesso a trascorrere l'estate coi nonni.
  Ma io detesto i cimiteri."
  		-- Chris Fonseca





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

end of thread, other threads:[~2008-08-28 17:48 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-24 19:38 How to set break points in C? Louise Hoffman
2008-08-24 20:04 ` Pascal J. Bourguignon
2008-08-24 20:08 ` Richard G Riley
2008-08-24 22:19 ` Peter Dyballa
2008-08-24 23:51 ` David Hansen
2008-08-28 17:48   ` giglio robbo' d'acciaio

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).