[Top][All Lists]

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

running gdb as root under emacs (24)

From: stefan . puiu
Subject: running gdb as root under emacs (24)
Date: Wed, 10 Jan 2018 08:53:46 -0800 (PST)
User-agent: G2/1.0


I'm working on a project that needs to run as root and was wondering if there 
is a way to run gdb as root from emacs. Simply trying 'M-x gdb' and then 'sudo 
gdb ...' does not seem to work. While googling, I found that you can use tramp 
to run certain commands as root 
(!topic/, so based 
on that I tried 'M-:' and then something like this: 

  (cd "/sudo::/")
  (shell-command "gdb -q"))

This doesn't seem to work interactively, however - I get a buffer that simply 
has "(gdb) quit" as the output and then there are some weird characters in the 

What would be a workable approach to achieve this? I'm using emacs24 on Ubuntu 
16.04 (though I don't mind upgrading if that's what it takes). 


reply via email to

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