* gdba locals buffer does not show function arguments
@ 2007-09-19 16:17 Tom Tromey
2007-09-20 11:16 ` Nick Roberts
0 siblings, 1 reply; 4+ messages in thread
From: Tom Tromey @ 2007-09-19 16:17 UTC (permalink / raw)
To: emacs-pretest-bug
Please write in English if possible, because the Emacs maintainers
usually do not have translators to read other languages for them.
Your bug report will be posted to the emacs-pretest-bug@gnu.org mailing list.
Please describe exactly what actions triggered the bug
and the precise symptoms of the bug:
I was debugging using gdba today and found that the "locals" buffer
does not show the arguments to the current function.
I expected it to show both the local variables and the function
arguments.
If Emacs crashed, and you have the Emacs process in the gdb debugger,
please include the output from the following gdb commands:
`bt full' and `xbacktrace'.
If you would like to further debug the crash, please read the file
/usr/share/emacs/22.0.990/etc/DEBUG for instructions.
In GNU Emacs 22.0.990.1 (i386-koji-linux-gnu, GTK+ Version 2.10.11)
of 2007-05-23 on xenbuilder3.fedora.phx.redhat.com
Windowing system distributor `The X.Org Foundation', version 11.0.70101000
configured using `configure '--build=i386-koji-linux-gnu' '--host=i386-koji-linux-gnu' '--target=i386-redhat-linux-gnu' '--program-prefix=' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib' '--libexecdir=/usr/libexec' '--localstatedir=/var' '--sharedstatedir=/usr/com' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--with-pop' '--with-sound' '--with-gtk' 'build_alias=i386-koji-linux-gnu' 'host_alias=i386-koji-linux-gnu' 'target_alias=i386-redhat-linux-gnu' 'CFLAGS=-DMAIL_USE_LOCKF -DSYSTEM_PURESIZE_EXTRA=16777216 -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables''
Important settings:
value of $LC_ALL: nil
value of $LC_COLLATE: nil
value of $LC_CTYPE: nil
value of $LC_MESSAGES: nil
value of $LC_MONETARY: nil
value of $LC_NUMERIC: nil
value of $LC_TIME: nil
value of $LANG: en_US.UTF-8
locale-coding-system: utf-8
default-enable-multibyte-characters: t
Major mode: C/l
Minor modes in effect:
shell-dirtrack-mode: t
auto-fill-function: tjt-c++-do-auto-fill
compilation-in-progress: (compilation grep compilation compilation compilation grep grep grep gid gid gid grep gid gid grep gid grep gid grep gid grep grep grep grep gid gid gid gid gid grep gid gid gid gid gid compilation compilation compilation grep grep grep grep gid grep compilation compilation compilation compilation compilation compilation compilation compilation gid grep grep grep grep grep grep gid gid grep compilation grep compilation compilation grep compilation grep gid grep gid gid grep grep gid)
erc-menu-mode: t
erc-autojoin-mode: t
erc-ring-mode: t
erc-pcomplete-mode: t
erc-track-mode: t
erc-track-minor-mode: t
erc-match-mode: t
erc-button-mode: t
erc-fill-mode: t
erc-stamp-mode: t
erc-netsplit-mode: t
erc-spelling-mode: t
erc-truncate-mode: t
flyspell-mode: t
erc-status-mode: t
erc-services-mode: t
erc-irccontrols-mode: t
erc-noncommands-mode: t
erc-readonly-mode: t
tooltip-mode: t
mouse-wheel-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
unify-8859-on-encoding-mode: t
utf-translate-cjk-mode: t
auto-compression-mode: t
line-number-mode: t
transient-mark-mode: t
abbrev-mode: t
Recent input:
<return> <down-mouse-1> <mouse-movement> <mouse-1>
C-x 3 <down-mouse-1> <mouse-1> C-x b c p - <tab> o
<tab> <return> C-x k <return> x C-/ C-x b c p <tab>
<return> <help-echo> <down-mouse-1> <mouse-1> c <return>
c <return> c <return> c <return> c <return> c <return>
<return> <return> <return> <return> <return> <return>
<return> <return> <return> <return> <return> <return>
<return> <return> <return> <return> <return> <return>
<return> i n f o SPC b <return> r <return> y <return>
c SPC 7 7 <return> c <return> r <return> y <return>
i n f o SPC b <return> c SPC 7 6 <return> p t SPC f
r o m <return> M-v C-l C-u C-n C-l C-n C-l C-n C-l
C-l C-l C-l C-l C-l C-l C-l C-l M-> C-c C-n C-c C-n
C-c C-n i n f o SPC l o c a l <return> i n o SPC a
r g <return> M-p C-a C-f C-f f <return> C-z o C-h i
d m e m a c s <return> s g d b <return> m <return>
1 SPC <backspace> <switch-frame> <help-echo> <switch-frame>
<switch-frame> <help-echo> <help-echo> <help-echo>
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo>
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo>
<help-echo> <help-echo> <help-echo> <switch-frame>
<down-mouse-5> <mouse-5> <switch-frame> M-x <help-echo>
g d b - d i s p l a <tab> <tab> <tab> C-g <switch-frame>
<switch-frame> <down-mouse-1> <mouse-1> C-h m <help-echo>
<help-echo> <down-mouse-5> <mouse-5> <down-mouse-5>
<mouse-5> <double-down-mouse-5> <double-mouse-5> <triple-down-mouse-5>
<triple-mouse-5> <triple-down-mouse-5> <triple-mouse-5>
<down-mouse-1> <mouse-1> <next> <next> <next> <next>
<next> <next> <next> <next> <next> <next> <prior> <prior>
<prior> <prior> <prior> <prior> <prior> <prior> <prior>
<prior> <prior> <prior> <prior> <prior> <prior> <prior>
C-c b <help-echo> <down-mouse-1> <mouse-1> <help-echo>
<help-echo> <switch-frame> x b C-g C-g l C-x b * l
o <tab> <tab> SPC C-v n C-z o M-x r e p o r t - e m
<tab> b <tab> <return>
Recent messages:
uncompressing emacs-1.gz...done
uncompressing emacs-4.gz...done
Making completion list...
Quit
Type C-x 4 C-o RET to restore the other window.
call-interactively: End of buffer
call-interactively: Beginning of buffer [4 times]
Mark set
Quit [2 times]
QuitError during redisplay: (quit)
Tom
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: gdba locals buffer does not show function arguments
2007-09-19 16:17 gdba locals buffer does not show function arguments Tom Tromey
@ 2007-09-20 11:16 ` Nick Roberts
2007-09-20 16:01 ` Tom Tromey
0 siblings, 1 reply; 4+ messages in thread
From: Nick Roberts @ 2007-09-20 11:16 UTC (permalink / raw)
To: Tom Tromey; +Cc: emacs-pretest-bug
> I was debugging using gdba today and found that the "locals" buffer
> does not show the arguments to the current function.
Yes, but they are shown in the stack buffer with their value (although the type
isn't given). This is due to the underlyng GDB CLI command "info stack". The
"locals" buffer currently uses the output of "info locals". The output of
"info args" could also be used but that would result in duplication.
> I expected it to show both the local variables and the function
> arguments.
Eventually Emacs will use GDB/MI instead of annotations. The GDB/MI commands
"-stack-list-locals", "-stack-list-arguments" and "-stack-list-frames"
will allow the arguments to be shown in the locals buffer and not the
stack buffer.
--
Nick http://www.inet.net.nz/~nickrob
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: gdba locals buffer does not show function arguments
2007-09-20 11:16 ` Nick Roberts
@ 2007-09-20 16:01 ` Tom Tromey
2007-09-21 7:38 ` Nick Roberts
0 siblings, 1 reply; 4+ messages in thread
From: Tom Tromey @ 2007-09-20 16:01 UTC (permalink / raw)
To: Nick Roberts; +Cc: emacs-pretest-bug
>>>>> "Nick" == Nick Roberts <nickrob@snap.net.nz> writes:
>> I was debugging using gdba today and found that the "locals" buffer
>> does not show the arguments to the current function.
Nick> Yes, but they are shown in the stack buffer with their value
Nick> (although the type isn't given). This is due to the underlyng
Nick> GDB CLI command "info stack". The "locals" buffer currently
Nick> uses the output of "info locals". The output of "info args"
Nick> could also be used but that would result in duplication.
Yeah, I did notice the info in the stack window. I found that harder
to read, though. The locals window is more nicely formatted. Also,
lines in the stack window are truncated; so if you have a long
function name, some values may be hidden.
I don't understand why gdb differentiates between locals and
arguments. And I don't think that Emacs necessarily has to follow
this distinction.
Tom
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: gdba locals buffer does not show function arguments
2007-09-20 16:01 ` Tom Tromey
@ 2007-09-21 7:38 ` Nick Roberts
0 siblings, 0 replies; 4+ messages in thread
From: Nick Roberts @ 2007-09-21 7:38 UTC (permalink / raw)
To: tromey; +Cc: emacs-pretest-bug
> Yeah, I did notice the info in the stack window. I found that harder
> to read, though. The locals window is more nicely formatted. Also,
> lines in the stack window are truncated; so if you have a long
> function name, some values may be hidden.
>
> I don't understand why gdb differentiates between locals and
> arguments. And I don't think that Emacs necessarily has to follow
> this distinction.
I _could_ parse the arguments out of the stack buffer so that they're not
duplicated, but since the plan is to migrate to GDB/MI I don't think it's worth
the effort. I hear what you say though and I'll try to implement this design
in the future with MI commands.
--
Nick http://www.inet.net.nz/~nickrob
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2007-09-21 7:38 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-19 16:17 gdba locals buffer does not show function arguments Tom Tromey
2007-09-20 11:16 ` Nick Roberts
2007-09-20 16:01 ` Tom Tromey
2007-09-21 7:38 ` Nick Roberts
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
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).