Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
HP-UX 11i Version 1.5 Release Notes: release id B.11.20for rx9610 and rx4610 hp serversand i2000 hp workstations > Chapter 7 Programming

ADB Debugger Tool

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Index

Changes to the adb command have been made to enable adb to handle 64-bit architectures in an improved manner. The new version of the ADB debugger tool also provides better overall performance and reliability, including improvements to command line syntax and options, format strings, writing and searching, and expressions. The ADB Debugger also supports the following new features:

  • Shared library support

  • Threads support

  • Multiprocessor dump reading support

  • 64-bit DLKM dump reading support

  • Support for all types of ELF and SOM object files

  • Single binary for 32-bit and 64-bit

The following discussion provides a summary of some of the major changes to adb.

Specifying the New ADB Behavior

To specify the new adb command, use the -n command line option. (For Itanium-based systems, the -n option is the default). For example,

    $ adb -n /stand/vmunix /dev/kmem

adb> runningprocs/d

runningprocs:
4

adb> q

$

There are no binary compatibility issues with this change.

Retaining Old ADB Behavior

The only reason you should enable old adb behavior is to ensure that any scripts that were written earlier run unchanged. For all interactive use and for new development the old adb behavior is strongly discouraged.

If you wish, you can specify the old adb behavior on Itanium-based systems by giving the -o command line option to adb. Another way to enable old behavior is to add the following line to the file $HOME/.adbrc.

       $a backcompat 1

Changes in ADB Command Line Syntax

The -k and -m command line options are no longer required. If you wish to look at a crash dump, you simply specify the crash dump directory as the sole argument. (In previous versions of adb, the -k option was required to recognize HP-UX crash dumps or /dev/mem. The -m option was required to recognize multiple file HP-UX crash dumps.) In the backward compatibility mode of operation of adb, the -k and -m options are ignored with a warning.

ADB Command Prefix Changes

New adb commands no longer require a $ prefix (as they did in previous versions of adb). The following examples show the old syntax and the equivalent new syntax.

Example 7-1 To quit adb

Old command: $q
New command: q

Example 7-2 To print the value of a variable named q in hexadecimal:

Old command: q/X
New command: p q/x

ADB Command Processing

The new version of adb ignores the SIGQUIT signal. However, on SIGINT signal adb interrupts the current command and waits for the next command. An interrupted command will not update any state variables. In this case, adb prints a warning message.

adb exits on an EOF. EOL is treated as a command with no command components and interpreted accordingly.

ADB Changes to Format Strings

In the new version of adb, format characters make adb syntax scalable and regular. All format characters are now lower case with a preceding optional length specifier character.

printf Style Format Strings

The new adb also supports printf style format strings, which should be preceded by a comma and enclosed within quotes. In this case, the format characters and length specifiers are the same as above, but flags, field widths and precision can be specified just as for the printf() library function.

Changes in ADB Writing and Searching

The old adb uses the format characters w and W for writing and l and L for searching. However, the new adb uses characters w and l as regular format characters. Therefore, in the new adb the following replacements occur:

Table 7-3 Title not available (Changes in ADB Writing and Searching)

Old Format Character

Equivalent New Character

w

=,2

W

=

l

/,2

L

/

 

Impact of Changes on Pre-Existing ADB Scripts

The features or behaviors that are enabled in the backward compatibility mode of adb (see “Retaining Old ADB Behavior”) are retained only for supporting macros written for earlier versions of adb. No attempt is made to preserve the interactive behavior as it will not affect macros. Users are discouraged from using these features in new macros and scripts, as these features may be obsoleted in a later version of adb. Most of the new features introduced in this version of adb are not available in the backward compatibility mode of operation of adb.

The features or behaviors described as deprecated (in the adb(1) manpage) will be obsoleted over one or two major releases of the HP-UX operating system. These features should not be used in new macros and scripts. Most of these features and behaviors will have only minor impact on existing macros or scripts. If there are any macros which use these features, they should be rewritten before these are obsoleted.

ADB Documentation

The updated adb(1) manpage describes the new and changed features of the ADB Debugger Tool in detail. For additional information see the ADB Release Notes available at http://docs.hp.com.

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 2001 Hewlett-Packard Development Company, L.P.