how to debug application as root in eclipse in Ubuntu?

后端 未结 8 1252

I\'m programming application using libpcap. when I debug the application in normal mode, pcap cannot get the network device. it seems that I have to debug the application in

8条回答
  •  暖寄归人
    2020-12-07 16:34

    Another solution is to grant you (or the gdb executable) the rights to make some pcap captures as mentioned here. With something like this :

    setcap cap_net_raw,cap_net_admin=eip /usr/bin/gdb
    

    you should be able to allow to capture packets to gdb without being root.

提交回复
热议问题