* emacs gdb layout
@ 2009-01-19 9:57 Ritchie
2009-01-19 20:17 ` Nick Roberts
[not found] ` <mailman.5276.1232398209.26697.help-gnu-emacs@gnu.org>
0 siblings, 2 replies; 11+ messages in thread
From: Ritchie @ 2009-01-19 9:57 UTC (permalink / raw)
To: help-gnu-emacs
After start gdb inside emacs with option "--annotation=3 --fullname",
I ran gdb-many-windows to get the gdb layout which contains the local
variable buffer, stack frame buffer and breakpoint buffers. However
these buffers do not show anything as I run debugger. In order to get
local buffer to display local variable values, stack frame buffer to
display stack status and break point display current breakpoint info
as I run the debugger, what am I missing?
Thank you in advance
- R
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: emacs gdb layout
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>
1 sibling, 0 replies; 11+ messages in thread
From: Nick Roberts @ 2009-01-19 20:17 UTC (permalink / raw)
To: Ritchie; +Cc: help-gnu-emacs
Ritchie writes:
> After start gdb inside emacs with option "--annotation=3 --fullname",
The gdb option is "--annotate=3" so this wouldn't run at all. Gdb should
start woth only one of these options and with M-x gdb it should be
"--annotate=3" for the graphical interface. For text mode, i.e, like
Emacs 21, use M-x gud-gdb which will give you "--fullname".
> I ran gdb-many-windows to get the gdb layout which contains the local
> variable buffer, stack frame buffer and breakpoint buffers. However
> these buffers do not show anything as I run debugger. In order to get
> local buffer to display local variable values, stack frame buffer to
> display stack status and break point display current breakpoint info
> as I run the debugger, what am I missing?
I suggest uou read the debuggers section of the Emacs manual.
--
Nick http://www.inet.net.nz/~nickrob
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: emacs gdb layout
[not found] ` <mailman.5276.1232398209.26697.help-gnu-emacs@gnu.org>
@ 2009-01-20 2:42 ` Ritchie
2009-01-20 4:19 ` Nick Roberts
2009-01-20 9:29 ` Richard Riley
0 siblings, 2 replies; 11+ messages in thread
From: Ritchie @ 2009-01-20 2:42 UTC (permalink / raw)
To: help-gnu-emacs
> 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
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: emacs gdb layout
2009-01-20 2:42 ` Ritchie
@ 2009-01-20 4:19 ` Nick Roberts
2009-01-20 9:29 ` Richard Riley
1 sibling, 0 replies; 11+ messages in thread
From: Nick Roberts @ 2009-01-20 4:19 UTC (permalink / raw)
To: Ritchie; +Cc: help-gnu-emacs
Ritchie writes:
> > 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.
I don't understand how you reach that conclusion. Generally you shouldn't need
to change the value of gud-gdb-command-name unless your executable has a
different name. It should work for you if you leave it at it's original value
"gdb --annotate=3"
> 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...
No, it won't if you use undocumented settings.
--
Nick http://www.inet.net.nz/~nickrob
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: emacs gdb layout
2009-01-20 2:42 ` Ritchie
2009-01-20 4:19 ` Nick Roberts
@ 2009-01-20 9:29 ` Richard Riley
2009-01-21 2:56 ` faraz ahmed
1 sibling, 1 reply; 11+ messages in thread
From: Richard Riley @ 2009-01-20 9:29 UTC (permalink / raw)
To: help-gnu-emacs
Ritchie <ritchiecai@gmail.com> writes:
>> 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.
Try cleaning everything out.
(caveat, I use emacs 23 ut I'm fairly sure it worked in Emacs 22 like
this too).
I, using the code from here :
http://richardriley.net/default/projects/emacs/dotprogramming#sec-1.2
run gdb which then prompts (search for f12)
"gdb --annotate=3 progname"
And I get something like:
http://richardriley.net/default/projects/images/gud.png
good luck!
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: emacs gdb layout
2009-01-20 9:29 ` Richard Riley
@ 2009-01-21 2:56 ` faraz ahmed
2009-01-21 3:10 ` faraz ahmed
2009-01-21 7:49 ` Richard Riley
0 siblings, 2 replies; 11+ messages in thread
From: faraz ahmed @ 2009-01-21 2:56 UTC (permalink / raw)
To: help-gnu-emacs
On Jan 20, 1:29 am, Richard Riley <rileyrg...@gmail.com> wrote:
> Ritchie <ritchie...@gmail.com> writes:
> >> 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.
>
> Try cleaning everything out.
>
> (caveat, I use emacs 23 ut I'm fairly sure it worked in Emacs 22 like
> this too).
>
> I, using the code from here :
>
> http://richardriley.net/default/projects/emacs/dotprogramming#sec-1.2
>
> run gdb which then prompts (search for f12)
>
> "gdb --annotate=3 progname"
>
> And I get something like:
>
> http://richardriley.net/default/projects/images/gud.png
>
> good luck!
--annotate=3 & --fullpath are _SORT_ of incompatible.
If you invoke GDB with both the options (i.e fullpath and annot =3)
the annotation level is _SILENTLY_ set to 1, you can check this by
trying "gdb> show annotation". With the annotation set to 1 (albeit
silently) your local,stack etc window cannot be displayed.My advice
would be try giving up the need to specify --fullpath along with
annotation=3, read up on GDB/M1 and experiment :)
Just do away with the need of specifying --fullpath and let
annotation=3 as is.
-Faraz.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: emacs gdb layout
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
1 sibling, 1 reply; 11+ messages in thread
From: faraz ahmed @ 2009-01-21 3:10 UTC (permalink / raw)
To: help-gnu-emacs
On Jan 20, 6:56 pm, faraz ahmed <faraz.sha...@gmail.com> wrote:
> On Jan 20, 1:29 am, Richard Riley <rileyrg...@gmail.com> wrote:
>
>
>
> > Ritchie <ritchie...@gmail.com> writes:
> > >> 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.
>
> > Try cleaning everything out.
>
> > (caveat, I use emacs 23 ut I'm fairly sure it worked in Emacs 22 like
> > this too).
>
> > I, using the code from here :
>
> >http://richardriley.net/default/projects/emacs/dotprogramming#sec-1.2
>
> > run gdb which then prompts (search for f12)
>
> > "gdb --annotate=3 progname"
>
> > And I get something like:
>
> >http://richardriley.net/default/projects/images/gud.png
>
> > good luck!
>
> --annotate=3 & --fullpath are _SORT_ of incompatible.
> If you invoke GDB with both the options (i.e fullpath and annot =3)
> the annotation level is _SILENTLY_ set to 1, you can check this by
> trying "gdb> show annotation". With the annotation set to 1 (albeit
> silently) your local,stack etc window cannot be displayed.My advice
> would be try giving up the need to specify --fullpath along with
> annotation=3, read up on GDB/M1 and experiment :)
>
> Just do away with the need of specifying --fullpath and let
> annotation=3 as is.
>
> -Faraz.
that would be gdb> show annotate
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: emacs gdb layout
2009-01-21 3:10 ` faraz ahmed
@ 2009-01-21 5:09 ` faraz ahmed
0 siblings, 0 replies; 11+ messages in thread
From: faraz ahmed @ 2009-01-21 5:09 UTC (permalink / raw)
To: help-gnu-emacs
On Jan 20, 7:10 pm, faraz ahmed <faraz.sha...@gmail.com> wrote:
> On Jan 20, 6:56 pm, faraz ahmed <faraz.sha...@gmail.com> wrote:
>
>
>
> > On Jan 20, 1:29 am, Richard Riley <rileyrg...@gmail.com> wrote:
>
> > > Ritchie <ritchie...@gmail.com> writes:
> > > >> 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.
>
> > > Try cleaning everything out.
>
> > > (caveat, I use emacs 23 ut I'm fairly sure it worked in Emacs 22 like
> > > this too).
>
> > > I, using the code from here :
>
> > >http://richardriley.net/default/projects/emacs/dotprogramming#sec-1.2
>
> > > run gdb which then prompts (search for f12)
>
> > > "gdb --annotate=3 progname"
>
> > > And I get something like:
>
> > >http://richardriley.net/default/projects/images/gud.png
>
> > > good luck!
>
> > --annotate=3 & --fullpath are _SORT_ of incompatible.
> > If you invoke GDB with both the options (i.e fullpath and annot =3)
> > the annotation level is _SILENTLY_ set to 1, you can check this by
> > trying "gdb> show annotation". With the annotation set to 1 (albeit
> > silently) your local,stack etc window cannot be displayed.My advice
> > would be try giving up the need to specify --fullpath along with
> > annotation=3, read up on GDB/M1 and experiment :)
>
> > Just do away with the need of specifying --fullpath and let
> > annotation=3 as is.
>
> > -Faraz.
>
> that would be gdb> show annotate
OK. try setting gdb> set annotate 3 after breaking into the target
program.
-Faraz
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: emacs gdb layout
2009-01-21 2:56 ` faraz ahmed
2009-01-21 3:10 ` faraz ahmed
@ 2009-01-21 7:49 ` Richard Riley
2009-01-22 3:02 ` faraz ahmed
1 sibling, 1 reply; 11+ messages in thread
From: Richard Riley @ 2009-01-21 7:49 UTC (permalink / raw)
To: help-gnu-emacs
faraz ahmed <faraz.shaikh@gmail.com> writes:
> On Jan 20, 1:29 am, Richard Riley <rileyrg...@gmail.com> wrote:
>> Ritchie <ritchie...@gmail.com> writes:
>> >> 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.
>>
>> Try cleaning everything out.
>>
>> (caveat, I use emacs 23 ut I'm fairly sure it worked in Emacs 22 like
>> this too).
>>
>> I, using the code from here :
>>
>> http://richardriley.net/default/projects/emacs/dotprogramming#sec-1.2
>>
>> run gdb which then prompts (search for f12)
>>
>> "gdb --annotate=3 progname"
>>
>> And I get something like:
>>
>> http://richardriley.net/default/projects/images/gud.png
>>
>> good luck!
>
> --annotate=3 & --fullpath are _SORT_ of incompatible.
> If you invoke GDB with both the options (i.e fullpath and annot =3)
> the annotation level is _SILENTLY_ set to 1, you can check this by
> trying "gdb> show annotation". With the annotation set to 1 (albeit
> silently) your local,stack etc window cannot be displayed.My advice
> would be try giving up the need to specify --fullpath along with
> annotation=3, read up on GDB/M1 and experiment :)
>
> Just do away with the need of specifying --fullpath and let
> annotation=3 as is.
>
> -Faraz.
Where did fullpath come into it? Did I miss a post in the thread or did
you spot something elsewhere?
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: emacs gdb layout
2009-01-21 7:49 ` Richard Riley
@ 2009-01-22 3:02 ` faraz ahmed
2009-01-22 15:08 ` Ritchie
0 siblings, 1 reply; 11+ messages in thread
From: faraz ahmed @ 2009-01-22 3:02 UTC (permalink / raw)
To: help-gnu-emacs
On Jan 20, 11:49 pm, Richard Riley <rileyrg...@gmail.com> wrote:
> faraz ahmed <faraz.sha...@gmail.com> writes:
> > On Jan 20, 1:29 am, Richard Riley <rileyrg...@gmail.com> wrote:
> >> Ritchie <ritchie...@gmail.com> writes:
> >> >> 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.
>
> >> Try cleaning everything out.
>
> >> (caveat, I use emacs 23 ut I'm fairly sure it worked in Emacs 22 like
> >> this too).
>
> >> I, using the code from here :
>
> >>http://richardriley.net/default/projects/emacs/dotprogramming#sec-1.2
>
> >> run gdb which then prompts (search for f12)
>
> >> "gdb --annotate=3 progname"
>
> >> And I get something like:
>
> >>http://richardriley.net/default/projects/images/gud.png
>
> >> good luck!
>
> > --annotate=3 & --fullpath are _SORT_ of incompatible.
> > If you invoke GDB with both the options (i.e fullpath and annot =3)
> > the annotation level is _SILENTLY_ set to 1, you can check this by
> > trying "gdb> show annotation". With the annotation set to 1 (albeit
> > silently) your local,stack etc window cannot be displayed.My advice
> > would be try giving up the need to specify --fullpath along with
> > annotation=3, read up on GDB/M1 and experiment :)
>
> > Just do away with the need of specifying --fullpath and let
> > annotation=3 as is.
>
> > -Faraz.
>
> Where did fullpath come into it? Did I miss a post in the thread or did
> you spot something elsewhere?
After start gdb inside emacs with option "--annotation=3 --fullname",
--fullname As in the first post .
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: emacs gdb layout
2009-01-22 3:02 ` faraz ahmed
@ 2009-01-22 15:08 ` Ritchie
0 siblings, 0 replies; 11+ messages in thread
From: Ritchie @ 2009-01-22 15:08 UTC (permalink / raw)
To: help-gnu-emacs
Thanks guys. I kind of messed up. After removing "--fullname" option,
everything works like a charm.
regards
- R
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2009-01-22 15:08 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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
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).