< prev index next >

src/jdk.hotspot.agent/linux/native/libsaproc/ps_core.c

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. --- 1,7 ---- /* ! * Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation.
*** 29,38 **** --- 29,39 ---- #include <stdlib.h> #include <stddef.h> #include <elf.h> #include <link.h> #include "libproc_impl.h" + #include "proc_service.h" #include "salibelf.h" #include "cds.h" // This file has the libproc implementation to read core files. // For live processes, refer to ps_proc.c. Portions of this is adapted
*** 508,519 **** // we have to read prstatus_t from buf // assert(nbytes == sizeof(prstaus_t), "size mismatch on prstatus_t"); prstatus_t* prstat = (prstatus_t*) buf; thread_info* newthr; print_debug("got integer regset for lwp %d\n", prstat->pr_pid); ! // we set pthread_t to -1 for core dump ! if((newthr = add_thread_info(ph, (pthread_t) -1, prstat->pr_pid)) == NULL) return false; // copy regs memcpy(&newthr->regs, prstat->pr_reg, sizeof(struct user_regs_struct)); --- 509,519 ---- // we have to read prstatus_t from buf // assert(nbytes == sizeof(prstaus_t), "size mismatch on prstatus_t"); prstatus_t* prstat = (prstatus_t*) buf; thread_info* newthr; print_debug("got integer regset for lwp %d\n", prstat->pr_pid); ! if((newthr = add_thread_info(ph, prstat->pr_pid)) == NULL) return false; // copy regs memcpy(&newthr->regs, prstat->pr_reg, sizeof(struct user_regs_struct));
< prev index next >