* gdb and emacs
@ 2003-01-11 10:48 Shankar K E
2003-01-20 7:50 ` Lee Sau Dan
0 siblings, 1 reply; 2+ messages in thread
From: Shankar K E @ 2003-01-11 10:48 UTC (permalink / raw)
Hi,
I want to display line numbers when I am debugging using gdb under emacs
(using gud).
The source file is displayed in the other window, I need line numbers to
be displayed along with the source file. I want this to happen only when
I use gdb under emacs.
How do I start gud after the environment settings have been changed,
gud seems to be using the settings when emacs started off from the
shell.
I restart emacs whenever there is a change in the environment, could
you suggest me an alternative option.
Also Is there any environment variable which is set if I am within a
emacs session. I would like to do some additional processing in my
.bashrc when emacs is launched.
Please let me know on how to go about it.
Thanks in Advance
--
Shankar
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: gdb and emacs
2003-01-11 10:48 gdb and emacs Shankar K E
@ 2003-01-20 7:50 ` Lee Sau Dan
0 siblings, 0 replies; 2+ messages in thread
From: Lee Sau Dan @ 2003-01-20 7:50 UTC (permalink / raw)
>>>>> "Shankar" == Shankar K E <shankar_k_e@hotmail.com> writes:
Shankar> Hi, I want to display line numbers when I am debugging
Shankar> using gdb under emacs (using gud).
Are you sure? I never need the line numbers, because Emacs (gud)
takes care of them and shows me the current line automatically. For
setting breakpoint, go to the source file and then C-x SPC.
Shankar> How do I start gud after the environment settings have
Shankar> been changed, gud seems to be using the settings when
Shankar> emacs started off from the shell.
B'cos environments are inherited by child processes from their
parents. When you start the gdb process from gud/Emacs, it of course
inherits the environment of Emacs.
Shankar> I restart emacs whenever there is a change in the
Shankar> environment, could you suggest me an alternative option.
(setenv "FOO" "BAR")
(getenv "FOO")
I often do these in the *scratch* buffer (lisp-interaction-mode).
Just type one of the above and then C-j.
Shankar> Also Is there any environment variable which is set if I
Shankar> am within a emacs session.
It depends on the terminal-emulation package that you're using. Emacs
has so many. RTFM.
A quick check is to run the 'env' shell command and redirect the
output to a file. Do this both in a vanilla shell and a shell running
under Emacs. Then, use 'diff' to check what are different.
--
Lee Sau Dan 李守敦(Big5) ~{@nJX6X~}(HZ)
E-mail: danlee@informatik.uni-freiburg.de
Home page: http://www.informatik.uni-freiburg.de/~danlee
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-01-20 7:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-01-11 10:48 gdb and emacs Shankar K E
2003-01-20 7:50 ` Lee Sau Dan
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.