From: Ritchie <ritchiecai@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: emacs gdb layout
Date: Mon, 19 Jan 2009 18:42:23 -0800 (PST) [thread overview]
Message-ID: <40829af1-80e7-42fe-8599-10470492135a@f40g2000pri.googlegroups.com> (raw)
In-Reply-To: mailman.5276.1232398209.26697.help-gnu-emacs@gnu.org
> After start gdb inside emacs with option "--annotation=3 --fullname",
Sorry, that was a typo, what I had in my .emacs originally was
(setq gud-gdb-command-name "gdb --annotate=3 --fullname")
which I think is correct.
The version I'm using is Carbon Emacs (emacs 22)
> I suggest uou read the debuggers section of the Emacs manual.
I read the manual, but it didn't work out very well. The manual says
"If gdb-many-windows is non-nil, then M-x gdb displays the following
frame layout "
but when I have the following lines in my .emacs:
(setq gdb-many-windows t)
(setq gdb-use-separate-io-buffer t)
and run M-x gdb, i still just get the simple layout. I have to bring
out the default
frame layout by giving another two M-x gdb-many-windows. The first one
is to
disable it, the second one is to enable it again, and then the frame
layout will
show up. So I just remove the (setq gdb-many-windows t) from .emacs,
and
run it manually everytime after I start gdb.
my problem is that in those buffers, locals, stack, breakpoints, there
is nothing
displayed as I run the program in gdb. In the manual, it just tells
you how to use
the buffer, e.g. click on a variable in local buffer to change the
value, but in mine,
it doesn't display any local variables, even if there is in the code.
Here is the screenshot:
http://cs655-1.ias.csusb.edu:8080/~zcai/layout.png
I'm not sure if it is normal but it would be nice if I could get it to
work like yours.
http://users.snap.net.nz/~nickrob/multi-threaded.png
Did you give any commands for those buffers to display the contents?
And by the way, here is my configuration for gdb in my .emacs :
;; ===================================================================
;; Add color to the current GUD line (obrigado google)
;; ===================================================================
(defvar gud-overlay
(let* ((ov (make-overlay (point-min) (point-min))))
(overlay-put ov 'face 'secondary-selection)
ov)
"Overlay variable for GUD highlighting.")
(defadvice gud-display-line (after my-gud-highlight act)
"Highlight current line."
(let* ((ov gud-overlay)
(bf (gud-find-file true-file)))
(save-excursion
(set-buffer bf)
(move-overlay ov (line-beginning-position) (line-
end-position)
(current-buffer)))))
(defun gud-kill-buffer ()
(if (eq major-mode 'gud-mode)
(delete-overlay gud-overlay)))
(add-hook 'kill-buffer-hook 'gud-kill-buffer)
;; =================================
;; GDB configuration
;; =================================
(require 'gud)
(require 'gdb-ui)
(setq gud-gdb-command-name "gdb --annotate=3 --fullname")
(setq gdb-many-windows t)
(setq gdb-use-separate-io-buffer t)
;;(add-hook 'gdb-mode-hook '(lambda () (require 'gdb-highlight)))
(add-hook 'gud-mode-hook
'(lambda ()
(local-set-key [home] ; move to beginning of line,
after prompt
'comint-bol)
(local-set-key [up] ; cycle backward through
command history
'(lambda () (interactive)
(if (comint-after-pmark-p)
(comint-previous-input 1)
(previous-line 1))))
(local-set-key [down] ; cycle forward through
command history
'(lambda () (interactive)
(if (comint-after-pmark-p)
(comint-next-input 1)
(forward-line 1))))
))
Thank you
- R
next prev parent reply other threads:[~2009-01-20 2:42 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-19 9:57 emacs gdb layout Ritchie
2009-01-19 20:17 ` Nick Roberts
[not found] ` <mailman.5276.1232398209.26697.help-gnu-emacs@gnu.org>
2009-01-20 2:42 ` Ritchie [this message]
2009-01-20 4:19 ` Nick Roberts
2009-01-20 9:29 ` Richard Riley
2009-01-21 2:56 ` faraz ahmed
2009-01-21 3:10 ` faraz ahmed
2009-01-21 5:09 ` faraz ahmed
2009-01-21 7:49 ` Richard Riley
2009-01-22 3:02 ` faraz ahmed
2009-01-22 15:08 ` Ritchie
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=40829af1-80e7-42fe-8599-10470492135a@f40g2000pri.googlegroups.com \
--to=ritchiecai@gmail.com \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.