set heap-check high-mem-count

Stops when brk() value has moved X_number

X_number

of times.

Limitations:

 

This feature assumes that an application has a deterministic memory allocation pattern from one run to another.

The high_mem feature is not supported in batch mode debugging.

14.11Thread Debugging Support

HP WDB provides thread-debugging support for kernel, user, and MxN threads. You can exclusively disable or enable specific thread execution. Advanced thread debugging support in HP WDB enables you to view information on pthread primitives and detect certain thread-related conditions.

NOTE: WDB supports pthread parallelism, but it does not support compiler-generated parallelism such as parallelism with directives.

14.11.1Support for Enabling and Disabling Specific Threads

When you suspect that a specific thread is causing a problem while debugging a multi- threaded application, you can suspend the execution of other threads in the application and debug the doubtful thread exclusively. HP WDB 3.2 and later versions provide the following commands to disable and enable specific thread execution:

thread disable This command prevents the specified threads from running until they are enabled again using the thread enable command.

thread enable This command enables the specified thread to run when you issue the continue or step command. By default, all threads are in the enabled state. You can use the thread enable command to reactivate a disabled thread.

Consider the following example:

(gdb) info threadsystem thread 4189 0x7f666da8

in __pthread_create_system+0x3d8 () from /usr/lib/libpthread.1

2 system thread 4188 worker (wptr=0x40004640 ") at quicksort.c:135

1 system thread 4184 0x7f66f728 in _lwp_create+0x10 () from /usr/lib/libpthread.1

To disable a thread, execute the following command:

(gdb) thread disable 1

warning: ATTENTION!! Disabling threads may result in deadlocks in the program.Disabling thread 1

To enable a thread, execute the following command:

(gdb) thread enable 1 Enabling thread 1

14.11 Thread Debugging Support 181

Page 181
Image 181
HP gnu source-level debugger 5992-4701 manual Thread Debugging Support, Support for Enabling and Disabling Specific Threads