Emacs Mode for GDB

A graphical user interface is an essential part of any modern debugger. This mode provides one, without losing the power of Emacs.
Conclusion

Richard Stallman is the original author of both Emacs and GDB, and at the start of the GNU Project, both programs were distributed on the same tape. Each program has become more complex and now has its own repositories, developers and mailing lists. However, there is a natural relationship between the editor and the debugger, and the mode I have described here tries to re-inforce this idea.

Nick Roberts worked for 20 years as a research engineer for a major aerospace company in the United Kingdom. He recently moved to New Zealand with his family for a better quality of life. Nick can be reached at nickrob@snap.net.nz.

______________________

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

The "hard R" version

Anonymous's picture

The "hard R" versions could be shown on a few cable channels, like the Playboy Channel, and the X-rated versions could be bought in a few video stores or by mail. This belief is now in bbw femdom. Two actors, Darren James and Lara Roxx, initially tested positive, and were barred from further sexually explicit content production. This belief is now in doubt.

So what should we do

buycialisonline's picture

So what should we do? Life is life.

Regarding Emacs's steep learning curve

Daniel's picture

I exclusively use Emacs for text editing for more than 7 years, but yet, I am amazed how difficult it is to get the basic things working. So much so that I wonder if there is another better text editor that all others are using behind my back and leave Emacs in its historic state.

(1)
I used both Emacs and XEmacs on Linux and on Windows. Recently, I was spending many hours trying to get XEmacs on Windows to always produce Windows text file format, but I couldn't find documentation with a solution that worked.

On Linux, I can do this:
C-x RET c iso-8859-1-dos C-x C-f msdos.txt

But on Windows, I haven't found out what I need to do to make iso-8859-1-dos available to me.

(2) I spent hours trying to find out how to stop Emacs from producing the file.txt~ backup files.

(3) I haven't found out how to stop Emacs from complaining about the absence of an ending-newline character. (I might have turned it on to try it out but forgot where I did that.)

I guess, in general, Emacs has so many features that I love, but why this editor has to cause so much wasted hours for things that supposedly are so easy to accomplish? In this regards, Emacs is still failing to be a pure productivity tool.

Please enlighten me if you know the answer to the above questions and also direct me to the right direction so that I won't be "so miserable" continually wasting time trying to "fix Emacs." Is my problem dued to me not having read a book about the Emacs editor? Or is my problem an isolated one that nobody else has to face?

Thanks,

Daniel.

Emacs help

Kai Grossjohann's picture

(1) (Problem to choose line endings in XEmacs on Windows.)

XEmacs comes in two variants, with Mule or without Mule. I believe that the Windows port is only available in the without-Mule variant. The C-x RET c command (like the other C-x RET commands) is something specific to Mule.

Generally speaking, you are comparing Emacs on GNU/Linux with XEmacs on Windows, and that is partly a comparison of GNU/Linux to Windows, but it is also to a significant degree a comparison of Emacs with XEmacs.

(2) (How to turn off backup files?)

Apropos is your friend. Try M-x apropos RET backup RET. It gives a list of considerable length, but the variable make-backup-files is amongst them. Note that M-x apropos RET and C-h a are two different things. Further note that make-backup-files exists in Emacs, but I'm not sure about XEmacs.

Perhaps you will like the backup-directory-alist variable? That way you can gather backup files in a central directory.

(3) (Emacs complains about missing newline at end of file.)

Apropos, once again, is your friend. M-x apropos RET newline RET and you will see the variable require-final-newline (or is it newlines?).

Does this (or apropos, your friend :-) help?

Kai

I hope they fix the icons

hackerb9's picture

I hope they fix the icons before the 21.4 release. It seems a bit ridiculous to click "go" and "stop" to set and delete break points. Couldn't they have just created new icons? Heck, here's one they could use:

    ppmmake darkgreen 32 32 | ppmlabel -color black -text "set" > set.ppm

While this isn't as big of a human--computer interface blunder as AfterStep's decision to use the recycle bin to logout, I don't want to be apologizing when I'm helping people learn emacs & gdb.

By the way, this mode, especially the "watch expressions" feature, is something I'm very happy to see in the default Emacs. It's always been possible, but now it's easy.

--Ben

Re: I hope they fix the icons

Nick's picture

I agree that the "stop" and "go" are ambiguous. When they were created
it was not possible to create/delete a breakpoint by clicking on the
fringe. Maybe they're not necessary and could be removed now.

Toolbar icons should try to be internationally meaningful. The "stop" icon uses a road sign shape that is used in many countries. The example
that you offer might be meaningful to you but probably wouldn't make
much sense to a user in Thailand, say.

You don't need to apologise to people for the shortcomings of Emacs,
just point out it provide an opportunity to contribute something better. Emacs badly needs a graphic designer. Finding one that is
computer literate and willing to give up his time is not easy.

Anyway, thanks for the feedback.

Nick

I agree that the "stop" and "

Nick's picture

I agree that the "stop" and "go" are ambiguous. When they were created
it was not possible to create/delete a breakpoint by clicking on the
fringe. Maybe they're not necessary and could be removed now.

Toolbar icons should try to be internationally meaningful. The "stop" icon uses a road sign shape that is used in many countries. The example
that you offer might be meaningful to you but probably wouldn't make
much sense to a user in Thailand, say.

You don't need to apologise to people for the shortcomings of Emacs,
just point out it provide an opportunity to contribute something better. Emacs badly needs a graphic designer. Finding one that is
computer literate and willing to give up his time is not easy.

Anyway, thanks for the feedback.

Nick

Ummm. . . DDD

James Klaas's picture

Doesn't DDD exist any more? That's a great GUI for a wide variety of debuggers, including perl,java and ever since I started using it in the mid '90s, GDB.

James

Re: Ummm...DDD

Nick's picture

DDD is an excellent front-end, and another example of one that requires
a separate editor. However, the article was not intended as a review
of front ends to GDB.

Webinar
One Click, Universal Protection: Implementing Centralized Security Policies on Linux Systems

As Linux continues to play an ever increasing role in corporate data centers and institutions, ensuring the integrity and protection of these systems must be a priority. With 60% of the world's websites and an increasing share of organization's mission-critical workloads running on Linux, failing to stop malware and other advanced threats on Linux can increasingly impact an organization's reputation and bottom line.

Learn More

Sponsored by Bit9

Webinar
Linux Backup and Recovery Webinar

Most companies incorporate backup procedures for critical data, which can be restored quickly if a loss occurs. However, fewer companies are prepared for catastrophic system failures, in which they lose all data, the entire operating system, applications, settings, patches and more, reducing their system(s) to “bare metal.” After all, before data can be restored to a system, there must be a system to restore it to.

In this one hour webinar, learn how to enhance your existing backup strategies for better disaster recovery preparedness using Storix System Backup Administrator (SBAdmin), a highly flexible bare-metal recovery solution for UNIX and Linux systems.

Learn More

Sponsored by Storix