6. Tools


6.1. GNU 项​​​​​​​​​​​​​​​目​​​​​​​​​​​​​​​调​​​​​​​​​​​​​​​试​​​​​​​​​​​​​​​工​​​​​​​​​​​​​​​具​​​​​​​​​​​​​​​(GNU Project debugger,GDB)

GNU Project debugger(一​​​​​​​​​​​​​​​般​​​​​​​​​​​​​​​称​​​​​​​​​​​​​​​之​​​​​​​​​​​​​​​为​​​​​​​​​​​​​​​ GDB)可​​​​​​​​​​​​​​​调​​​​​​​​​​​​​​​试​​​​​​​​​​​​​​​使​​​​​​​​​​​​​​​用​​​​​​​​​​​​​​​ C、​​​​​​​​​​​​​​​C++ 以​​​​​​​​​​​​​​​及​​​​​​​​​​​​​​​其​​​​​​​​​​​​​​​它​​​​​​​​​​​​​​​语​​​​​​​​​​​​​​​言​​​​​​​​​​​​​​​编​​​​​​​​​​​​​​​写​​​​​​​​​​​​​​​的​​​​​​​​​​​​​​​程​​​​​​​​​​​​​​​序​​​​​​​​​​​​​​​,通​​​​​​​​​​​​​​​过​​​​​​​​​​​​​​​控​​​​​​​​​​​​​​​制​​​​​​​​​​​​​​​的​​​​​​​​​​​​​​​方​​​​​​​​​​​​​​​式​​​​​​​​​​​​​​​执​​​​​​​​​​​​​​​行​​​​​​​​​​​​​​​,然​​​​​​​​​​​​​​​后​​​​​​​​​​​​​​​打​​​​​​​​​​​​​​​印​​​​​​​​​​​​​​​出​​​​​​​​​​​​​​​数​​​​​​​​​​​​​​​据​​​​​​​​​​​​​​​。​​​​​​​​​​​​​​​
在​​​​​​​​​​​​​​​红​​​​​​​​​​​​​​​帽​​​​​​​​​​​​​​​企​​​​​​​​​​​​​​​业​​​​​​​​​​​​​​​版​​​​​​​​​​​​​​​ Linux 5.5 中​​​​​​​​​​​​​​​已​​​​​​​​​​​​​​​将​​​​​​​​​​​​​​​ GDB 更​​​​​​​​​​​​​​​新​​​​​​​​​​​​​​​至​​​​​​​​​​​​​​​版​​​​​​​​​​​​​​​本​​​​​​​​​​​​​​​ 7.0.1。​​​​​​​​​​​​​​​有​​​​​​​​​​​​​​​关​​​​​​​​​​​​​​​更​​​​​​​​​​​​​​​改​​​​​​​​​​​​​​​的​​​​​​​​​​​​​​​详​​​​​​​​​​​​​​​细​​​​​​​​​​​​​​​列​​​​​​​​​​​​​​​表​​​​​​​​​​​​​​​请​​​​​​​​​​​​​​​参​​​​​​​​​​​​​​​考​​​​​​​​​​​​​​​技​​​​​​​​​​​​​​​术​​​​​​​​​​​​​​​说​​​​​​​​​​​​​​​明​​​​​​​​​​​​​​​中​​​​​​​​​​​​​​​的​​​​​​​​​​​​​​​ GDB 部​​​​​​​​​​​​​​​分​​​​​​​​​​​​​​​。​​​​​​​​​​​​​​​
加​​​​​​​​​​​​​​​强​​​​​​​​​​​​​​​的​​​​​​​​​​​​​​​ C++ 支​​​​​​​​​​​​​​​持​​​​​​​​​​​​​​​

