This version includes corrections to defects and several enhancements.
Support for
Command-line Calls without end.o for PA64 application
GDB 5.1 can now perform command line calls for PA64
applications that are not linked with end.o. This support is already
available for PA 32-bit applications.
Support for heap profiling/leak
detection from startup of PA32 application
PA32 RTC is enhanced to collect leaks/heap information
from startup of PA32 application when environment variable RTC_INIT
is turned on and RTC library LD_PRELOADed.$ LD_PRELOAD=/opt/langtools/lib/librtc.sl
RTC_INIT=on <pa32-exe> &Attach the process
to gdb to view the complete heap profile and leak information from
its startup. This is already the behavior for PA64 and IPF applications.
NOTE: 1. RTC_INIT environment variable is PA32 specific
and not required to be turned on for PA64 and IPF applications.2.
If RTC_INIT is set, PA32 RTC starts recording heap information
by default for all PA32 processes. So, user should avoid exporting
this environment variable for shell and set only when appropriate.
The recommendation is to set RTC_INIT in the command line while invoking
the PA32 application.
Support for catch nomem: GDB 5.1 can detect and report malloc returning NULL pointer. The functionality is
available with the RTC library.GDB can also detect NULL pointer
return from calloc, valloc and realloc.
(gdb) set heap-check on[...] ---> till librtc.sl gets loaded(gdb) catch nomem(gdb)[...] ---> continue; when a NULL pointer is returned from malloc,warning: Memory Allocation is returning 0x00000000 value __rtc_nomem_event (ecode=RTC_MEM_NULL, pointer=0x0) at ../../../Src/gnu/gdb/infrtc.c:688688 switch (ecode)
Enhanced ptype command to show field layout of struct/union/class: A new option -v in ptype command will now display the field offset and size information
of a struct/union/class in addition to the default type information. This option
also displays filler bits used in the layout of fields.
Syntax: ptype [-v] [struct|union|enum|class] <TYPE-TAG|NAME>Example:(gdb) ptype -v struct infotype = struct info { /* off 0 bits, len 512 bits */ int i; /* off 0 bits, len 32 bits */ char a[20]; /* off 32 bits, len 160 bits */ struct details d; /* off 192 bits, len 256 bits */ int b : 2; /* off 448 bits, len 2 bits */ int c : 3; /* off 450 bits, len 3 bits */ <filler> /* off 453 bits, len 27 bits */ float f; /* off 480 bits, len 32 bits */}
For PA 64-bit applications,
GDB can now step into shared library bind-on-reference calls. This
support is already available for PA 32-bit and IPF applications.
RTC now supports incremental
heap profiling. It allows users to get heap growth starting from
a particular time. This feature requires users to specify two parameters:
Interval: The
user specifies the interval period in seconds. WDB collects the
heap growth during this time interval.
Repeat Count: WDB collects
the heap growth for the number of repeat count specified by the
user.
User can at any time use info heap-interval command to get the heap growth report. This option is similar
to info heap command.
New Commands
in HP WDB 5.1
set heap-check interval <nn>
This command starts incremental heap growth profile.
All allocations prior to the execution of this command are ignored
from report. If incremental heap growth profile is already on, executing
this command will reset the counters and start a fresh collection.Interval
is specified in seconds.
set heap-check repeat <nn>
This allows user to specify the number of intervals
for which WDB should collect the incremental heap growth. The default value
is 100. Every repeat of the interval tracks heap allocation during
that interval.
e.g. <gdb> set heap-check interval 10
<gdb> set
heap-check repeat 100
Here WDB will create 100 incremental heap profiles which are
10 seconds apart.
set heap-check reset
GDB stores incremental heap growth data in an internal
file. During each session data is appended to this file. If a session
is very long, it is possible that this file may become very large.
In such condition, the command discards the data existing in the
file and creates a new data file. Once this command is executed,
you cannot see the old data .
info heap-interval <file name>
This command creates the report of heap growth. The
data for each interval has the start and end time of the interval.
If file name is mentioned a detailed report is written in the file.