mirror of
https://github.com/tobast/libunwind-eh_elf.git
synced 2024-11-22 07:37:38 +01:00
Add get_pid in ptrace support
This commit is contained in:
parent
7a747a28b1
commit
da7446a21a
2 changed files with 22 additions and 1 deletions
|
@ -34,5 +34,6 @@ PROTECTED unw_accessors_t _UPT_accessors =
|
|||
.access_reg = _UPT_access_reg,
|
||||
.access_fpreg = _UPT_access_fpreg,
|
||||
.resume = _UPT_resume,
|
||||
.get_proc_name = _UPT_get_proc_name
|
||||
.get_proc_name = _UPT_get_proc_name,
|
||||
.get_pid = _UPT_get_pid
|
||||
};
|
||||
|
|
20
src/ptrace/_UPT_get_pid.c
Normal file
20
src/ptrace/_UPT_get_pid.c
Normal file
|
@ -0,0 +1,20 @@
|
|||
/********** Libunwind -- eh_elf flavour **********
|
||||
* This is the eh_elf version of libunwind, made for academic purposes.
|
||||
*
|
||||
* Théophile Bastian <theophile.bastian@ens.fr> <contact+github@tobast.fr>
|
||||
*************************************************
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
************************************************/
|
||||
|
||||
#include "_UPT_internal.h"
|
||||
|
||||
int _UPT_get_pid(void* arg) {
|
||||
struct UPT_info *ui = arg;
|
||||
return ui->pid;
|
||||
}
|
Loading…
Reference in a new issue