[Eric] Debugging a tool which only runs as root
Christian Rothländer
eric at cr.sy.gs
Fri May 13 08:45:43 BST 2011
Hi Detlev,
the solution works for most of the code. Attached an error which gets thrown in the moment the scapy-library is used - the identical code runs without the debugger, so I assume there might be a bug
somewhere in the debug client.
Christian
-------------
[|]ERROR: --- Error in child 5958
Traceback (most recent call last):
File "/usr/lib64/python2.7/site-packages/scapy/sendrecv.py", line 89, in sndrcv
pks.send(p)
File "/usr/lib64/python2.7/site-packages/scapy/arch/linux.py", line 387, in send
sx = str(ll(x))
File "/usr/lib64/python2.7/site-packages/scapy/packet.py", line 261, in __str__
return self.build()
File "/usr/lib64/python2.7/site-packages/scapy/packet.py", line 319, in build
p = self.do_build()
File "/usr/lib64/python2.7/site-packages/scapy/packet.py", line 308, in do_build
pkt = self.self_build()
File "/usr/lib64/python2.7/site-packages/scapy/packet.py", line 299, in self_build
p = f.addfield(self, p, val)
File "/usr/lib64/python2.7/site-packages/scapy/fields.py", line 70, in addfield
return s+struct.pack(self.fmt, self.i2m(pkt,val))
File "/usr/lib64/python2.7/site-packages/scapy/layers/l2.py", line 94, in i2m
return MACField.i2m(self, pkt, self.i2h(pkt, x))
File "/usr/lib64/python2.7/site-packages/scapy/layers/l2.py", line 88, in i2h
x = conf.neighbor.resolve(pkt,pkt.payload)
File "/usr/lib64/python2.7/site-packages/scapy/layers/l2.py", line 38, in resolve
return self.resolvers[k](l2inst,l3inst)
File "/usr/lib64/python2.7/site-packages/scapy/layers/inet.py", line 727, in <lambda>
conf.neighbor.register_l3(Ether, IP, lambda l2,l3: getmacbyip(l3.dst))
File "/usr/lib64/python2.7/site-packages/scapy/layers/l2.py", line 72, in getmacbyip
nofilter=1)
File "/usr/lib64/python2.7/site-packages/scapy/sendrecv.py", line 375, in srp1
a,b=srp(*args,**kargs)
File "/usr/lib64/python2.7/site-packages/scapy/sendrecv.py", line 358, in srp
a,b=sndrcv(s ,x,*args,**kargs)
File "/usr/lib64/python2.7/site-packages/scapy/sendrecv.py", line 79, in sndrcv
pid = os.fork()
File "/usr/lib64/python3.1/site-packages/eric5/DebugClients/Python/DebugClientBase.py", line 89, in DebugClientFork
return DebugClientInstance.fork()
File "/usr/lib64/python3.1/site-packages/eric5/DebugClients/Python/DebugClientBase.py", line 1892, in fork
self.eventLoop(True)
File "/usr/lib64/python3.1/site-packages/eric5/DebugClients/Python/DebugClientBase.py", line 986, in eventLoop
rrdy, wrdy, xrdy = select.select([self.readstream],wrdy,[])
ValueError: file descriptor cannot be a negative integer (-1)
More information about the Eric
mailing list