构建 JVM(HotSpot) 源码调试环境(OpenJDK8)
原本想在 Windows 下编译调试,但过程中遇到了诸多错误(老是报路径错误。。。),最后只好放弃。
此次记录调试的方法为 CentOS7 上编译,Windows 上使用 Clion 远程调试(也可直接在 CentOS7 桌面环境直接调试,速度快)。
一、下载源码(OpenJDK8)
yum 源使用的是阿里的 https://opsx.alibaba.com/mirror?lang=zh-CN
这里使用 mercurial(类似 Git 的版本控制系统) 下载源码,方便更新。
下面网址可以下载 mercurial 较新的版本。
https://mercurial.selenic.com/wiki/ChineseDownload
https://www.mercurial-scm.org/wiki/Download
# 或者 yum install hg -y
yum install mercurial -y # 下载源码,目标目录需要为空
hg clone http://hg.openjdk.java.net/jdk8u/jdk8u /opt/jdk8u # 更新代码,操作和 Git 类似
hg pull # 获取完整源码(需要在源码目录下执行,下载时间较长,一次可能下载不成功,多试几次)
cd /opt/jdk8u/
sh get_source.sh # 完全下载成功的打印信息。若输出中出现回滚字样,即代表下载过程中出错了,需重新执行下载脚本
No repositories to process.
# Repositories: . corba jaxp jaxws langtools jdk hotspot nashorn
.: cd . && hg pull -u
corba: cd corba && hg pull -u
jaxp: cd jaxp && hg pull -u
jaxws: cd jaxws && hg pull -u
langtools: cd langtools && hg pull -u
jdk: cd jdk && hg pull -u
hotspot: cd hotspot && hg pull -u
nashorn: cd nashorn && hg pull -u
.: 正在拉自 http://hg.openjdk.java.net/jdk8u/jdk8u/
corba: 正在拉自 http://hg.openjdk.java.net/jdk8u/jdk8u/corba
jaxp: 正在拉自 http://hg.openjdk.java.net/jdk8u/jdk8u/jaxp
jaxws: 正在拉自 http://hg.openjdk.java.net/jdk8u/jdk8u/jaxws
jdk: 正在拉自 http://hg.openjdk.java.net/jdk8u/jdk8u/jdk
langtools: 正在拉自 http://hg.openjdk.java.net/jdk8u/jdk8u/langtools
hotspot: 正在拉自 http://hg.openjdk.java.net/jdk8u/jdk8u/hotspot
nashorn: 正在拉自 http://hg.openjdk.java.net/jdk8u/jdk8u/nashorn
corba: 正在搜索修改
corba: 没有发现修改
jdk: 正在搜索修改
jdk: 没有发现修改
jaxws: 正在搜索修改
jaxws: 没有发现修改
.: 正在搜索修改
.: 没有发现修改
langtools: 正在搜索修改
langtools: 没有发现修改
hotspot: 正在搜索修改
hotspot: 没有发现修改
jaxp: 正在搜索修改
jaxp: 没有发现修改
nashorn: 正在搜索修改
nashorn: 没有发现修改
这里手动执行多次比较麻烦,自己写了个小脚本,循环执行。
#!/bin/bash for i in {..}
do
cd /opt/jdk8u/;
sh ./get_source.sh;
done
二、编译源码
Linux 下编译比 Windows 下简单太多。
https://hg.openjdk.java.net/jdk8u/jdk8u/raw-file/tip/README-builds.html
构建 JDK 8 需要使用 Update 7 或更高版本的 JDK 7 版本。JDK 8 开发人员不应使用 JDK 8 作为引导 JDK,以确保 JDK 8 依赖关系不会引入使用 JDK 7 构建的系统部分。
# 查询
yum list installed | grep jdk
rpm -qa | grep jdk # 卸载
yum remove -y xxxxxxx # 验证
java -version # -bash: java: 未找到命令 # 安装 JDK7
# https://www.oracle.com/technetwork/java/javase/downloads/java-archive-downloads-javase7-521261.html
tar -zxf jdk-7u80-linux-x64.tar.gz -C /opt/
配置
cd /opt/jdk8u/
chmod +x configure # 直接执行配置,看看缺少什么工具或参数,按照错误提示安装和添加参数即可
./configure # 安装编译所需工具包
yum install -y unzip zip libXtst-devel libXt-devel libXrender-devel cups-devel freetype-devel alsa-lib-devel fontconfig-devel
yum groupinstall -y "Development Tools" # 配置编译环境
./configure --with-boot-jdk=/opt/jdk1..0_80/ --with-debug-level=slowdebug --with-native-debug-symbols=internal # --with-debug-level=slowdebug 输出更多调试信息
# --with-native-debug-symbols=internal 内链方式生成调试链接符号(可执行文件与源代码的对应关系) # 生成调试链接符号还有以下方式,相当于 --enable-debug-symbols --disable-zip-debug-info
# ZIP_DEBUGINFO_FILES= 生成调试信息文件 libjvm.debuginfo,否则会被压缩成 libjvm.diz,debug 时只能看到汇编代码,不能跟进源码
# ENABLE_FULL_DEBUG_SYMBOLS= 生成调试符号,可不加,不影响调试 ##################################### 配置生产成功打印信息 #################################
A new configuration has been successfully created in
/opt/jdk8u/build/linux-x86_64-normal-server-release
using configure arguments '--with-boot-jdk=/opt/jdk1.7.0_80/ --with-debug-level=slowdebug --with-native-debug-symbols=internal'. Configuration summary:
* Debug level: release
* JDK variant: normal
* JVM variants: server
* OpenJDK target: OS: linux, CPU architecture: x86, address length: Tools summary:
* Boot JDK: java version "1.7.0_80" Java(TM) SE Runtime Environment (build 1.7.0_80-b15) Java HotSpot(TM) -Bit Server VM (build 4.80-b11, mixed mode) (at /opt/jdk1..0_80)
* Toolchain: gcc (GNU Compiler Collection)
* C Compiler: Version 4.8. (at /usr/bin/gcc)
* C++ Compiler: Version 4.8. (at /usr/bin/g++) Build performance summary:
* Cores to use:
* Memory limit: MB WARNING: The result of this configuration has overridden an older
configuration. You *should* run 'make clean' to make sure you get a
proper build. Failure to do so might result in strange build problems.
configure 帮助文档
Running generated-configure.sh
`configure' configures OpenJDK jdk8 to adapt to many kinds of systems. Usage: /opt/jdk8u/configure [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as
VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration:
-h, --help display this help and exit
--help=short display options specific to this package
--help=recursive display the short help of all the included packages
-V, --version display version information and exit
-q, --quiet, --silent do not print `checking ...' messages
--cache-file=FILE cache test results in FILE [disabled]
-C, --config-cache alias for `--cache-file=config.cache'
-n, --no-create do not create output files
--srcdir=DIR find the sources in DIR [configure dir or `..'] Installation directories:
--prefix=PREFIX install architecture-independent files in PREFIX [/usr/local]
--exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, `make install' will install all the files in `/usr/local/bin', `/usr/local/lib' etc. You can specify an installation prefix other than `/usr/local' using `--prefix', for instance `--prefix=$HOME'. For better control, use the options below. Fine tuning of the installation directories:
--bindir=DIR user executables [EPREFIX/bin]
--sbindir=DIR system admin executables [EPREFIX/sbin]
--libexecdir=DIR program executables [EPREFIX/libexec]
--sysconfdir=DIR read-only single-machine data [PREFIX/etc]
--sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
--localstatedir=DIR modifiable single-machine data [PREFIX/var]
--libdir=DIR object code libraries [EPREFIX/lib]
--includedir=DIR C header files [PREFIX/include]
--oldincludedir=DIR C header files for non-gcc [/usr/include]
--datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
--datadir=DIR read-only architecture-independent data [DATAROOTDIR]
--infodir=DIR info documentation [DATAROOTDIR/info]
--localedir=DIR locale-dependent data [DATAROOTDIR/locale]
--mandir=DIR man documentation [DATAROOTDIR/man]
--docdir=DIR documentation root [DATAROOTDIR/doc/openjdk]
--htmldir=DIR html documentation [DOCDIR]
--dvidir=DIR dvi documentation [DOCDIR]
--pdfdir=DIR pdf documentation [DOCDIR]
--psdir=DIR ps documentation [DOCDIR] X features:
--x-includes=DIR X include files are in DIR
--x-libraries=DIR X library files are in DIR System types:
--build=BUILD configure for building on BUILD [guessed]
--host=HOST cross-compile to build programs to run on HOST [BUILD]
--target=TARGET configure for building compilers for TARGET [HOST] Optional Features:
--disable-option-checking ignore unrecognized --enable/--with options
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
--enable-openjdk-only suppress building custom source even if present [disabled]
--enable-debug set the debug level to fastdebug (shorthand for --with-debug-level=fastdebug) [disabled]
--disable-headful disable building headful support (graphical UI support) [enabled]
--enable-hotspot-test-in-build
run the Queens test after Hotspot build [disabled]
--enable-unlimited-crypto
Enable unlimited crypto policy [disabled]
--disable-debug-symbols disable generation of debug symbols [enabled]
--disable-zip-debug-info
disable zipping of debug-info files [enabled]
--enable-macosx-runtime-support
Deprecated. Option is kept for backwards compatibility and is ignored
--disable-freetype-bundling
disable bundling of the freetype library with the build result [enabled on Windows or when using --with-freetype, disabled otherwise]
--enable-sjavac use sjavac to do fast incremental compiles [disabled]
--disable-precompiled-headers
disable using precompiled headers when compiling C++ [enabled]
--enable-ccache enable using ccache to speed up recompilations [disabled] Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
--with-custom-make-dir use this directory for custom build/make files
--with-target-bits build 32-bit or 64-bit binaries (for platforms that support it), e.g. --with-target-bits=32 [guessed]
--with-jdk-variant JDK variant to build (normal) [normal]
--with-jvm-interpreter JVM interpreter to build (template, cpp) [template]
--with-jvm-variants JVM variants (separated by commas) to build (server, client, minimal1, kernel, zero, zeroshark, core) [server]
--with-debug-level set the debug level (release, fastdebug, slowdebug) [release]
--with-devkit use this devkit for compilers, tools and resources
--with-sys-root alias for --with-sysroot for backwards compatability
--with-sysroot use this directory as sysroot)
--with-tools-dir alias for --with-toolchain-path for backwards compatibility
--with-toolchain-path prepend these directories when searching for toolchain binaries (compilers etc)
--with-extra-path prepend these directories to the default path
--with-xcode-path explicit path to Xcode 4 (generally for building on 10.9 and later)
--with-conf-name use this as the name of the configuration [generated from important configuration options]
--with-builddeps-conf use this configuration file for the builddeps
--with-builddeps-server download and use build dependencies from this server url
--with-builddeps-dir store downloaded build dependencies here [/localhome/builddeps]
--with-builddeps-group chgrp the downloaded build dependencies to this group
--with-cacerts-file specify alternative cacerts file
--with-milestone Set milestone value for build [internal]
--with-update-version Set update version value for build [b00]
--with-user-release-suffix
Add a custom string to the version string if build number isn't set.[username_builddateb00]
--with-build-number Set build number value for build [b00]
--with-vendor-name Set vendor name. Among others, used to set the 'java.vendor' and 'java.vm.vendor' system properties. [not specified]
--with-vendor-url Set the 'java.vendor.url' system property [not specified]
--with-vendor-bug-url Set the 'java.vendor.url.bug' system property [not specified]
--with-vendor-vm-bug-url
Sets the bug URL which will be displayed when the VM crashes [not specified]
--with-copyright-year Set copyright year value for build [current year]
--with-boot-jdk path to Boot JDK (used to bootstrap build) [probed]
--with-boot-jdk-jvmargs specify JVM arguments to be passed to all invocations of the Boot JDK, overriding the default values, e.g --with-boot-jdk-jvmargs="-Xmx8G -enableassertions"
--with-add-source-root for each and every source directory, look in this additional source root for the same directory; if it exists and have files in it, include it in the build
--with-override-source-root
for each and every source directory, look in this override source root for the same directory; if it exists, use that directory instead and ignore the directory in the original source root
--with-adds-and-overrides
use the subdirs 'adds' and 'overrides' in the specified directory as add-source-root and override-source-root
--with-override-langtools
use this langtools dir for the build
--with-override-corba use this corba dir for the build
--with-override-jaxp use this jaxp dir for the build
--with-override-jaxws use this jaxws dir for the build
--with-override-hotspot use this hotspot dir for the build
--with-override-nashorn use this nashorn dir for the build
--with-override-jdk use this jdk dir for the build
--with-import-hotspot import hotspot binaries from this jdk image or hotspot build dist dir instead of building from source
--with-toolchain-type the toolchain type (or family) to use, use '--help' to show possible values [platform dependent]
--with-toolchain-version
the version of the toolchain to look for, use '--help' to show possible values [platform dependent]
--with-jtreg Regression Test Harness [probed]
--with-extra-cflags extra flags to be used when compiling jdk c-files
--with-extra-cxxflags extra flags to be used when compiling jdk c++-files
--with-extra-ldflags extra flags to be used when linking jdk
--with-native-debug-symbols
set the native debug symbol configuration (none, internal, external, zipped) [varying]
--with-x use the X Window System
--with-cups specify prefix directory for the cups package (expecting the headers under PATH/include)
--with-cups-include specify directory for the cups include files
--with-freetype specify prefix directory for the freetype package (expecting the libraries under PATH/lib and the headers under PATH/include)
--with-freetype-include specify directory for the freetype include files
--with-freetype-lib specify directory for the freetype library
--with-freetype-src specify directory with freetype sources to automatically build the library (experimental, Windows-only)
--with-alsa specify prefix directory for the alsa package (expecting the libraries under PATH/lib and the headers under PATH/include)
--with-alsa-include specify directory for the alsa include files
--with-alsa-lib specify directory for the alsa library
--with-fontconfig specify prefix directory for the fontconfig package (expecting the headers under PATH/include)
--with-fontconfig-include
specify directory for the fontconfig include files
--with-giflib use giflib from build system or OpenJDK source (system, bundled) [bundled]
--with-zlib use zlib from build system or OpenJDK source (system, bundled) [bundled]
--with-stdc++lib=<static>,<dynamic>,<default>
force linking of the C++ runtime on Linux to either static or dynamic, default is static with dynamic as fallback
--with-msvcr-dll path to microsoft C runtime dll (msvcr*.dll) (Windows only) [probed]
--with-msvcp-dll path to microsoft C++ runtime dll (msvcp*.dll) (Windows only) [probed]
--with-ucrt-dll-dir path to Microsoft Windows Kit UCRT DLL dir (Windows only) [probed]
--with-dxsdk Deprecated. Option is kept for backwards compatibility and is ignored
--with-dxsdk-lib Deprecated. Option is kept for backwards compatibility and is ignored
--with-dxsdk-include Deprecated. Option is kept for backwards compatibility and is ignored
--with-num-cores number of cores in the build system, e.g. --with-num-cores=8 [probed]
--with-memory-size memory (in MB) available in the build system, e.g. --with-memory-size=1024 [probed]
--with-jobs number of parallel jobs to let make run [calculated based on cores and memory]
--with-sjavac-server-java
use this java binary for running the sjavac background server [Boot JDK java]
--with-ccache-dir where to store ccache files [~/.ccache] Some influential environment variables:
BASENAME Override default value for BASENAME
BASH Override default value for BASH
CAT Override default value for CAT
CHMOD Override default value for CHMOD
CMP Override default value for CMP
COMM Override default value for COMM
CP Override default value for CP
CUT Override default value for CUT
DATE Override default value for DATE
DIFF Override default value for DIFF
DIRNAME Override default value for DIRNAME
ECHO Override default value for ECHO
EXPR Override default value for EXPR
FILE Override default value for FILE
FIND Override default value for FIND
HEAD Override default value for HEAD
LN Override default value for LN
LS Override default value for LS
MKDIR Override default value for MKDIR
MKTEMP Override default value for MKTEMP
MV Override default value for MV
NAWK Override default value for NAWK
PRINTF Override default value for PRINTF
RM Override default value for RM
SH Override default value for SH
SORT Override default value for SORT
TAIL Override default value for TAIL
TAR Override default value for TAR
TEE Override default value for TEE
TOUCH Override default value for TOUCH
TR Override default value for TR
UNAME Override default value for UNAME
UNIQ Override default value for UNIQ
WC Override default value for WC
WHICH Override default value for WHICH
XARGS Override default value for XARGS
AWK Override default value for AWK
GREP Override default value for GREP
EGREP Override default value for EGREP
FGREP Override default value for FGREP
SED Override default value for SED
CYGPATH Override default value for CYGPATH
READLINK Override default value for READLINK
DF Override default value for DF
SETFILE Override default value for SETFILE
CPIO Override default value for CPIO
UNZIP Override default value for UNZIP
ZIP Override default value for ZIP
LDD Override default value for LDD
READELF Override default value for READELF
HG Override default value for HG
STAT Override default value for STAT
TIME Override default value for TIME
DSYMUTIL Override default value for DSYMUTIL
XATTR Override default value for XATTR
CODESIGN Override default value for CODESIGN
PKG_CONFIG path to pkg-config utility
CC C compiler command
CFLAGS C compiler flags
LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
nonstandard directory <lib dir>
LIBS libraries to pass to the linker, e.g. -l<library>
CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
you have headers in a nonstandard directory <include dir>
CXX C++ compiler command
CXXFLAGS C++ compiler flags
CPP C preprocessor
CXXCPP C++ preprocessor
AS Override default value for AS
AR Override default value for AR
OBJC Objective C compiler command
OBJCFLAGS Objective C compiler flags
LIPO Override default value for LIPO
STRIP Override default value for STRIP
NM Override default value for NM
GNM Override default value for GNM
MCS Override default value for MCS
OBJCOPY Override default value for OBJCOPY
OBJDUMP Override default value for OBJDUMP
BUILD_CC Override default value for BUILD_CC
BUILD_CXX Override default value for BUILD_CXX
BUILD_LD Override default value for BUILD_LD
JTREGEXE Override default value for JTREGEXE
XMKMF Path to xmkmf, Makefile generator for X Window System
FREETYPE_CFLAGS
C compiler flags for FREETYPE, overriding pkg-config
FREETYPE_LIBS
linker flags for FREETYPE, overriding pkg-config
ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
ALSA_LIBS linker flags for ALSA, overriding pkg-config
LIBFFI_CFLAGS
C compiler flags for LIBFFI, overriding pkg-config
LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
CCACHE Override default value for CCACHE Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations. Report bugs to <build-dev@openjdk.java.net>.
OpenJDK home page: <http://openjdk.java.net>. Additional (non-autoconf) OpenJDK Options:
--openjdk-target=TARGET cross-compile with TARGET as target platform (i.e. the one you will run the resulting binary on).
Equivalent to --host=TARGET --target=TARGET --build=<current platform>
--debug-configure Run the configure script with additional debug logging enabled. The following toolchains are available as arguments to --with-toolchain-type.
Which are valid to use depends on the build platform.
gcc GNU Compiler Collection
clang clang/LLVM
solstudio Oracle Solaris Studio
xlc IBM XL C/C++
microsoft Microsoft Visual Studio Please be aware that, when cross-compiling, the OpenJDK configure script will
generally use 'target' where autoconf traditionally uses 'host'. Also note that variables must be passed on the command line. Variables in the
environment will generally be ignored, unlike traditional autoconf scripts.
编译
make images JOBS= # 编译成功打印信息
----- Build times -------
Start -- ::
End -- ::
:: corba
:: demos
:: docs
:: hotspot
:: images
:: jaxp
:: jaxws
:: jdk
:: langtools
:: nashorn
:: TOTAL
-------------------------
Finished building OpenJDK for target 'all' # 测试
./build/linux-x86_64-normal-server-release/jdk/bin/java -version
# openjdk version "1.8.0-internal"
# OpenJDK Runtime Environment (build 1.8.-internal-root_2019_06_27_00_56-b00)
# OpenJDK -Bit Server VM (build 25.71-b00, mixed mode) # 查看 libjvm.debuginfo
ls ./build/linux-x86_64-normal-server-release/jdk/lib/amd64/server/
# 若编译时没有设置生成,可进入该目录(libjvm.so 所在目录)手动解压
unzip libjvm.diz
make 帮助文档
OpenJDK Makefile help
===================== Common make targets
. make [default] # Compile all product in langtools, hotspot, jaxp, jaxws, corba and jdk
. make all # Compile everything, all repos and images
. make images # Create complete j2sdk and j2re images
. make docs # Create javadocs
. make overlay-images # Create limited images for sparc 64 bit platforms
. make profiles # Create complete j2re compact profile images
. make bootcycle-images # Build images twice, second time with newly build JDK
. make install # Install the generated images locally
. make clean # Remove all files generated by make, but not those generated by configure
. make dist-clean # Remove all files, including configuration
. make help # Give some help on using make
. make test # Run tests, default is all tests (see TEST below) Targets for specific components
(Component is any of langtools, corba, jaxp, jaxws, hotspot, jdk, nashorn, images, overlay-images, docs or test)
. make <component> # Build <component> and everything it depends on.
. make <component>-only # Build <component> only, without dependencies. This is faster but can result in incorrect build results!
. make clean-<component> # Remove files generated by make for <component> Useful make variables
. make CONF= # Build all configurations (note, assignment is empty)
. make CONF=<substring> # Build the configuration(s) with a name matching <substring>
. make LOG=<loglevel> # Change the log level from warn to <loglevel> Available log levels are: 'warn' (default), 'info', 'debug' and 'trace' To see executed command lines, use LOG=debug
. make JOBS=<n> # Run <n> parallel make jobs Note that -jN does not work as expected!
. make test TEST=<test> # Only run the given test or tests, e.g. make test TEST="jdk_lang jdk_net"
三、Windows 远程调试
CentOS7 端
yum remove -y cmake gdb
yum install -y gcc gcc-c++ make wget # 安装 cmake,yum 源安装的版本较低
cd /opt/
wget https://cmake.org/files/v3.14/cmake-3.14.5.tar.gz
tar -zxf cmake-3.14..tar.gz
cd cmake-3.14.
# 默认安装在 /usr/local/share/,可执行文件在 /usr/local/bin/
./bootstrap && make && make install
ln -s /usr/local/bin/cmake /usr/bin/cmake
cmake -version # 安装 gdb
# 这里可以找到 gdb 镜像站点 https://www.gnu.org/software/gdb/download/
# 这里下载 texinfo 新版本 http://ftp.gnu.org/gnu/texinfo/
yum install -y texinfo
cd /opt/
wget https://mirrors.ustc.edu.cn/gnu/gdb/gdb-8.2.1.tar.gz
tar -zxf gdb-8.2..tar.gz
cd gdb-8.2.
# 之前若出现过编译错误需要删掉(有缓存),重新解压编译
# 默认安装在 /usr/local/share/,可执行文件在 /usr/local/bin/
./configure && make && make install
ln -s /usr/local/bin/gdb /usr/bin/gdb
gdb -ver
Windows 端
首先用 Clion 新建一个空项目
远程调试
同步代码(windows 上的代码需要和 CentOS 上的代码一样)
连接信息
对应目录,本地目录为新建的 Hello World 项目路径
同步时要排除的本地目录
下载远程代码
关闭项目,用载入的方式重新打开项目
设置远程调试,地址为 CentOS 地址,端口随意
在 CentOS 上启动 GDB,端口与上面对应
yum install gdb-gdbserver -y gdbserver : /opt/jdk8u/build/linux-x86_64-normal-server-release/jdk/bin/java -version
打上断点,启动的 DeBug(比较慢,载入 libjvm.debuginfo 的时候)
四、CentOS 桌面本地调试
只调试 JVM 可以直接导入 hotspot 项目,速度快点
配置调试
忽略调试时的 SIGSEGV 信号,在用户目录新建 .gdbinit 文件
handle SIGSEGV pass noprint nostop
https://blog.csdn.net/tjiyu/article/details/53725247
https://my.oschina.net/u/3982963/blog/3045233
https://www.jianshu.com/p/ee7e9176632c
https://yddmax.github.io/2017/06/11/openjdk7%E4%B9%8B%E7%BC%96%E8%AF%91%E5%92%8Cdebug/
https://blog.csdn.net/lihao21/article/details/87425187
构建 JVM(HotSpot) 源码调试环境(OpenJDK8)的更多相关文章
- 如何搭建自己的SpringBoot源码调试环境?--SpringBoot源码(一)
1 前言 这是SpringBoot2.1源码分析专题的第一篇文章,主要讲如何来搭建我们的源码阅读调试环境.如果有经验的小伙伴们可以略过此篇文章. 2 环境安装要求 IntelliJ IDEA JDK1 ...
- [原创]在Windows和Linux中搭建PostgreSQL源码调试环境
张文升http://ode.cnblogs.comEmail:wensheng.zhang#foxmail.com 配图太多,完整pdf下载请点这里 本文使用Xming.Putty和VMWare几款工 ...
- JVM 源码分析(二):搭建 JDK 8 源码调试环境(Windows 上使用 CLion)
前言 一.准备源码 二.安装 "Bootstrap JDK" 三.配置编译环境 四.编译与测试 五.安装 CMake 和 GDB 五.准备远程调试 六.开始远程调试 前言 上一篇文 ...
- 深入理解Tomcat系列之二:源码调试环境搭建(转)
前言 最近对Tomcat的源码比较感兴趣,于是折腾了一番.要调试源码首先需要搭建环境,由于参考了几篇帖子发现都不怎么靠谱,最后还是折腾出来了,然而却花了足足一天的时间去搭建这个环境.发现都不是帖子的问 ...
- struts2源码调试环境的搭建
源码之前,了无秘密. 说一句逼格很高的话来镇镇场子. 这两天在看陆舟的<Struts2技术内幕>,一边看脑子一边冒出四个字:相见恨晚.极力推荐想了解Struts2的人看看这本书,之前一直在 ...
- [Tomcat源码分析] Eclipse中搭建Apache Tomcat源码调试环境
网上很多文章都推荐使用Ant下载编译,但本地实践中屡屡失败,无法下载. 后来参考 https://blog.csdn.net/xiongyouqiang/article/details/7894107 ...
- Tomcat源码调试环境搭建
我们一般都是为了解决某个问题,才去看源码的.Java体系就是这点好处,源码唾手可得.遇到问题,最后的解决方法总是可以从源码中找到. 参考了网上的文章,过程整理如下: 1. 下载和导入 官网下载编译好的 ...
- Eclipse中搭建Apache Tomcat7源码调试环境
第一步:获取Apache Tomcat7源码,读者可以从Apache 官方网站获取,官方下载地址: http://tomcat.apache.org/download-70.cgi 注意选择Sourc ...
- 15分钟搭建RocketMQ源码调试环境
下载源码 下载源码,github页面选择(rocketmq-all-4.7.1)版本压缩包,https://github.com/apache/rocketmq/tags 导入IDEA 1. 使用ID ...
随机推荐
- 非JAVA WEB项目提供Http接口调用实现
package com.monitor.app.utils; import com.alibaba.fastjson.JSON; import com.google.gson.Gson; import ...
- 第十二章·Kibana深入-日志图形展示
1.Kibana创建区域图 Kibana支持多重图从展示功能,需要日志是json格式的支持. Kibana区域图 打开浏览器,访问:http://10.0.0.54:5601   选择一个日志  ...
- Scala(一)——基本类型
Scala语言快速入门(基本类型) (参考视频:av39126512,韩顺平281集scala精讲) 一.Linux和Windows环境安装 这部分跳过,直接使用IDEA进行搭建,和其他编程语言配置差 ...
- cubase 的 CC控制器使用
- 第十五届四川省省赛 SCU - 4443 Range Query
先给你1~N的N个数 再给你每种最多50个的条件(ai,bi,ci) 或者[ai,bi,ci] (ai,bi,ci)表示下标ai到bi的最小值必为ci [ai,bi,ci]表示下标ai到bi的最大值必 ...
- jmeter 压力测试tcp
cmd下管理员执行 jmeter 界面 英文版 中文切换以后不能执行 最多跑905个线程 线程限制 查看结果数 界面会跑死 windows环境 注意:测试1万的tcp并发连接 大爷的 window最 ...
- 第六章 组件 63 组件传值-父组件向子组件传值和data与props的区别
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8&quo ...
- 《Python基础教程》第六章:抽象(一)
用def定义函数 __doc__是函数属性.属性名中的双下划线表示它是个特殊属性
- 什么是DNS
DNS,或者说域名系统,通常是学习如何配置网站和服务器的一个非常困难的部分.了解 DNS 的工作原理将有助于诊断网络访问的问题,也有助于理解 DNS 系统背后的工作原理. 这篇文章中,我们会讨论一些基 ...
- css实现单行、多行文本超出显示省略号
前言:项目中我们经常遇到这种需求,需要对单行.多行文本超出显示为省略号.这篇文章主要总结了小编解决此问题的方法,有不足之处欢迎大家指正. 单行文本省略 .ellipsis-line { border: ...