forked from pool/java-1_8_0-openj9
This commit is contained in:
parent
2fe89c9781
commit
83c5b2f1bd
@ -534,7 +534,7 @@ pushd %{imagesdir}/j2sdk-image
|
||||
done
|
||||
|
||||
# Install demos and samples.
|
||||
cp -a demo %{buildroot}%{_jvmdir}/%{sdkdir}
|
||||
cp -a ../../jdk/demo %{buildroot}%{_jvmdir}/%{sdkdir}
|
||||
# enable short-circuit
|
||||
mkdir -p sample/rmi
|
||||
[ -f bin/java-rmi.cgi ] && mv bin/java-rmi.cgi sample/rmi
|
||||
@ -777,8 +777,6 @@ update-alternatives \
|
||||
%{_mandir}/man1/jconsole-%{sdklnk}.1$ext \
|
||||
--slave %{_mandir}/man1/jdb.1$ext jdb.1$ext \
|
||||
%{_mandir}/man1/jdb-%{sdklnk}.1$ext \
|
||||
--slave %{_mandir}/man1/jmap.1$ext jmap.1$ext \
|
||||
%{_mandir}/man1/jmap-%{sdklnk}.1$ext \
|
||||
--slave %{_mandir}/man1/jrunscript.1$ext jrunscript.1$ext \
|
||||
%{_mandir}/man1/jrunscript-%{sdklnk}.1$ext \
|
||||
--slave %{_mandir}/man1/jsadebugd.1$ext jsadebugd.1$ext \
|
||||
@ -936,7 +934,6 @@ fi
|
||||
%{_mandir}/man1/jconsole-%{sdklnk}.1%{?ext_man}
|
||||
%{_mandir}/man1/jdb-%{sdklnk}.1%{?ext_man}
|
||||
%{_mandir}/man1/jdeps-%{sdklnk}.1%{?ext_man}
|
||||
%{_mandir}/man1/jmap-%{sdklnk}.1%{?ext_man}
|
||||
%{_mandir}/man1/jrunscript-%{sdklnk}.1%{?ext_man}
|
||||
%{_mandir}/man1/jsadebugd-%{sdklnk}.1%{?ext_man}
|
||||
%{_mandir}/man1/native2ascii-%{sdklnk}.1%{?ext_man}
|
||||
|
@ -1,66 +1,85 @@
|
||||
--- a/omr/ddr/lib/ddr-scanner/dwarf/DwarfScanner.cpp
|
||||
+++ b/omr/ddr/lib/ddr-scanner/dwarf/DwarfScanner.cpp
|
||||
@@ -1495,7 +1495,12 @@ DwarfScanner::traverse_cu_in_debug_section(Symbol_IR *ir)
|
||||
Dwarf_Half versionStamp = 0;
|
||||
Dwarf_Unsigned abbrevOffset = 0;
|
||||
@@ -1497,6 +1497,13 @@ DwarfScanner::traverse_cu_in_debug_section(Symbol_IR *ir)
|
||||
Dwarf_Half addressSize = 0;
|
||||
Dwarf_Unsigned nextCUheader = 0;
|
||||
Dwarf_Error error = NULL;
|
||||
+#ifdef DW_LIBDWARF_VERSION_MAJOR
|
||||
+ Dwarf_Half lengthSize = 0;
|
||||
+ Dwarf_Half extensionSize = 0;
|
||||
+ Dwarf_Sig8 typeSignature;
|
||||
+ Dwarf_Unsigned typeOffset = 0;
|
||||
Dwarf_Unsigned nextCUheader = 0;
|
||||
+ Dwarf_Half nextCUheaderType = 0;
|
||||
Dwarf_Error error = NULL;
|
||||
+#endif
|
||||
|
||||
/* Go over each cu header. */
|
||||
@@ -1504,7 +1509,7 @@ DwarfScanner::traverse_cu_in_debug_section(Symbol_IR *ir)
|
||||
while (DDR_RC_OK == rc) {
|
||||
@@ -1504,7 +1511,11 @@ DwarfScanner::traverse_cu_in_debug_section(Symbol_IR *ir)
|
||||
_typeOffsetMap.clear();
|
||||
_ir = &newIR;
|
||||
|
||||
- int ret = dwarf_next_cu_header(_debug, &cuHeaderLength, &versionStamp, &abbrevOffset, &addressSize, &nextCUheader, &error);
|
||||
+#ifdef DW_LIBDWARF_VERSION_MAJOR
|
||||
+ int ret = dwarf_next_cu_header_d(_debug, true, &cuHeaderLength, &versionStamp, &abbrevOffset, &addressSize, &lengthSize, &extensionSize, &typeSignature, &typeOffset, &nextCUheader, &nextCUheaderType, &error);
|
||||
+#else
|
||||
int ret = dwarf_next_cu_header(_debug, &cuHeaderLength, &versionStamp, &abbrevOffset, &addressSize, &nextCUheader, &error);
|
||||
+#endif
|
||||
if (DW_DLV_ERROR == ret) {
|
||||
ERRMSG("Failed to get next dwarf CU header.");
|
||||
rc = DDR_RC_ERROR;
|
||||
@@ -1518,7 +1523,7 @@ DwarfScanner::traverse_cu_in_debug_section(Symbol_IR *ir)
|
||||
@@ -1518,7 +1529,11 @@ DwarfScanner::traverse_cu_in_debug_section(Symbol_IR *ir)
|
||||
Dwarf_Die childDie = NULL;
|
||||
|
||||
/* Expect the CU to have a single sibling - a DIE */
|
||||
- if (DW_DLV_ERROR == dwarf_siblingof(_debug, NULL, &cuDie, &error)) {
|
||||
+#ifdef DW_LIBDWARF_VERSION_MAJOR
|
||||
+ if (DW_DLV_ERROR == dwarf_siblingof_b(_debug, NULL, true, &cuDie, &error)) {
|
||||
+#else
|
||||
if (DW_DLV_ERROR == dwarf_siblingof(_debug, NULL, &cuDie, &error)) {
|
||||
+#endif
|
||||
ERRMSG("Getting sibling of CU: %s\n", dwarf_errmsg(error));
|
||||
rc = DDR_RC_ERROR;
|
||||
break;
|
||||
@@ -1617,12 +1622,12 @@ DwarfScanner::scanFile(OMRPortLibrary *portLibrary, Symbol_IR *ir, const char *f
|
||||
@@ -1617,12 +1632,20 @@ DwarfScanner::scanFile(OMRPortLibrary *portLibrary, Symbol_IR *ir, const char *f
|
||||
}
|
||||
|
||||
if (DDR_RC_OK == rc) {
|
||||
- Dwarf_Unsigned access = DW_DLC_READ;
|
||||
+#ifdef DW_LIBDWARF_VERSION_MAJOR
|
||||
+ unsigned int groupNumber = DW_GROUPNUMBER_ANY;
|
||||
+#else
|
||||
Dwarf_Unsigned access = DW_DLC_READ;
|
||||
+#endif
|
||||
Dwarf_Handler errhand = 0;
|
||||
Dwarf_Ptr errarg = NULL;
|
||||
intptr_t native_fd = omrfile_convert_omrfile_fd_to_native_fd(fd);
|
||||
DwarfScanner::scanFileName = filepath;
|
||||
- res = dwarf_init((int)native_fd, access, errhand, errarg, &_debug, &error);
|
||||
+#ifdef DW_LIBDWARF_VERSION_MAJOR
|
||||
+ res = dwarf_init_b((int)native_fd, groupNumber, errhand, errarg, &_debug, &error);
|
||||
+#else
|
||||
res = dwarf_init((int)native_fd, access, errhand, errarg, &_debug, &error);
|
||||
+#endif
|
||||
if (DW_DLV_OK != res) {
|
||||
ERRMSG("Failed to initialize libDwarf scanning %s: %s\nExiting...\n", filepath, dwarf_errmsg(error));
|
||||
if (NULL != error) {
|
||||
@@ -1640,7 +1645,7 @@ DwarfScanner::scanFile(OMRPortLibrary *portLibrary, Symbol_IR *ir, const char *f
|
||||
@@ -1640,7 +1663,11 @@ DwarfScanner::scanFile(OMRPortLibrary *portLibrary, Symbol_IR *ir, const char *f
|
||||
|
||||
DEBUGPRINTF("Unloading libDwarf");
|
||||
|
||||
- res = dwarf_finish(_debug, &error);
|
||||
+#ifdef DW_LIBDWARF_VERSION_MAJOR
|
||||
+ res = dwarf_finish(_debug);
|
||||
+#else
|
||||
res = dwarf_finish(_debug, &error);
|
||||
+#endif
|
||||
if (DW_DLV_OK != res) {
|
||||
ERRMSG("Failed to Unload libDwarf: %s\nExiting...\n", dwarf_errmsg(error));
|
||||
if (NULL != error) {
|
||||
@@ -1681,7 +1686,7 @@ DwarfScanner::getNextSibling(Dwarf_Die *die)
|
||||
@@ -1681,7 +1708,11 @@ DwarfScanner::getNextSibling(Dwarf_Die *die)
|
||||
Dwarf_Error err = NULL;
|
||||
|
||||
/* Get the next sibling and free the previous one if successful. */
|
||||
- int ret = dwarf_siblingof(_debug, *die, &nextSibling, &err);
|
||||
+#ifdef DW_LIBDWARF_VERSION_MAJOR
|
||||
+ int ret = dwarf_siblingof_b(_debug, *die, true, &nextSibling, &err);
|
||||
+#else
|
||||
int ret = dwarf_siblingof(_debug, *die, &nextSibling, &err);
|
||||
+#endif
|
||||
if (DW_DLV_ERROR == ret) {
|
||||
ERRMSG("Getting sibling of die:%s\n", dwarf_errmsg(err));
|
||||
} else if (DW_DLV_OK == ret) {
|
||||
|
Loading…
Reference in New Issue
Block a user