help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gdb and emacs


From: Lee Sau Dan
Subject: Re: gdb and emacs
Date: 20 Jan 2003 08:50:32 +0100
User-agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7

>>>>> "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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]