改​​​​​​​​​​​​​​​进​​​​​​​​​​​​​​​了​​​​​​​​​​​​​​​ GDB 中​​​​​​​​​​​​​​​对​​​​​​​​​​​​​​​ C++ 编​​​​​​​​​​​​​​​程​​​​​​​​​​​​​​​语​​​​​​​​​​​​​​​言​​​​​​​​​​​​​​​的​​​​​​​​​​​​​​​支​​​​​​​​​​​​​​​持​​​​​​​​​​​​​​​。​​​​​​​​​​​​​​​显​​​​​​​​​​​​​​​著​​​​​​​​​​​​​​​的​​​​​​​​​​​​​​​改​​​​​​​​​​​​​​​进​​​​​​​​​​​​​​​包​​​​​​​​​​​​​​​括​​​​​​​​​​​​​​​:

  • 很​​​​​​​​​​​​​​​多​​​​​​​​​​​​​​​表​​​​​​​​​​​​​​​达​​​​​​​​​​​​​​​式​​​​​​​​​​​​​​​解​​​​​​​​​​​​​​​析​​​​​​​​​​​​​​​改​​​​​​​​​​​​​​​进​​​​​​​​​​​​​​​
  • 更​​​​​​​​​​​​​​​好​​​​​​​​​​​​​​​的​​​​​​​​​​​​​​​处​​​​​​​​​​​​​​​理​​​​​​​​​​​​​​​输​​​​​​​​​​​​​​​入​​​​​​​​​​​​​​​名​​​​​​​​​​​​​​​称​​​​​​​​​​​​​​​的​​​​​​​​​​​​​​​能​​​​​​​​​​​​​​​力​​​​​​​​​​​​​​​。​​​​​​​​​​​​​​​
  • 最​​​​​​​​​​​​​​​近​​​​​​​​​​​​​​​删​​​​​​​​​​​​​​​除​​​​​​​​​​​​​​​了​​​​​​​​​​​​​​​多​​​​​​​​​​​​​​​余​​​​​​​​​​​​​​​的​​​​​​​​​​​​​​​引​​​​​​​​​​​​​​​号​​​​​​​​​​​​​​​
  • "next" and other stepping commands work properly even when the inferior throws an exception.
  • GDB has a new "catch syscall" command. This can be used to stop the inferior whenever it makes a system call.

宽​​​​​​​​​​​​​​​字​​​​​​​​​​​​​​​符​​​​​​​​​​​​​​​和​​​​​​​​​​​​​​​多​​​​​​​​​​​​​​​字​​​​​​​​​​​​​​​节​​​​​​​​​​​​​​​字​​​​​​​​​​​​​​​符​​​​​​​​​​​​​​​支​​​​​​​​​​​​​​​持​​​​​​​​​​​​​​​

GDB 目​​​​​​​​​​​​​​​前​​​​​​​​​​​​​​​在​​​​​​​​​​​​​​​对​​​​​​​​​​​​​​​象​​​​​​​​​​​​​​​中​​​​​​​​​​​​​​​支​​​​​​​​​​​​​​​持​​​​​​​​​​​​​​​宽​​​​​​​​​​​​​​​字​​​​​​​​​​​​​​​符​​​​​​​​​​​​​​​和​​​​​​​​​​​​​​​多​​​​​​​​​​​​​​​字​​​​​​​​​​​​​​​节​​​​​​​​​​​​​​​字​​​​​​​​​​​​​​​符​​​​​​​​​​​​​​​。​​​​​​​​​​​​​​​

独​​​​​​​​​​​​​​​立​​​​​​​​​​​​​​​线​​​​​​​​​​​​​​​程​​​​​​​​​​​​​​​调​​​​​​​​​​​​​​​试​​​​​​​​​​​​​​​

Thread execution now permits debugging threads individually and independently of each other; enabled by new settings "set target-async" and "set non-stop".

6.2. SystemTap

SystemTap is a tracing and probing tool that allows users to study and monitor the activities of the operating system (particularly, the kernel) in fine detail. It provides information similar to the output of tools like netstat, ps, top, and iostat; however, SystemTap is designed to provide more filtering and analysis options for collected information.
New Kernel Tracepoints

Tracepoints are placed in important sections of the kernel, allowing system administrators to analyze the performance of, and debug portions of code. In Red Hat Enterprise Linux 5.5, a wide range of tracepoints have been added to the kernel (BZ#475710), including tracepoints for networking (BZ#475457), coredump (BZ#517115) and signal (BZ#517121).

注意

A list of tracepoints available in the kernel can be obtained with:
stap -L 'kernel.trace("*")'|sort

Unprivileged mode

Previously, only users with root privileges were able to use SystemTap. This update introduces SystemTap's unprivileged mode, allowing non-root users to still use SystemTap. Detailed information on unprivileged man stap-client manpage.

重要

Unprivileged mode is considered a Technology Preview in the Red Hat Enterprise Linux 5.5. The stap-server facility on which it relies is undergoing work for security improvements and should be deployed with care on a trustworthy network.
C++ Probing

The C++ program probing improvements also allows better probing of user-space programs.

6.3. Valgrind

Valgrind is used to monitor memory read, write, and allocation operations. The valgrind tool is frequently used by developers to diagnose and debug memory management problems.
Valgrind has been updated to version 3.5.0, providing enhanced support for a wide range of system architectures. This update introduces many improvements to performance, scalability and usability of the Valgrind. Notably, the usability and scalability of the Helgrind tool — which is used to detect race contiditions — has been improved. The leak checking capabilities of the Memcheck tool are also improved. Additionally, support for DWARF debugging information has been enhanced.
Red Hat logoGithubRedditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

© 2024 Red Hat, Inc.