Core file debugging dbx


















The user libraries and system libraries can change in patches as well as major Oracle Solaris operating system upgrades, so this problem can even occur on the same host, if, for example, a patch was installed after the core file was collected but before running dbx on the core file.

The single-argument mode for the pathmap command does not work with load object path names, so use the two argument from-path to-path mode.

Debugging the core file is likely to work better if the dbx -host has either the same or a more recent version of the Oracle Solaris operating system than the core-host, though this setup is not always necessary. For the threads library, depending on which implementation of libthread you are using:. The ld. If you are looking at a core file from a threaded program and the where command does not display a stack, try using lwp commands.

The following example shows several simple C expressions:. You can track when the values of variables and expressions change using data change breakpoints see Setting Data Change Breakpoints.

For example, to stop execution when the value of the variable count changes, type:. Runtime checking consists of two parts: memory access checking, and memory use and leak checking. Access checking checks for improper use of memory by the debugged application.

Memory use and leak checking involves keeping track of all the outstanding heap space and then on demand or at termination of the program, scanning the available data spaces and identifying the space that has no references. Memory access checking, and memory use and leak checking, are enabled with the check command. To turn on memory access checking only, type:.

To turn on memory use and memory leak checking, type:. After turning on the types of runtime checking you want, run your program. The program runs normally, but slowly because each memory access is checked for validity just before it occurs. If dbx detects invalid access, it displays the type and location of the error.

You can then use dbx commands such as the where command to get the current stack trace or the print command to examine variables. For detailed information on using runtime checking, see Chapter 9, Using Runtime Checking.

Search Scope:. Document Information Preface 1. Debugging Your Program With dbx You are likely to be debugging your program for one of the following reasons: To determine where and why it is crashing. Strategies for locating the cause of a crash include: Running the program in dbx. To determine why your program is giving incorrect results. Examining a Core File To determine where your program is crashing, you may want to examine the core file, the memory image of your program when it crashed.

All rights reserved. Legal Notices. Sign up using Email and Password. Post as a guest Name. Email Required, but never shown. The Overflow Blog. Podcast Making Agile work for data science. Stack Gives Back Featured on Meta. New post summary designs on greatest hits now, everywhere else eventually. Related Hot Network Questions. Question feed. For example, you need not make a link from libc.

The single-argument mode for the pathmap command does not work with loadobject pathnames, so use the two argument from-path to-path mode. Debugging the core file is likely to work better if the dbx-host has either the same or a more recent version of the Solaris operating environment than the core-host, though this is not always necessary. The ld. If you are looking at a core file from a threaded program, and the where command does not display a stack, try using lwp commands.

For example:. The -setfp and -resetfp options of the lwp command are useful when the frame pointer fp of the LWP is corrupted. Debugging a Core File If the program that dumped core was dynamically linked with any shared libraries, it is best to debug the core file in the same operating environment in which it was created.



0コメント

  • 1000 / 1000