src/jdk.hotspot.agent/linux/native/libsaproc/ps_core.c
branchihse-remove-mapfiles-branch
changeset 56109 5bf57be44328
parent 47216 71c04702a3d5
child 56721 01b558efd286
equal deleted inserted replaced
56108:88838a55535b 56109:5bf57be44328
     1 /*
     1 /*
     2  * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
  1006 
  1006 
  1007   return true;
  1007   return true;
  1008 }
  1008 }
  1009 
  1009 
  1010 // the one and only one exposed stuff from this file
  1010 // the one and only one exposed stuff from this file
  1011 struct ps_prochandle* Pgrab_core(const char* exec_file, const char* core_file) {
  1011 JNIEXPORT struct ps_prochandle*
       
  1012 Pgrab_core(const char* exec_file, const char* core_file) {
  1012   ELF_EHDR core_ehdr;
  1013   ELF_EHDR core_ehdr;
  1013   ELF_EHDR exec_ehdr;
  1014   ELF_EHDR exec_ehdr;
  1014   ELF_EHDR lib_ehdr;
  1015   ELF_EHDR lib_ehdr;
  1015 
  1016 
  1016   struct ps_prochandle* ph = (struct ps_prochandle*) calloc(1, sizeof(struct ps_prochandle));
  1017   struct ps_prochandle* ph = (struct ps_prochandle*) calloc(1, sizeof(struct ps_prochandle));