pygdb | Minimal C Debugger in Python | Code Inspection library
kandi X-RAY | pygdb Summary
kandi X-RAY | pygdb Summary
Minimal C Debugger in Python
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of pygdb
pygdb Key Features
pygdb Examples and Code Snippets
Community Discussions
Trending Discussions on pygdb
QUESTION
Some background first: I'm writing a debugger and now I am trying to distinguish between different types of process break point. The PTRACE_GETSIGINFO
request of ptrace()
can help retrieve detail information of tracee signal. for the SIGTRAP
signal, there are several types of si_code
including TRAP_BRKPT
, TRAP_TRACE
, TRAP_BRANCH
, TRAP_HWBKPT
.
In the manual of sigaction
(man sigaction) in Linux, there is a si_code
constant TRAP_BRANCH
in structure siginfo_t
, and the manual says that is this constant denotes process branch trap, so:
1. what is a process branch trap?
I also notice that there is a 'TRAP_TRACE` constant and the manual says that this constant denotes process trap, so:
2. what is the difference between process trap and process branch trap?
...ANSWER
Answered 2017-Aug-26 at 20:40A way to answer your questions that I'm fond of, is to look at the sources. You don't say which linux kernel specifically, so taking a peek then at the 3.17.2 sources seems to serve at least for exposition of this technique.
Let's start then with recursive greps for each trap...
Grepping forTRAP_BRANCH
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install pygdb
Install Vagrant
git clone https://github.com/theicfire/pygdb
cd pygdb
vagrant up -- will take a bit of time
vagrant ssh
cd /vagrant
make test
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page